Skip to content

Commit 86e1b39

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 cf80cea commit 86e1b39

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
@@ -1120,7 +1120,16 @@ build_single_target() {
11201120
# it requires manually installing package `libclang-rt-17-dev`.
11211121
elif [ "${_OS}" = 'linux' ] && [ "${_DISTRO}" = 'debian' ]; then
11221122
if [ "${unamem}" = "${_machine}" ] || [ -d 'my-pkg/usr/lib/clang' ]; then
1123-
_CCRT='clang-rt'
1123+
# FIXME: This combination fails to link with clang-rt, due to:
1124+
# ld.lld-17: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol '__global_pointer$'; recompile with -fPIC
1125+
# >>> defined in /usr/riscv64-linux-gnu/lib/Scrt1.o
1126+
# >>> referenced by /usr/riscv64-linux-gnu/lib/Scrt1.o:(.text+0x2C)
1127+
# Our workaround is to fall back to gcc parts for this.
1128+
if [ "${_CRT}" = 'gnu' ] && [ "${_CPU}" = 'r64' ]; then
1129+
:
1130+
else
1131+
_CCRT='clang-rt'
1132+
fi
11241133
fi
11251134
fi
11261135
fi

0 commit comments

Comments
 (0)