diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2021-11-09 13:21:20 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2021-11-13 09:08:42 +0000 |
commit | 3dd789ff4ac3db21c9fde387acd5ba832989380a (patch) | |
tree | 083c12d0f762054dbbc3025c3d919803fc5e678e /devel | |
parent | 05a2889361359ff6fd56d0f1dadc920df1c7d49f (diff) | |
download | ports-3dd789ff4ac3db21c9fde387acd5ba832989380a.tar.gz ports-3dd789ff4ac3db21c9fde387acd5ba832989380a.zip |
devel/freebsd-sysroot: Add -mno-relax to the riscv64 wrapper scripts
$ 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.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/freebsd-sysroot/Makefile | 2 | ||||
-rw-r--r-- | devel/freebsd-sysroot/files/riscv64-c++.in | 4 | ||||
-rw-r--r-- | devel/freebsd-sysroot/files/riscv64-cc.in | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/devel/freebsd-sysroot/Makefile b/devel/freebsd-sysroot/Makefile index 151257f4b7fd..cae92c98e281 100644 --- a/devel/freebsd-sysroot/Makefile +++ b/devel/freebsd-sysroot/Makefile @@ -1,5 +1,5 @@ PORTNAME= freebsd-sysroot -DISTVERSION= a2021-09-14 +DISTVERSION= a2021-11-09 CATEGORIES= devel MASTER_SITES= LOCAL/tobik:${FLAVOR} \ ${_SYSROOT_DIST:@f@https://download.freebsd.org/ftp/$f?dummy=/:${FLAVOR}@} diff --git a/devel/freebsd-sysroot/files/riscv64-c++.in b/devel/freebsd-sysroot/files/riscv64-c++.in new file mode 100644 index 000000000000..6148593cb1b0 --- /dev/null +++ b/devel/freebsd-sysroot/files/riscv64-c++.in @@ -0,0 +1,4 @@ +#!/bin/sh +: ${FREEBSD_SYSROOT_CXX:="%%FREEBSD_SYSROOT_CXX%%"} +: ${FREEBSD_SYSROOT:="%%FREEBSD_SYSROOT%%"} +exec "${FREEBSD_SYSROOT_CXX}" --sysroot="${FREEBSD_SYSROOT}" --target=%%FREEBSD_SYSROOT_LLVM_TRIPLE%% --stdlib=libc++ -mno-relax "$@" diff --git a/devel/freebsd-sysroot/files/riscv64-cc.in b/devel/freebsd-sysroot/files/riscv64-cc.in new file mode 100644 index 000000000000..8777c34d30f3 --- /dev/null +++ b/devel/freebsd-sysroot/files/riscv64-cc.in @@ -0,0 +1,4 @@ +#!/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 "$@" |