Skip to content

Commit

Permalink
libunwind: Fix build for amd64 using CHERI LLVM
Browse files Browse the repository at this point in the history
The change in upstream commit 0b9e358
only applies to LLVM 18 and later.  Defining the macro on the command
line raises a -Wmacro-redefined error when using older libunwind
versions.
  • Loading branch information
bsdjhb committed Aug 9, 2024
1 parent 181d042 commit 625e214
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/libgcc_eh/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ SRCS_EXC+= UnwindRegistersSave.S
SRCS_EXC+= libunwind.cpp

SRCS+= ${SRCS_EXC}
.if ${LIBUNWIND_VERSION} >= 18
.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || ${MACHINE} == "powerpc"
CFLAGS.UnwindLevel1-gcc-ext.c+= -D_LIBUNWIND_SUPPORT_FRAME_APIS
.endif
.endif
.for file in ${SRCS_EXC:M*.c}
CFLAGS.${file}+= -fno-exceptions -funwind-tables
.if ${MK_ASAN} != "no"
Expand Down

0 comments on commit 625e214

Please sign in to comment.