From: Sven Luther Date: Wed, 22 Jun 2005 00:15:32 +0000 (-0700) Subject: [PATCH] ppc64: override command line AS/LD/CC variables when adding -m64 and co for... X-Git-Tag: v2.6.13-rc1~68^2~582^2~109 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=723e2b35e43dcbcfd737c40453caa7d198092d23;p=linux-2.6 [PATCH] ppc64: override command line AS/LD/CC variables when adding -m64 and co for biarch compilers The following kind of calls currently fails : make ARCH=ppc64 CC="gcc-3.4" Since the code for detecting a biarch compiler and adding the needed 64bit magic argument fails if the AS/LD/CC commands are overriden in the command line. The attached patch fixes this by using the make override and += directive, but i am not 100% sure this will work without gmake, as i am no Makefile expert. Cc: Paul Mackerras Cc: Anton Blanchard Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index 691f3008e6..33c752ceca 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile @@ -35,9 +35,9 @@ CROSS32AS := $(AS) -a32 CROSS32LD := $(LD) -m elf32ppc CROSS32OBJCOPY := $(OBJCOPY) endif -AS := $(AS) -a64 -LD := $(LD) -m elf64ppc -CC := $(CC) -m64 +override AS += -a64 +override LD += -m elf64ppc +override CC += -m64 endif export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY