Skip to content

Commit

Permalink
lib: Adapt c18n build options to updated libunwind
Browse files Browse the repository at this point in the history
The option has been renamed and should also work just fine for
libgcc_eh.a, not just libgcc_s.so.1. It's not very useful as it will
just use the stubs, but it keeps the configuration consistent between
static and dynamic libraries, and matches what libunwind's build system
will do. In theory with sub-library (really sub-object) compartments one
could also embed enough of the c18n runtime in libc.a to support
compartmentalising static binaries so it's not a completely stupid
configuration to have and we might as well leave the infrastructure in
to support it whenever it's easy to do so.
  • Loading branch information
jrtc27 committed Dec 10, 2024
1 parent 10a0b7b commit 16c471b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
3 changes: 3 additions & 0 deletions lib/libgcc_eh/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ SRCS+= ${SRCS_EXC}
CFLAGS.UnwindLevel1-gcc-ext.c+= -D_LIBUNWIND_SUPPORT_FRAME_APIS
.endif
.endif
.if ${MACHINE_ABI:Mpurecap} && ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -D_LIBUNWIND_HAS_CHERI_LIB_C18N
.endif
.for file in ${SRCS_EXC:M*.c}
CFLAGS.${file}+= -fno-exceptions -funwind-tables
.if ${MK_ASAN} != "no"
Expand Down
5 changes: 0 additions & 5 deletions lib/libgcc_s/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,4 @@ SRCS+= s_logbl.c
SRCS+= s_scalbnl.c
.endif

.if ${MACHINE_ABI:Mpurecap} && ${MACHINE_CPUARCH} == "aarch64"
SYMBOL_MAPS+= ${.CURDIR}/Symbol-c18n.map
CFLAGS+= -D_LIBUNWIND_CHERI_C18N_SUPPORT
.endif

.include <bsd.lib.mk>
5 changes: 0 additions & 5 deletions lib/libgcc_s/Symbol-c18n.map

This file was deleted.

0 comments on commit 16c471b

Please sign in to comment.