[build] Add -fno-dwarf2-cfi-asm to CFLAGS if supported by the gcc in use
authorMichael Brown <mcb30@etherboot.org>
Wed, 27 May 2009 01:21:45 +0000 (02:21 +0100)
committerMichael Brown <mcb30@etherboot.org>
Wed, 27 May 2009 01:30:46 +0000 (02:30 +0100)
commit8afafb65322a3fec01206720a1d8be4083e9c0d6
tree8eacb27e8d4e9aa5a46fd2638fcabea9f5ddfb2d
parente47869995f67bd2547bf416e53c480ca51235ed8
[build] Add -fno-dwarf2-cfi-asm to CFLAGS if supported by the gcc in use

gcc 4.4 defaults to using .cfi assembler directives for debugging
information, which causes unneeded .eh_frame sections to be generated.
These sections are already stripped out by our linker script, so don't
affect the final build, but do distort the output of "size" when run
on individual .o files; the .eh_frame size is included within the size
reported for .text.  This makes it difficult to accurately judge the
effects of source code changes upon object code size.

Fix by adding -fno-dwarf2-cfi-asm to CFLAGS if we detect that this
option is supported by the gcc that we are compiling with.

Tested-by: Daniel Verkamp <daniel@drv.nu>
src/Makefile.housekeeping