aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2025-01-28 18:36:16 +0100
committerGerald Pfeifer <gerald@pfeifer.com>2025-02-08 17:36:36 +0100
commit06e5b0b4a244090abfea333d91fc5963292cb41d (patch)
tree110580882399cbe904be600ba4f925f5d67d47f9 /libgcc
parent6312165650091a4df34668d8e2aaa0bbc4008a66 (diff)
downloadgcc-06e5b0b4a244090abfea333d91fc5963292cb41d.zip
gcc-06e5b0b4a244090abfea333d91fc5963292cb41d.tar.gz
gcc-06e5b0b4a244090abfea333d91fc5963292cb41d.tar.bz2
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>
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config.host2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/config.host b/libgcc/config.host
index 8930081..6a88ee5 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -292,7 +292,7 @@ case ${host} in
# machine-specific sections may refine and add to this
# configuration.
tmake_file="$tmake_file t-freebsd t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtbeginT.o crtendS.o"
case ${target_thread_file} in
posix)
tmake_file="${tmake_file} t-freebsd-thread"