diff options
Diffstat (limited to 'devel/llvm-cheri/files')
-rw-r--r-- | devel/llvm-cheri/files/wrapper-cheri.sh.in | 10 | ||||
-rw-r--r-- | devel/llvm-cheri/files/wrapper-cheriot.sh.in | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/devel/llvm-cheri/files/wrapper-cheri.sh.in b/devel/llvm-cheri/files/wrapper-cheri.sh.in index 113aacf20a5a..dd817858326f 100644 --- a/devel/llvm-cheri/files/wrapper-cheri.sh.in +++ b/devel/llvm-cheri/files/wrapper-cheri.sh.in @@ -144,6 +144,8 @@ if [ $CHERIBSD_VERSION -gt 0 ]; then tls_flags= vararg_flags= codeptr_flags= + capreloc_cflags= + capreloc_ldflags= if [ "$CHERIBSD_VERSION" -le 20220314 ]; then tls_flags="-femulated-tls" elif [ "$CHERIBSD_VERSION" -le 20220828 ]; then @@ -153,6 +155,10 @@ if [ $CHERIBSD_VERSION -gt 0 ]; then else vararg_flags="-Xclang -morello-vararg=new -Xclang -morello-bounded-memargs" fi + if [ "$CHERIBSD_VERSION" -ge 20250127 ]; then + capreloc_cflags="-Wl,--local-caprelocs=elf" + capreloc_ldflags="--local-caprelocs=elf" + fi if [ "$CHERIBSD_VERSION" -gt 20250127 ]; then codeptr_flags=-cheri-codeptr-relocs fi @@ -160,8 +166,8 @@ if [ $CHERIBSD_VERSION -gt 0 ]; then # consume -Xclang arguments which can lead to unused # argument warnings so we supress them with # --start/end-no-unused-arguments. - arch_cflags="-march=morello -mabi=purecap --start-no-unused-arguments $tls_flags $vararg_flags $codeptr_flags --end-no-unused-arguments" - arch_ldflags="$codeptr_flags" + arch_cflags="-march=morello -mabi=purecap --start-no-unused-arguments $tls_flags $vararg_flags $capreloc_cflags $codeptr_flags --end-no-unused-arguments" + arch_ldflags="$capreloc_ldflags $codeptr_flags" arch_objdump_flags="--mattr=+morello" else vararg_flags= diff --git a/devel/llvm-cheri/files/wrapper-cheriot.sh.in b/devel/llvm-cheri/files/wrapper-cheriot.sh.in deleted file mode 100644 index cb2d8b10ac77..000000000000 --- a/devel/llvm-cheri/files/wrapper-cheriot.sh.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -LLVM_PREFIX="%%LLVM_PREFIX%%" -LLVM_SUFFIX="%%LLVM_SUFFIX%%" - -tool=$(/bin/realpath $0) -tool=${tool##*/} -tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}" -LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \ - exec "${tool}" "${@}" |