[PATCH] ppc64 & powerpc: Check whether the native CC can use -m64
Daniel Ostrow
dostrow at gentoo.org
Thu Nov 10 04:08:29 EST 2005
On 17:55 Wed 09 Nov , Arnd Bergmann wrote:
> On Middeweken 09 November 2005 16:56, Daniel Ostrow wrote:
> > 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?
>
> I find that much more readable, yes.
>
> However, I first misunderstood what you are really trying to do.
> I think that if you want to use a cross compiler, you normally
> should set $(CROSS_COMPILE) to powerpc64-linux- instead of
> only changing $(CC) but not the other tools, right?
>
> Arnd <><
>
Actually yes I like that *much* better...good call :)
New diff attached.
Signed-off-by: Daniel Ostrow <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 09:06:28.000000000 -0800
@@ -18,6 +18,11 @@ ifeq ($(CONFIG_PPC64),y)
OLDARCH := ppc64
SZ := 64
+NATIVE64 := $(call cc-option-yn, -m64)
+ifeq ($(NATIVE64),n)
+CROSS_COMPILE := powerpc64-unknown-linux-gnu-
+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 09:07:16.000000000 -0800
@@ -15,6 +15,11 @@
KERNELLOAD := 0xc000000000000000
+NATIVE64 := $(call cc-option-yn, -m64)
+ifeq ($(NATIVE64),n)
+CROSS_COMPILE := powerpc64-unknown-linux-gnu-
+endif
+
# Set default 32 bits cross compilers for vdso and boot wrapper
CROSS32_COMPILE ?=
More information about the Linuxppc64-dev
mailing list