Closed th0ma7 closed 11 months ago
It's a little unclear to me why you filed this as a rustup issue, it seems more like rust-lang/rust issue?
It's a little unclear to me why you filed this as a rustup issue, it seems more like rust-lang/rust issue?
Yes, as I already replied on Discord:
I don't think you should file that issue in Rustup... Rather, you can try to transfer that issue to Rust.
I think it's appropriate to close this issue now for archiving purposes, and the discussion on this issue should be redirected to https://github.com/rust-lang/rust/issues/117361.
Problem
Long-story short, maintainer for SynoCommunity which provides opensource package for using on Synology Linux based NAS.
in order for some of our packages to work out on Synology popwerpc
qoriq
I require to usepowerpc-linux-gnuspe
as otherwise resulting binaries do not work.Using https://github.com/SynoCommunity/spksrc framwork along with associated Synology toolchain for this specifc arch I was able to build a stage1 compiler. The hope is then, using this stage1 build, to enable full support for the gnuspe variant.
It occurs that using the default Synology gcc cross-compiler I'm able to get close to the finish line but ends-up failing at
rustc_llvm v0.0.0
:So I tried using an alternative option with clang and proper arch parameters
-mcpu=e500v2 -mhard-float --sysroot=<mysysrootpath>
but it fails a little earlier than with gcc at libffi:Steps
$(RUST_TARGET)
ispowerpc-unknown-linux-gnuspe
:installed toolchains
stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu powerpc-stage1
active toolchain
nightly-x86_64-unknown-linux-gnu (directory override for '/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4') rustc 1.75.0-nightly (7adc89b69 2023-11-07)
rustup override set nightly info: using existing install for 'nightly-x86_64-unknown-linux-gnu' info: override toolchain for '/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4' set to 'nightly-x86_64-unknown-linux-gnu'
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.75.0-nightly (7adc89b69 2023-11-07)
(cd /home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust && PATH="/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin:${PATH}" POWERPC_UNKNOWN_LINUX_GNUSPE_OPENSSL_DIR=/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/../../../toolkit/syno-qoriq-6.2.4/work/usr/ TARGET_CFLAGS="-mcpu=8548 -mhard-float -mfloat-gprs=double --sysroot=/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/powerpc-e500v2-linux-gnuspe/sysroot" RUST_BACKTRACE=full cargo +powerpc-stage1 build -Zbuild-std=core,alloc --target powerpc-unknown-linux-gnuspe) Compiling compiler_builtins v0.1.103 Compiling core v0.0.0 (/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/src/rust/library/core) Compiling proc-macro2 v1.0.63 ... Compiling libffi-sys v2.3.0 Compiling rustversion v1.0.12 Compiling either v1.8.1 Compiling mime v0.3.17 Compiling itertools v0.10.5 Compiling libm v0.2.7 Compiling clippy v0.1.75 (/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/src/tools/clippy) Compiling rustc_llvm v0.0.0 (/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/compiler/rustc_llvm) Compiling curl v0.4.44 Compiling miri v0.1.0 (/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/src/tools/miri) error: failed to run custom build command for
rustc_llvm v0.0.0 (/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/compiler/rustc_llvm)
Caused by: process didn't exit successfully:
/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust/target/debug/build/rustc_llvm-b45326f0c9a9f4b3/build-script-build
(exit status: 101) --- stdout ...