Browse Source

[build] Inhibit .eh_frame on newer gcc versions

Using -fno-dwarf2-cfi-asm is not sufficient to prevent the .eh_frame
section from being generated on newer versions of gcc.  Add
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables;
this is sufficient to inhibit the .eh_frame section on gcc 4.7.1.

This does not affect the overall binary size, but does fix the numbers
reported by "size" for individual object files.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
0932bc5156
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      src/Makefile.housekeeping

+ 5
- 2
src/Makefile.housekeeping View File

@@ -162,9 +162,12 @@ endif
162 162
 # output of "size".  Inhibit this.
163 163
 #
164 164
 ifeq ($(CCTYPE),gcc)
165
-CFI_TEST = $(CC) -fno-dwarf2-cfi-asm -x c -c /dev/null \
165
+CFI_TEST = $(CC) -fno-dwarf2-cfi-asm -fno-exceptions -fno-unwind-tables \
166
+		 -fno-asynchronous-unwind-tables -x c -c /dev/null \
166 167
 		 -o /dev/null >/dev/null 2>&1
167
-CFI_FLAGS := $(shell $(CFI_TEST) && $(ECHO) '-fno-dwarf2-cfi-asm')
168
+CFI_FLAGS := $(shell $(CFI_TEST) && \
169
+	       $(ECHO) '-fno-dwarf2-cfi-asm -fno-exceptions ' \
170
+		       '-fno-unwind-tables -fno-asynchronous-unwind-tables')
168 171
 WORKAROUND_CFLAGS += $(CFI_FLAGS)
169 172
 endif
170 173
 

Loading…
Cancel
Save