[PATCH] ppc64 & powerpc: Check whether the native CC can use -m64
Olof Johansson
olof at lixom.net
Thu Nov 10 04:29:28 EST 2005
On Wed, Nov 09, 2005 at 12:08:29PM -0500, Daniel Ostrow wrote:
> 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.
[...]
> +NATIVE64 := $(call cc-option-yn, -m64)
> +ifeq ($(NATIVE64),n)
> +CROSS_COMPILE := powerpc64-unknown-linux-gnu-
> +endif
> +
That one overrides any manual CROSS_COMPILE setting, doesn't it?
Also, I know most of the systems I have been on use powerpc64-linux-gcc,
not the longer one you specified, it's a better default.
-Olof
More information about the Linuxppc64-dev
mailing list