[15/18] kbuild: check if linker supports the -X option
diff mbox

Message ID 200909181949.n8IJnZ7g019298@imap1.linux-foundation.org
State New, archived
Headers show

Commit Message

Andrew Morton Sept. 18, 2009, 7:49 p.m. UTC
From: Andi Kleen <andi@firstfloor.org>

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.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andi Kleen Sept. 19, 2009, 1:53 a.m. UTC | #1
akpm@linux-foundation.org wrote:
> From: Andi Kleen <andi@firstfloor.org>
> 
> 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.

I sent Sam an updated version of that patch and the "Fix ld-option to really work"
patch.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff -puN Makefile~kbuild-check-if-linker-supports-the-x-option Makefile
--- a/Makefile~kbuild-check-if-linker-supports-the-x-option
+++ a/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.