[En-Nut-Discussion] GCC 4.8, -Og and -g3

Ole Reinhardt ole.reinhardt at embedded-it.de
Fri Jan 17 23:07:53 CET 2014


Hi!

> why do we use -gdwarf-2 in Makedefs.xxxdbg? With -g3 instead of dwarf, gdb

I think thats mostly a legacy thing. I'm not sure since which GCC
version this parameter is supported.

> So I think it is the optimize level of choice for debugging. However gcc
> before gcc-4.8 chokes on that option. On Linux I can define a GCC_VERSION
> variable with a shell call like
> arm-none-eabi-gcc -dumpversion | cut -b 1,3,5
> and use -O0 if GCC_VERSION < 480 or -Og else. But I doubt this solution is
> portable. Any ideas for a portable solution.

Unfortunately it is not. You can not use any shell code on Windows
without a full cygwin environment.

But I just though: Why don't we move some compiler options into the
Configurator? This way we could provide different sets of debugging and
other compiler options while not have to maintain 100 different Makefiles?

Bye,

Ole

-- 
kernel concepts GmbH            Tel: +49-271-771091-14
Sieghuetter Hauptweg 48         Mob: +49-177-7420433
D-57072 Siegen
http://www.embedded-it.de
http://www.kernelconcepts.de


More information about the En-Nut-Discussion mailing list