$ FREEBSD_SYSROOT_CC=clang13 /usr/local/freebsd-sysroot/riscv64/bin/cc test.c ld: error: test.c:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax On riscv64 base clang defaults to -mno-relax (per D25210). This patch has not been applied to ports LLVM. In the wrapper scripts pass -mno-relax explicitly to make it work as expected when FREEBSD_SYSROOT_CC is set to ports clang.
4 lines
221 B
Bash
4 lines
221 B
Bash
#!/bin/sh
|
|
: ${FREEBSD_SYSROOT_CC:="%%FREEBSD_SYSROOT_CC%%"}
|
|
: ${FREEBSD_SYSROOT:="%%FREEBSD_SYSROOT%%"}
|
|
exec "${FREEBSD_SYSROOT_CC}" --sysroot="${FREEBSD_SYSROOT}" --target=%%FREEBSD_SYSROOT_LLVM_TRIPLE%% -mno-relax "$@"
|