[Bug target/114839] g++-linked FreeBSD static binaries abort upon exception

2024-04-24 Thread emaste at freebsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114839 --- Comment #4 from Ed Maste --- Thanks - 54568 adds some good context. Based on that I think it may that frame registration calls are not present in the FreeBSD crt bits used for static binaries, which could explain the differences in OSes. We

[Bug target/114839] g++-linked FreeBSD static binaries abort upon exception

2024-04-24 Thread emaste at freebsd dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114839 --- Comment #3 from Ed Maste --- (In reply to Andrew Pinski from comment #2) > Is it the case that unwinder from LLVM needs a .eh_frame_hdr for static > binaries while GCC's libgcc one does not? That's possible, but in the investigation in the

[Bug target/114839] g++-linked FreeBSD static binaries abort upon exception

2024-04-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114839 --- Comment #2 from Andrew Pinski --- Hmm, I wonder why freebsd needs to be different from every most other targets though here: ``` config/alpha/elf.h:#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " config/arc/linux.h:#define LINK_

[Bug target/114839] g++-linked FreeBSD static binaries abort upon exception

2024-04-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114839 --- Comment #1 from Andrew Pinski --- >From gcc/config/freebsd.h: #if defined(HAVE_LD_EH_FRAME_HDR) #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " #endif The !static part comes from r0-95899-g2208d2ac9546de .