http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662
Bug #: 53662 Summary: Cannot build static gcc on i686 linux gnu with -m64 support. Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: kre...@email.com Hello there. I am not sure if something is wrong with my setup, but I am unable to build gcc multilib compiler. I have pure 32bit system built from scratch (Linux From Scratch), but I would like to have multilib compiler so I can compile 64bit kernel in 32bit userland (not cross-compile). Long story short, I am unable to bootstrap gcc to support -m64. ~/src/build/prev-gcc$ ./xgcc -v Using built-in specs. COLLECT_GCC=./xgcc Target: i686-pc-linux-gnu Configured with: ../src/configure --prefix=/usr/gcc --libdir=/usr/gcc/lib --libexecdir=/usr/gcc/lib --without-headers --with-newlib --disable-shared --disable-nls --disable-decimal-float --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-threads --without-ppl --without-cloog --enable-targets=i686-pc-linux-gnu,x86_64-unknown-linux-gnu --with-mpfr-include=/home/armin/src/src/mpfr/src --with-mpfr-lib=/home/armin/src/build/mpfr/.libs --enable-multilib --with-multilib-list=m32,m64,mx32 --enable-bootstrap --enable-languages=c Thread model: single gcc version 4.6.3 (GCC) ~/src/build/prev-gcc$ ./cc1 --help ... -m32 [enabled] -m3dnow [disabled] -m64 [disabled] ... These are from stage2 and remain same after stage3, even when installed. It just says "Sorry, 64bit mode not implemented" or whatever when I try to compile something with gcc -m64. I have built binutils with --enable-multilib support already, so I am not really sure what I've done wrong. Shared gcc libraries require 64bit glibc and since I don't have multilib compiler, I can't compile it ... So I am in catch22 situation. It looks like you need multilib compiler to compile multilib compiler. Also, I have tried without --with-multilib-lists, without --enable-targets, it was same. Just when I used --enable-targets=all, it failed saying that 64bit mode is unimplemeted after stage1 xgcc has been built. Also, I have tried with system gmp, mpfr and mpc libraries which are same versions as ones that are in gcc source tree (source dirs renamed into mpfr, gmp and mpc respectively). This is configure output from stage1 libgcc when using --enable-targets=all checking whether ln -s works... yes checking for i686-pc-linux-gnu-gcc... /home/armin/src/build/./gcc/xgcc -B/home/armin/src/build/./gcc/ -B/usr/gcc/i686-pc-linux-gnu/bin/ -B/usr/gcc/i686-pc-linux-gnu/lib/ -isystem /usr/gcc/i686-pc-linux-gnu/include -isystem /usr/gcc/i686-pc-linux-gnu/sys-include -m64 checking for suffix of object files... configure: error: in `/home/armin/src/build/i686-pc-linux-gnu/64/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. and config.log says this: Assembler messages: Fatal error: no compiled in support for x86_64 configure:3058: $? = 1 So, is this really a problem in gcc bootstrap or my setup? And how else I am able to build multilib compiler just from pure 32bit system? There must be a way right?