summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCeleste <20312-Celeste@users.gitlab.alpinelinux.org>2024-08-12 16:06:43 +0000
committerCeleste <20312-Celeste@users.gitlab.alpinelinux.org>2024-09-06 06:13:07 +0000
commit88f2dd8e733391fa18e38ec787d2f6ebfdd91f8c (patch)
tree4a687cbd5eb3cff070030c54202b345ef721e653
parent155f0230356163b0b26450accd956d01fc4e82c8 (diff)
downloadaports-88f2dd8e733391fa18e38ec787d2f6ebfdd91f8c.zip
main/rust: unset some env vars while cross compiling
RUSTFLAGS contains the flag for DT_RELR on x86_64, which is usually silently ignored on archs where it is not supported, but with binutils 2.43, bootstrap.sh fails on loongarch64 due to this. CC/CXX cause Rust to miscompile some crates, as it tries to use the cross compiler to build for $CBUILD.
-rw-r--r--main/rust/APKBUILD3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/rust/APKBUILD b/main/rust/APKBUILD
index 3ed397ed995..f469e8a1dcb 100644
--- a/main/rust/APKBUILD
+++ b/main/rust/APKBUILD
@@ -173,6 +173,9 @@ _unpack_build_dist() {
build() {
if [ "$_build" != "$_target" ]; then
export PKG_CONFIG_ALLOW_CROSS=1
+
+ # Do not carry over toolchain (flags) from $CBUILD.
+ unset RUSTFLAGS CC CXX
fi
# absolutely do not set these here, rust "knows" what it's doing