diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2025-07-15 23:25:08 +0100 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2025-07-15 23:25:08 +0100 |
commit | 47cd009b4403cee2f8fd55e5394db45c9e4bfbfc (patch) | |
tree | c46cf722625348e6607d367b887cc5900c92e538 | |
parent | math/py-igraph: 0.11.9 update, fixes libxml2 use (diff) |
llvm-{cheri,morello}: use ELF capabiltiy relocations
This corresponds to CheriBSD commit c7bb34a499c7 and may have impacted
the build of static binaries for Morello.
Sponsored by: DARPA, AFRL
-rw-r--r-- | devel/llvm-cheri/Makefile | 2 | ||||
-rw-r--r-- | devel/llvm-cheri/files/wrapper-cheri.sh.in | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/devel/llvm-cheri/Makefile b/devel/llvm-cheri/Makefile index d9f5bdcf55e1..afb8aa7ee371 100644 --- a/devel/llvm-cheri/Makefile +++ b/devel/llvm-cheri/Makefile @@ -1,6 +1,6 @@ PORTNAME= llvm PORTVERSION= ${LLVM_MAJOR}.0.d${SNAPDATE} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= devel lang PKGNAMESUFFIX= ${LLVM_SUFFIX} diff --git a/devel/llvm-cheri/files/wrapper-cheri.sh.in b/devel/llvm-cheri/files/wrapper-cheri.sh.in index 113aacf20a5a..5e69eafb4638 100644 --- a/devel/llvm-cheri/files/wrapper-cheri.sh.in +++ b/devel/llvm-cheri/files/wrapper-cheri.sh.in @@ -144,6 +144,7 @@ if [ $CHERIBSD_VERSION -gt 0 ]; then tls_flags= vararg_flags= codeptr_flags= + capreloc_flags= if [ "$CHERIBSD_VERSION" -le 20220314 ]; then tls_flags="-femulated-tls" elif [ "$CHERIBSD_VERSION" -le 20220828 ]; then @@ -153,6 +154,9 @@ 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_flags="-Wl,--local-caprelocs=elf" + fi if [ "$CHERIBSD_VERSION" -gt 20250127 ]; then codeptr_flags=-cheri-codeptr-relocs fi @@ -160,8 +164,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_flags $codeptr_flags --end-no-unused-arguments" + arch_ldflags="$capreloc_flags $codeptr_flags" arch_objdump_flags="--mattr=+morello" else vararg_flags= |