git: 82d22a88c340 - stable/13 - libgcc_{eh,s}: restore __*_frame_info symbols post llvm18

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sat, 20 Apr 2024 10:35:00 UTC
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=82d22a88c340b83ef47a5499935b6033e898ff58

commit 82d22a88c340b83ef47a5499935b6033e898ff58
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-04-19 21:45:05 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-04-20 10:29:10 +0000

    libgcc_{eh,s}: restore __*_frame_info symbols post llvm18
    
    The upstream llvm commit 5eb44df1b64d made the addition of these GCC
    compatability symbols dependent on build configuration rather than
    hardcoded for amd64, i386, and powerpc.  Reenable them.
    
    Reviewed by:    dim
    Differential Revision:  https://reviews.freebsd.org/D44877
    
    (cherry picked from commit 0b9e3585805e83718c3ebdab923aca51597193cd)
---
 lib/libgcc_eh/Makefile.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc
index 4b93c139522a..9832b1a8c4e5 100644
--- a/lib/libgcc_eh/Makefile.inc
+++ b/lib/libgcc_eh/Makefile.inc
@@ -17,6 +17,9 @@ SRCS_EXC+=	UnwindRegistersSave.S
 SRCS_EXC+=	libunwind.cpp
 
 SRCS+=		${SRCS_EXC}
+.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || ${MACHINE} == "powerpc"
+CFLAGS.UnwindLevel1-gcc-ext.c+=	-D_LIBUNWIND_SUPPORT_FRAME_APIS
+.endif
 .for file in ${SRCS_EXC:M*.c}
 CFLAGS.${file}+=	-fno-exceptions -funwind-tables
 .endfor