[PATCH] ppc64 & powerpc: Check whether the native CC can use -m64

Daniel Ostrow dostrow at gentoo.org
Thu Nov 10 02:56:27 EST 2005


On 11:43 Wed 09 Nov     , Arnd Bergmann wrote:
> On Dinsdag 08 November 2005 20:14, Daniel Ostrow wrote:
> > +CC     := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null
> > 2>&1; then echo $(CC); else echo powerpc64-linux-gcc; fi )
> 
> You should be using $(call cc-option,-m64) for this, like we do in the
> rest of the Makefile.
> 
> 	Arnd <><

Is something like the following better?

Signed-off-by: Daniel Ostrow <dostrow at gentoo.org>

-- 
Daniel Ostrow
Gentoo Foundation Board of Trustees
Gentoo/{PPC,PPC64,DevRel}
dostrow at gentoo.org

diff -Naupr powerpc-merge.orig/arch/powerpc/Makefile powerpc-merge/arch/powerpc/Makefile
--- powerpc-merge.orig/arch/powerpc/Makefile	2005-11-08 10:18:18.000000000 -0800
+++ powerpc-merge/arch/powerpc/Makefile	2005-11-09 07:15:14.000000000 -0800
@@ -18,6 +18,11 @@ ifeq ($(CONFIG_PPC64),y)
 OLDARCH	:= ppc64
 SZ	:= 64
 
+NATIVE64	:= $(call cc-option-yn, -m64)
+ifeq ($(NATIVE64),n)
+CC	:= powerpc64-linux-gcc
+endif
+
 # Set default 32 bits cross compilers for vdso and boot wrapper
 CROSS32_COMPILE ?=
 
diff -Naupr powerpc-merge.orig/arch/ppc64/Makefile powerpc-merge/arch/ppc64/Makefile
--- powerpc-merge.orig/arch/ppc64/Makefile	2005-11-08 10:07:06.000000000 -0800
+++ powerpc-merge/arch/ppc64/Makefile	2005-11-09 07:21:41.000000000 -0800
@@ -15,6 +15,11 @@

 KERNELLOAD	:= 0xc000000000000000
 
+NATIVE64        := $(call cc-option-yn, -m64)
+ifeq ($(NATIVE64),n)
+CC      := powerpc64-linux-gcc
+endif
+
 # Set default 32 bits cross compilers for vdso and boot wrapper
 CROSS32_COMPILE ?=
 
> 



More information about the Linuxppc64-dev mailing list