Hi,
我尝试用 LoongArch 的 GCC 进行 Rust 交叉编译,但是碰到了一个问题,目前没有排查的思路,只怀疑可能是没有用到正确的 `ld`,所以想来咨询一下看看有没有人能帮忙一起看一下?
error: linking with `/home/user/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2/bin/loongarch64-linux-gnu-gcc` failed: exit status: 1
error: linking with failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/user/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2/bin:/home/user/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/sbin:/sbin:/usr/sbin:/sbin" VSLANG="1033" "/home/user/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2/bin/loongarch64-linux-gnu-gcc" "/tmp/rustc3irSoq/symbols.o" "/home/user/lsd/target/loongarch64-unknown-linux-gnu/release/deps/lsd-de6b4cc0c44ff017.lsd.b2f852920b4b9a40-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/user/lsd/target/loongarch64-unknown-linux-gnu/release/deps" "-L" "/home/user/lsd/target/release/deps" "-L" "/home/user/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.2/lib" "-L" "/home/user/lsd/target/loongarch64-unknown-linux-gnu/release/build/libgit2-sys-7ece6c6c66017dc5/out/build" "-L" "/home/user/lsd/target/loongarch64-unknown-linux-gnu/release/build/libz-sys-1e3858a7f80a6a52/out/lib" "-L" "/home/user/lsd/target/loongarch64-unknown-linux-gnu/release/build/libz-sys-1e3858a7f80a6a52/out/lib" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/loongarch64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustc3irSoq/liblibgit2_sys-fe62b557e6a83ec0.rlib" "/tmp/rustc3irSoq/liblibz_sys-fb4de448c8371a96.rlib" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/loongarch64-unknown-linux-gnu/lib/libcompiler_builtins-3a698325023e3882.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/loongarch64-unknown-linux-gnu/lib" "-o" "/home/user/lsd/target/loongarch64-unknown-linux-gnu/release/deps/lsd-de6b4cc0c44ff017" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs"
= note: collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped