[Bug 278551] lang/gcc: exceptions do not work in statically linked binaries

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 24 Apr 2024 17:28:48 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278551

--- Comment #6 from Ed Maste <emaste@freebsd.org> ---
If I link using Clang as the compiler driver (using either the ld.lld default,
or ld.bfd) it works. The linker command line in the bfd case is:

"/usr/local/bin/ld.bfd" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1
--hash-style=both --enable-new-dtags -o static-except /usr/lib/crt1.o
/usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib static-except.o -lc++ -lm -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/crtend.o /usr/lib/crtn.o

On a quick look it appears GCC fails to pass `--eh-frame-header`

-- 
You are receiving this mail because:
You are the assignee for the bug.