Skip to content

Commit 0fd6f10

Browse files
committed
Revert "_build.sh: drop workaround for clang-rt on riscv64 linking issue"
This reverts commit 13c7de8. This isn't resolved in trixie or testing: https://github.com/curl/curl-for-win/actions/runs/17181424023/job/48744299228#step:3:6459 Seem in these two jobs: linux-glibc-debian-testing-llvm (this is pretty much the same as trixie at the time of this commit linux-glibc-debian-trixie-llvm
1 parent 0f61482 commit 0fd6f10

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

_build.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,16 @@ build_single_target() {
10941094
# it requires manually installing package `libclang-rt-17-dev`.
10951095
elif [ "${_OS}" = 'linux' ] && [ "${_DISTRO}" = 'debian' ]; then
10961096
if [ "${unamem}" = "${_machine}" ] || [ -d 'my-pkg/usr/lib/clang' ]; then
1097-
_CCRT='clang-rt'
1097+
# FIXME: This combination fails to link with clang-rt, due to:
1098+
# ld.lld-17: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol '__global_pointer$'; recompile with -fPIC
1099+
# >>> defined in /usr/riscv64-linux-gnu/lib/Scrt1.o
1100+
# >>> referenced by /usr/riscv64-linux-gnu/lib/Scrt1.o:(.text+0x2C)
1101+
# Our workaround is to fall back to gcc parts for this.
1102+
if [ "${_CRT}" = 'gnu' ] && [ "${_CPU}" = 'r64' ]; then
1103+
:
1104+
else
1105+
_CCRT='clang-rt'
1106+
fi
10981107
fi
10991108
fi
11001109
fi

0 commit comments

Comments
 (0)