[Bug libgcc/118685] FreeBSD static executables segfault due to libgcc missing crtbeginT.o
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 20 15:11:02 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Gerald Pfeifer
<gerald@gcc.gnu.org>:
https://gcc.gnu.org/g:23541b23deb5504c6d3c0a3e96a0858e10c3c627
commit r12-10960-g23541b23deb5504c6d3c0a3e96a0858e10c3c627
Author: Dimitry Andric <dimitry@andric.com>
Date: Tue Jan 28 18:36:16 2025 +0100
libgcc: On FreeBSD use GCC's crt objects for static linking
Add crtbeginT.o to extra_parts on FreeBSD. This ensures we use GCC's
crt objects for static linking. Otherwise it could mix crtbeginT.o
from the base system with libgcc's crtend.o, possibly leading to
segfaults.
libgcc:
PR target/118685
* config.host (*-*-freebsd*): Add crtbeginT.o to extra_parts.
Signed-off-by: Dimitry Andric <dimitry@andric.com>
More information about the Gcc-bugs
mailing list