Skip to contentSkip to conversation

kbuild: check if linker supports the -X option

PATCH New [email protected] 1 participant 1 message Sep 14, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 15/18 kbuild: check if linker supports the -X option

From: Andi Kleen <[email protected]>

The new alternative `gold' linker in recent binutils doesn't support the -X option. This breaks allyesconfig builds that have CONFIG_STRIP_ASM_SYMS enabled. Check if the linker really supports the option using ld-option.

---

 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile renamed from Makefile~kbuild-check-if-linker-supports-the-x-option +1 -1
diff -puN Makefile~kbuild-check-if-linker-supports-the-x-option Makefile
@@ -598,7 +598,7 @@ LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
 
 ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
-LDFLAGS_vmlinux	+= -X
+LDFLAGS_vmlinux	+= $(call ld-option, -X,)
 endif
 
 # Default kernel image to build when no specific target is given.

_