From 19c8df97230ff59a0ad8bec8713e70fd0158f2db Mon Sep 17 00:00:00 2001 From: Domagoj Stolfa Date: Wed, 5 Jun 2024 17:57:29 +0100 Subject: [PATCH 1/2] libgcc_s: Only pass -D_LIBUNWIND_SANDBOX_OTYPES on aarch64. --- lib/libgcc_s/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile index d1f96c21b822..0d3fb503d6df 100644 --- a/lib/libgcc_s/Makefile +++ b/lib/libgcc_s/Makefile @@ -53,7 +53,10 @@ SRCS+= s_logbl.c SRCS+= s_scalbnl.c .endif +# LIBUNWIND_SANDBOX_OTYPES is only supported on aarch64 (Morello). +.if ${MACHINE_ABI:Mpurecap} && ${MACHINE_CPUARCH} == "aarch64" SYMBOL_MAPS+= ${.CURDIR}/Symbol-c18n.map CFLAGS+= -D_LIBUNWIND_SANDBOX_OTYPES -D_LIBUNWIND_SANDBOX_HARDENED +.endif .include From ea5851b82109fc4a4ddb5c2dbf166354512b76b7 Mon Sep 17 00:00:00 2001 From: Domagoj Stolfa Date: Thu, 6 Jun 2024 11:56:16 +0100 Subject: [PATCH 2/2] rtld-elf: Remove unnecessary parentheses in the Makefile. --- libexec/rtld-elf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 7c15898d7e65..35301f99c8e6 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -29,7 +29,7 @@ MK_UBSAN= no .include -.if (${MACHINE_ABI:Mpurecap} && ${MACHINE_CPUARCH} == "aarch64") +.if ${MACHINE_ABI:Mpurecap} && ${MACHINE_CPUARCH} == "aarch64" RTLD_SANDBOX= .endif