I am trying to build a x86_64 to ARM cross compiler. I configured, built and installed LLVM as follows: $ ../../../src/llvm/configure --with-llvmgccdir=<llvm-root>/install/x86_64-arm/llvm-gcc-4.2 --enable-optimized --enable-jit --prefix=<llvm-root>/install/x86_64-arm/llvm --target=arm-unknown-linux-gnueabi $ make $ make install Then I configured gcc front end as follows: $ ../../../src/llvm-gcc-4.2/configure --prefix=<llvm-root>/install/x86_64-arm/llvm-gcc-4.2 --program-prefix=llvm-x86_64-arm --enable-llvm=<llvm-root>/install/x86_64-arm/llvm --enable-languages=c,c++ --disable-multilib --target=arm-unknown-linux-gnueabi I get the following error: exec: 2: -meabi=4: not found while assembling ../../../../src/llvm-gcc-4.2/gcc/crtstuff.c I found that execution of the command <llvm-root>/build/x86_64-arm/llvm-gcc-4.2/./gcc/as which is part of execution of the command <llvm-root>/build/x86_64-arm/llvm-gcc-4.2/./gcc/xgcc is the resulting in this error. It turns out that this is a 2 line shell script that exec's the arguments like thus: #!/bin/sh exec "$@" Where is the assembler that needs to be invoked? What do I need to do to get the configuration find it? What am I doing wrong? Thanks for any help! Bharadwaj -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090130/e5e26c3b/attachment.html>
S. Bharadwaj Yadavalli wrote:> > I am trying to build a x86_64 to ARM cross compiler. > > I configured, built and installed LLVM as follows: > > $ ../../../src/llvm/configure > --with-llvmgccdir=<llvm-root>/install/x86_64-arm/llvm-gcc-4.2 > --enable-optimized --enable-jit > --prefix=<llvm-root>/install/x86_64-arm/llvm > --target=arm-unknown-linux-gnueabi > > $ make > $ make install > > Then I configured gcc front end as follows: > > $ ../../../src/llvm-gcc-4.2/configure > --prefix=<llvm-root>/install/x86_64-arm/llvm-gcc-4.2 > --program-prefix=llvm-x86_64-arm > --enable-llvm=<llvm-root>/install/x86_64-arm/llvm > --enable-languages=c,c++ --disable-multilib > --target=arm-unknown-linux-gnueabiI can't really comment on your specific problem, but you might try adding --with-build-sysroot to point to your arm headers. You also need to have binutils built for cross ARM as well. If cross binutils is in your path (bins will have arm prefix) you're fine, otherwise you need to specify them at configure too (--with-gnu-ld, --with-gnu-as). I don't know if you need cross gmp or mpfr too. I may be way off-base, but this is part of how I got a cross for SPARC built. Good luck, Luke> > I get the following error: > > exec: 2: -meabi=4: not found > > while assembling ../../../../src/llvm-gcc-4.2/gcc/crtstuff.c > > I found that execution of the command > <llvm-root>/build/x86_64-arm/llvm-gcc-4.2/./gcc/as > > which is part of execution of the command > > <llvm-root>/build/x86_64-arm/llvm-gcc-4.2/./gcc/xgcc > > is the resulting in this error. It turns out that this is a 2 line shell > script that exec's the arguments like thus: > > #!/bin/sh > exec "$@" > > Where is the assembler that needs to be invoked? What do I need to do to > get the configuration find it? > > What am I doing wrong? > > Thanks for any help! > > Bharadwaj > > > ------------------------------------------------------------------------ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Luke Dalessandro wrote:> S. Bharadwaj Yadavalli wrote: >> $ ../../../src/llvm-gcc-4.2/configure >> --prefix=<llvm-root>/install/x86_64-arm/llvm-gcc-4.2 >> --program-prefix=llvm-x86_64-arm >> --enable-llvm=<llvm-root>/install/x86_64-arm/llvm >> --enable-languages=c,c++ --disable-multilib >> --target=arm-unknown-linux-gnueabi > > I can't really comment on your specific problem, but you might try > adding --with-build-sysroot to point to your arm headers. You also need > to have binutils built for cross ARM as well. If cross binutils is in > your path (bins will have arm prefix) you're fine, otherwise you need to > specify them at configure too (--with-gnu-ld, --with-gnu-as). I don't > know if you need cross gmp or mpfr too.Sorry, that should be --with-sysroot. And I guess you don't need gmp or mpfr since you're running it on a system where those exist already. For more info about these configure options see http://gcc.gnu.org/install/configure.html under "Cross-Compiler-Specific Options." Good luck, Luke>> >> Thanks for any help! >> >> Bharadwaj >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev