[PATCH] [PPC64] override command line AS/LD/CC variables when adding -m64 and co for biarch compilers.

Sven Luther sven.luther at wanadoo.fr
Fri May 27 23:25:38 EST 2005


Hello,

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.

Friendly,

Sven Luther
-------------- next part --------------
--- linux-2.6.11/arch/ppc64/Makefile.orig	2005-05-27 13:24:25.000000000 +0000
+++ linux-2.6.11/arch/ppc64/Makefile	2005-05-27 13:24:36.000000000 +0000
@@ -17,9 +17,9 @@
 
 HAS_BIARCH      := $(call cc-option-yn, -m64)
 ifeq ($(HAS_BIARCH),y)
-AS		:= $(AS) -a64
-LD		:= $(LD) -m elf64ppc
-CC		:= $(CC) -m64
+override AS	+= -a64
+override LD	+= -m elf64ppc
+override CC	+= -m64
 endif
 
 new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)


More information about the Linuxppc64-dev mailing list