Hello!
I'm currently trying to cross-compile the Rust compiler on openSUSE but I'm running into the problem that the build system wants to invoke the cross-gcc compiler with the naming scheme $ARCH-linux-gnu-gcc where ARCH is the target architecture.
However, on openSUSE, the cross-compiler prefix is $ARCH-suse-linux- which is why the build system can't find the cross-compiler although it has been installed.
Does anyone know how to tell Rust's build system to use the proper cross-compile prefix, similar to the CROSS_COMPILE environment variable that the Linux kernel uses?
Configuring the Rust compiler with "--host=$ARCH-suse-linux" doesn't work either.
Thanks, Adrian
On Wednesday 2021-09-29 17:05, John Paul Adrian Glaubitz wrote:
I'm currently trying to cross-compile the Rust compiler on openSUSE but I'm running into the problem that the build system wants to invoke the cross-gcc compiler with the naming scheme $ARCH-linux-gnu-gcc where ARCH is the target architecture.
just don't spend any time on unripe software.
mkdir bin ln -s /usr/bin/$ARCH-suse-linux-gcc bin/$ARCH-linux-gnu-gcc export PATH="$PWD/bin:$PATH"
Hi!
On 9/29/21 17:18, Jan Engelhardt wrote:
On Wednesday 2021-09-29 17:05, John Paul Adrian Glaubitz wrote:
I'm currently trying to cross-compile the Rust compiler on openSUSE but I'm running into the problem that the build system wants to invoke the cross-gcc compiler with the naming scheme $ARCH-linux-gnu-gcc where ARCH is the target architecture.
just don't spend any time on unripe software.
mkdir bin ln -s /usr/bin/$ARCH-suse-linux-gcc bin/$ARCH-linux-gnu-gcc export PATH="$PWD/bin:$PATH"
Thanks! Unfortunately that doesn't get me very far as openSUSE doesn't ship any libraries for cross-development, just the pure toolchain. So trying to build anything else than the kernel or bare-metal stuff fails.
I guess I'm stuck with Debian for these tasks.
Adrian
For targeting mingw-w64 we've been using a custom `config.toml` file under Arch Linux. See https://doc.rust-lang.org/cargo/reference/config.html and https://aur.archlinux.org/cgit/aur.git/tree/mingw-config.toml?h=mingw-w64-ru... for a concrete example. Not sure whether that's the best/easiest way to do it, though.
Best Regards Marius
Am 29.09.21 um 17:05 schrieb John Paul Adrian Glaubitz:
Hello!
I'm currently trying to cross-compile the Rust compiler on openSUSE but I'm running into the problem that the build system wants to invoke the cross-gcc compiler with the naming scheme $ARCH-linux-gnu-gcc where ARCH is the target architecture.
However, on openSUSE, the cross-compiler prefix is $ARCH-suse-linux- which is why the build system can't find the cross-compiler although it has been installed.
I think that's because $ARCH-linux-gnu is the LLVM triple for our distribution, and Rust is assuming that GCC uses the same triple.
Does anyone know how to tell Rust's build system to use the proper cross-compile prefix, similar to the CROSS_COMPILE environment variable that the Linux kernel uses?
Configuring the Rust compiler with "--host=$ARCH-suse-linux" doesn't work either.
Doesn't help you right now, but there are efforts underway to harmonize LLVM triples with GCC triples. (https://reviews.llvm.org/D109727, https://reviews.llvm.org/D109837, and a few others.)
Best regards, Aaron