Hello everybody, I met a problem when cross compiling for RISC-V in Clang.
''' /home/test# /home/git/rvv-llvm/build/bin/clang++ --target=riscv64-unknown-linux-gnu --sysroot=/home/RISCV/sysroot/ -I /home/RISCV/riscv64-unknown-linux-gnu/include/c++/9.2.0/ -I /home/RISCV/riscv64-unknown-linux-gnu/include/c++/9.2.0/riscv64-unknown-linux-gnu/ -L /home/RISCV/lib/gcc/riscv64-unknown-linux-gnu/9.2.0/ test.cpp /home/RISCV/bin/riscv64-unknown-linux-gnu-ld: cannot find crtbegin.o: No such file or directory clang-11: error: linker command failed with exit code 1 (use -v to see invocation) ''' The file "crtbegin.o" is actually in the directory added by the -L option. ''' /home/RISCV# find . -name "crtbegin.o" ./lib/gcc/riscv64-unknown-linux-gnu/9.2.0/crtbegin.o ''' I finally add a soft link of the file to finish compiling. But do you know why ld cannot find it? sincerely, Yin _______________________________________________ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users