Cross-compiler for x86-64
I just got my Dualie Opteron system put together the other day. I would rather not shell out money for the Redhat and Suse AMD64 distros and there are no free distros have amd64 support stable yet. I have messed with gentoo but was finding it frustrating and not everything worked as it should.
I am trying to build a cross-compiler so that I can run a 64-bit kernel on my 32-bit system and gradually shift some stuff to 64-bit until there is a good free distro out with 64 bit support.
I configure GCC with:
configure --target=x86_64-linux
then I do make -j4 as the building instructions state. Every time though I end with assembly errors:
/home/ogre/gccobj/gcc/xgcc -B/home/ogre/gccobj/gcc/ -B/usr/local/x86_64-linux/bin/ -B/usr/local/x86_64-linux/lib/ -isystem /usr/local/x86_64-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -DNATIVE_CROSS -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I../../gcc-3.3.2/gcc -I../../gcc-3.3.2/gcc/. -I../../gcc-3.3.2/gcc/config -I../../gcc-3.3.2/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -fPIC \
-Dinhibit_libc -c ../../gcc-3.3.2/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \
-o crtbeginS.o
/tmp/ccS1SGGs.s: Assembler messages:
/tmp/ccS1SGGs.s:37: Error: `completed.1(%rip)' is not a valid 32 bit base/index expression
/tmp/ccS1SGGs.s:38: Error: suffix or operands invalid for `push'
/tmp/ccS1SGGs.s:39: Error: suffix or operands invalid for `movq'
/tmp/ccS1SGGs.s:41: Error: @GOTPCREL reloc is not supported in 32 bit mode
/tmp/ccS1SGGs.s:41: Error: junk `@GOTPCREL' after expression
/tmp/ccS1SGGs.s:41: Error: `__cxa_finalize@GOTPCREL(%rip)' is not a valid 32 bit base/index expression
/tmp/ccS1SGGs.s:44: Error: `p.0(%rip)' is not a valid 32 bit base/index expression
/tmp/ccS1SGGs.s:45: Error: `(%rax)' is not a valid 32 bit base/index expression
/tmp/ccS1SGGs.s:51: Error: `p.0(%rip)' is not a valid 32 bit base/index expression
/tmp/ccS1SGGs.s:53: Error: `p.0(%rip)' is not a valid 32 bit base/index expression
/tmp/ccS1SGGs.s:54: Error: `(%rax)' is not a valid 32 bit base/index expression
/tmp/ccS1SGGs.s:58: Error: @GOTPCREL reloc is not supported in 32 bit mode
/tmp/ccS1SGGs.s:58: Error: junk `@GOTPCREL' after expression
/tmp/ccS1SGGs.s:58: Error: `__deregister_frame_info@GOTPCREL(%rip)' is not a valid 32 bit base/index expression
...
snip
... expression
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/home/ogre/gccobj/gcc'
make: *** [all-gcc] Error 2
ogre@Merlin:~/gccobj$
If anyone can offer assistance it would be appreciated. I am running on slack 9.1 with gcc 3.2.3 and attempting to compile gcc 3.3.2.
|