I am in the process of cross compiling with clang for arm/aarch/i686 on ubuntu. Using the following command:
./configure --build=x86_64-linux-gnu --host=arm-ubuntu-linux-gnueabi
CC=/home/rsch-jr-005/Documents/llvm/llvm-project/build/bin/clang
'CFLAGS=--target=arm-ubuntu-linux-gnueabi --gcc-toolchain=/home/rsch-jr/x-tools//arm-ubuntu-linux-gnueabi
-isysroot /home/rsch-jr/x-tools//arm-ubuntu-linux-gnueabi/arm-ubuntu-linux-gnueabi/sysroot
-isystem /home/rsch-jr/x-tools//arm-ubuntu-linux-gnueabi/arm-ubuntu-linux-gnueabi/sysroot/usr/include
-I/home/rsch-jr/x-tools//arm-ubuntu-linux-gnueabi/arm-ubuntu-linux-gnueabi/sysroot/usr/include
-g -fno-var-tracking -O0 -fcommon' 'LD=/home/rsch-jr-005/Documents/llvm/llvm-project/build/lib/LLVMgold.so
LDFLAGS=-fuse-ld=gold' AR=llvm-ar RANLIB=llvm-ranlib NM=llvm-nm
I get the following:
configure: error: in `/home/rsch-jr/Documents/compile_dest/cflow-1.7':
configure: error: C compiler cannot create executables
See `config.log' for more details
and when I check config.log I find this:
/home/rsch-jr/x-tools/arm-ubuntu-linux-gnueabi/bin/arm-ubuntu-linux-gnueabi-ld.gold: error: cannot open crt1.o: No such file or directory
/home/rsch-jr/x-tools/arm-ubuntu-linux-gnueabi/bin/arm-ubuntu-linux-gnueabi-ld.gold: error: cannot open crti.o: No such file or directory
/home/rsch-jr/x-tools/arm-ubuntu-linux-gnueabi/bin/arm-ubuntu-linux-gnueabi-ld.gold: error: cannot open crtn.o: No such file or directory
I have tried installing gcc-multilib
as well as
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
I’m using crosstool-ng for toolchain generation, and the ct-ng toolchain also has all the crt files in the included sysroot