Skip to content

Commit 49b6d3a

Browse files
committed
arch/riscv64.sh: specify -mllvm -mattr=+rva20u64 to fix Clang + LTO linkage
Whilst building Zig 0.15.2: Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) Append `-mattr=' to specify ABI target.
1 parent 419d732 commit 49b6d3a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv64.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
if ! bool "$USECLANG" && [ "$(echo __GNUC__ | $CC -E -xc - | tail -n 1)" -ge 14 ]; then
77
CFLAGS_COMMON_ARCH=('-mno-omit-leaf-frame-pointer')
88
fi
9+
CXXFLAGS_CLANG_ARCH=('-mllvm' '-mattr=+rva20u64')
910
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')
1011
RUSTFLAGS_COMMON_ARCH=("-Clink-arg=-mabi=lp64d")
1112
RUSTFLAGS_COMMON_ARCH_LTO=("${RUSTFLAGS_COMMON_ARCH[@]}" '-Clink-arg=-Wl,-mllvm=-mattr=+rva20u64')

0 commit comments

Comments
 (0)