[M3devel] Compile Options

Jay K jay.krell at cornell.edu
Sun May 9 00:21:59 CEST 2010


-O looks right for the vast majority of targets (Unix.common: *BSD, Solaris, Darwin, Linux, maybe not NT/Interix/Cygwin/VMS).
I'll adjust -g/-gstabs+ (PA64_HPUX never generates symbols currently, since it doesn't support stabs)
I have some more config file cleanup on deck: moving m3back_flags out of per-target and to per-architecture, though even that is necessary duplication


I propose also that -O should imply -O2, not -O3.
 -O2 seems to be heavily used in the wider world, -O3 not so much 
 For one thing, gcc itself defaults to building with -O2.

I have it like this:

if not defined("m3back_optimize")
 m3back_optimize = "-O2"
end

if not defined("m3back_debug")
 
m3back_debug = "-gstaus+"

end


and then
if optimize options += m3back_optimize end
if debug options += m3back_debug  end




individual users/platforms can override, such as PA64_HPUX setting m3back_debug = "" (maybe later to something else)
maybe we can shift to dwarf at some point too, that seems to be the favored format on most platforms


 - Jay



________________________________
> From: hosking at cs.purdue.edu
> Date: Sat, 8 May 2010 12:01:12 -0400
> To: wagner at elegosoft.com
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] Compile Options
>
>
>
> -O used to work in the old config files.
> Did it get lost?
>
>
> Antony Hosking | Associate Professor | Computer Science | Purdue University
> 305 N. University Street | West Lafayette | IN 47907 | USA
> Office +1 765 494 6001 | Mobile +1 765 427 5484
>
>
>
>
>
>
> On 8 May 2010, at 06:40, Olaf Wagner wrote:
>
> Quoting Jay K>:
>
> -O is the config files
> It gets passed on to them and they may or may not pay attention.
>
> Turning off symbol generation not something I'm very sympathetic too.
> I realize it cuts I/O, build time, resulting binary size (possibly load/runtime,
> depending on the load behavior of symbols). Though on Windows
> the symbols go into separate files, greatly reducing any negative affect.
> On one hand, you don't want to inhibit debugging,
>
> Of course you may want to strip symbols for programs delivered to
> customers.
>
> but on the other, we don't have a good debugger story anyway.
>
> m3gdb works well on certain platforms.
>
> Again, check the config files.
>
> -c I don't know. Is it important?
>
> The front end just includes some quake calls in the generated
> m3make file for the options:
>
> % less AMD64_FREEBSD/m3make.args
> set_config_options ()
> readonly _all = TRUE % cm3 -build
> m3_optimize (TRUE) <----
> m3_debug (TRUE) <----
> M3_KEEP_FILES = TRUE
> m3_compile_only () <----
> M3_MODE = "build"
> include_dir ("../src")
>
> At least optimize and debug used to work some time ago; I'm not
> sure about compile-only.
>
> Was something lost during the great config refactoring?
> Can you please check that, Jay?
>
> I think we shold implement the CLI as documented. We _might_ discuss
> the value-add of -c (I've never used it).
>
> We're probably missing regression tests for these simple command line
> arguments, too.
>
> Olaf
> --
> Olaf Wagner -- elego Software Solutions GmbH
> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
>
>
 		 	   		  


More information about the M3devel mailing list