Re: i386 -> x86_64 cross compile failure (binutils bug?)

From: Lee Revell
Date: Fri Dec 09 2005 - 16:37:48 EST


On Fri, 2005-12-09 at 21:30 +0000, Ken Moffat wrote:
> On Fri, 9 Dec 2005, Lee Revell wrote:
>
> >
> > $ file init/built-in.o
> > init/built-in.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1
> > (SYSV), not stripped
> >
> >> From man gcc, i386 section:
> >
> > -m32
> > -m64
> > Generate code for a 32-bit or 64-bit environment. The 32-bit
> > environment sets int, long and pointer to 32
> > bits and generates code that runs on any i386 system. The
> > 64-bit environment sets int to 32 bits and long
> > and pointer to 64 bits and generates code for AMD's x86-64
> > architecture.
> >
> > Lee
> >
>
> Yes, file shows your gcc does indeed do the right thing with -m64, and
> thank you, but I was already familiar with -m64 (to say nothing of
> passing LDEMULATION to userspace compilations [info binutils, if you
> need to know]).
>
> So, do you have some sort of religious objection to using
> CROSS_COMPILE= when building for a processor that doesn't match the
> userspace ? And I repeat, messing with CFLAGS should NOT be necessary.

It seems like CROSS_COMPILE= should not be needed if my standard gcc
binary can produce x86-64 code. I was hoping it would be possible to
build an x86-64 kernel using the Ubuntu packages and that I would not
have to resort to building my own toolchain. And it seems that it's
supposed to work, but doesn't.

Lee

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/