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

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

--- Comment #13 from Ed Maste <emaste@freebsd.org> ---
I'm using the gcc13 package, and adding -v to my g++13 command line shows the
link invocation as:

 /usr/local/libexec/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0/collect2
-plugin
/usr/local/libexec/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0/liblto_plugin.so
-plugin-opt=/usr/local/libexec/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0/lto-wrapper
-plugin-opt=-fresolution=/tmp//cc3JPuk2.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lpthread
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_eh -m elf_x86_64_fbsd -V -Bstatic -o main_g++
/usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbeginT.o
-L/usr/local/lib/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0
-L/usr/local/lib/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0/../../../../../x86_64-portbld-freebsd14.0/lib
-L/usr/local/lib/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0/../../..
--eh-frame-hdr /tmp//ccQ9SSiv.o -lstdc++ -lm -lgcc -lgcc_eh -lpthread -lc -lgcc
-lgcc_eh /usr/local/lib/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0/crtend.o
/usr/lib/crtn.o

So looks like it should be libstdc++. Perhaps there's a newly-introduced issue,
or a patch that exists only in the ports tree?

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