makefile.flags: do not use -O with -g
walter harms
WHarms at bfs.de
Mon Feb 18 10:40:33 UTC 2008
Mike Frysinger wrote:
> On Sunday 17 February 2008, walter harms wrote:
>> i had a situation where the -Os option confused my debugger.
>> This little patch disables the -Os when -g is used.
>
> fix your debugger or dont build with -Os. if you need to debug something, you
> shouldnt be enabling any optimizations in the first place.
> -mike
hi list,
the point of my patch, is that
-Os == Optimise for Size and -g == add debug information
does not make sense.
When your compiler creates broken code with -Ox that you should
change the compiler but no debugger can be expected to make sense from code that
is changed from the original c-source (except asm-level, what does not need -g).
And of cause you need to compile twice or do you ship your code with debug enabled ? of cause not.
But then you can add -O2 or -Os or what ever.
With the current Makefile.flags we enable -Os *everytime* no matter what.
re,
wh
More information about the busybox
mailing list