File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1094,7 +1094,16 @@ build_single_target() {
1094
1094
# it requires manually installing package `libclang-rt-17-dev`.
1095
1095
elif [ " ${_OS} " = ' linux' ] && [ " ${_DISTRO} " = ' debian' ]; then
1096
1096
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
1098
1107
fi
1099
1108
fi
1100
1109
fi
You can’t perform that action at this time.
0 commit comments