Skip to content

Commit 0ab61b3

Browse files
committed
arch/riscv64: raise the baseline to rva20u64 ...
... when Rust LTO is enabled to workaround a behavior change in LLVM 20 where the default baseline does not have +a
1 parent 90f487f commit 0ab61b3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

arch/riscv64.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ if ! bool "$USECLANG" && [ "$(echo __GNUC__ | $CC -E -xc - | tail -n 1)" -ge 14
77
CFLAGS_COMMON_ARCH=('-mno-omit-leaf-frame-pointer')
88
fi
99
LDFLAGS_COMMON_CROSS=('-Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link' '-Wl,/var/ab/cross-root/riscv64/usr/lib' '-L/var/ab/cross-root/riscv64/usr/lib')
10-
# FIXME: Since Rustc 1.88 (built against LLVM 20), RISC-V executables
11-
# would fail to link due to missing -latomic symbols.
12-
#
13-
# This may be an upstream issue.
14-
RUSTFLAGS_COMMON_ARCH=('-Clink-arg=-mabi=lp64d' '-Clink-arg=-latomic')
15-
RUSTFLAGS_COMMON_ARCH_LTO=("${RUSTFLAGS_COMMON_ARCH[@]}" '-Clink-arg=-Wl,-mllvm=-mattr=+d' '-Clink-arg=-latomic')
10+
RUSTFLAGS_COMMON_ARCH=("-Clink-arg=-mabi=lp64d")
11+
RUSTFLAGS_COMMON_ARCH_LTO=("${RUSTFLAGS_COMMON_ARCH[@]}" '-Clink-arg=-Wl,-mllvm=-mattr=+rva20u64')

0 commit comments

Comments
 (0)