<div dir="ltr">HiĀ <div><br></div><div>I am using the newest version of llvm and clang-7. Now I am try to build a test.c into a binary. I am doing cross compile and the host is x86_64 while the target is arm.</div><div><br></div><div>I use the following command.</div><div><br></div><div>sudo /home/jmh/Downloads/llvm/build/bin/clang --sysroot=/home/jmh/Downloads/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc --gcc-toolchain=/home/jmh/Downloads/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabi/lib/gcc/arm-linux-gnueabi/ -target arm-linux-gnueabi -fuse-ld=lld -L/home/jmh/Downloads/llvm/build/lib --rtlib=compiler-rt -o test test.c<br></div><div><br></div><div>However, I received the following exception.</div><div><br></div><div><div>/home/jmh/Downloads/llvm/build/bin/ld.lld: error: cannot open crtbegin.o: No such file or directory</div><div>/home/jmh/Downloads/llvm/build/bin/ld.lld: error: cannot open /home/jmh/Downloads/llvm/build/lib/clang/7.0.0/lib/linux/libclang_rt.builtins-arm.a: No such file or directory</div><div>/home/jmh/Downloads/llvm/build/bin/ld.lld: error: cannot open /home/jmh/Downloads/llvm/build/lib/clang/7.0.0/lib/linux/libclang_rt.builtins-arm.a: No such file or directory</div><div>/home/jmh/Downloads/llvm/build/bin/ld.lld: error: cannot open crtend.o: No such file or directory</div><div>clang-7: error: linker command failed with exit code 1 (use -v to see invocation)</div></div><div><br></div><div>Does anyone know the reason or solution? Many Thanks</div><div><br></div><div>Regards</div><div>Muhui</div></div>