Patchwork Test for, and use --build-id=none

login
register
about
Submitter Patrick Georgi
Date 2010-02-10 09:49:05
Message ID <4B728111.7000503@georgi-clan.de>
Download mbox | patch
Permalink /patch/896/
State Superseded
Headers show

Comments

Patrick Georgi - 2010-02-10 09:49:05
Hi,

This patch brings a buildtarget feature over to Kconfig:

Use --build-id=none to avoid spurious sections to end up in the object
files, if it exists. If not, do nothing (and hope for the best)


Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>

Patch

Index: Makefile
===================================================================
--- Makefile	(revision 5104)
+++ Makefile	(working copy)
@@ -229,11 +229,14 @@ 
 fi; rm -rf "$$TMP")
 
 cc-option= $(call try-run,\
-$(CC) $(1) -S -xc /dev/null -o "$$TMP", $(1), $(2))
+$(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP", $(1), $(2))
 
+# official work around for "," in lists
+comma:=,
 STACKPROTECT += $(call cc-option, -fno-stack-protector,)
+BUILDID_FLAG += $(call cc-option, -Wl$(comma)--build-id=none,)
 
-CFLAGS = $(STACKPROTECT) $(INCLUDES) -Os -nostdinc
+CFLAGS = $(STACKPROTECT) $(BUILDID_FLAG) $(INCLUDES) -Os -nostdinc
 CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
 CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs 
 CFLAGS += -Wstrict-aliasing -Wshadow