[lkml]   [2005]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: i386 -> x86_64 cross compile failure (binutils bug?)
On Fri, 9 Dec 2005, Lee Revell wrote:

> I'm trying to build an x66-64 kernel on a 32 bit system (Ubuntu 5.10).
> I added -m64 to the CFLAGS as per the gcc docs. But the build fails
> with:
> $ make ARCH=x86_64
> [...]
> CC init/initramfs.o
> CC init/calibrate.o
> LD init/built-in.o
> CHK usr/initramfs_list
> CC arch/x86_64/kernel/process.o
> CC arch/x86_64/kernel/signal.o
> AS arch/x86_64/kernel/entry.o
> arch/x86_64/kernel/entry.S: Assembler messages:
> arch/x86_64/kernel/entry.S:204: Error: cannot represent relocation type BFD_RELOC_X86_64_32S

Unless ubuntu provides a biarch toolchain (and the fact gcc accepts
'-m64' means nothing - use 'file' on init/built-in.o), you have to build
a cross toolchain, (just binutils and gcc), put that on your path, and

make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu-

so that the build will use x86_64-pc-linux-gnu-as and friends. You
should not need to mess with the CFLAGS.

das eine Mal als Tragödie, das andere Mal als Farce
 \ /
  Last update: 2005-12-09 20:53    [W:0.103 / U:0.140 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site