I use a 64bit-x86 computer, with Fedora Core 13, and want to build the llvm-gcc. According to the README.LLVM file, I firstly built llvm 2.8 in /home/qali/install/llvm-2.8 using: $./configure $./make ENABLE_OPTIMIZED=1 It succeded. Then, I tried to built llvm-gcc in an 'obj' directory different from the soucre directory, using: $./llvm-gcc-4.2-2.8.source/configure --prefix=`pwd`/../install --program-prefix=llvm- --enable-llvm=/home/qali/install/llvm-2.8 --enable-languages=c,c++$EXTRALANGS --target=i686-pc-linux-gnu --with-tune=generic --with-arch=pentium4 $make LLVM_VERSION_INFO=2.8 Here came the error: /home/qali/install/llvm_gcc/obj/./gcc/as: line 2: exec: -Q: invalid option exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...] make[2]: *** [crtbegin.o] Error 1 make[2]: Leaving directory `/home/qali/install/llvm_gcc/obj/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/qali/install/llvm_gcc/obj' make: *** [all] Error 2 I have searched the mail-list in this group, but failed to get a solution. Could any one help me? -- Best regards, Li Qingan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101213/a9bca52f/attachment.html>
Anton Korobeynikov
2010-Dec-13 16:15 UTC
[LLVMdev] problems while building llvm-gcc 4.2.2-8
Hello> $./llvm-gcc-4.2-2.8.source/configure --prefix=`pwd`/../install > --program-prefix=llvm- --enable-llvm=/home/qali/install/llvm-2.8 > --enable-languages=c,c++$EXTRALANGS --target=i686-pc-linux-gnu > --with-tune=generic --with-arch=pentium4 > $make LLVM_VERSION_INFO=2.8 > Here came the error: > > /home/qali/install/llvm_gcc/obj/./gcc/as: line 2: exec: -Q: invalid option > exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirectionYou're effectively building a cross-compiler (from x86_64-linux to i686-linux). For this you need to have 32-bit tools installed (e.g. i686-pc-linux-gnu-as and friends) -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University