Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685
This ensures that gcc uses its own crt objects for static linking. Otherwise, it could mix the base system's crtbeginT.o with libgcc's crtend.o, leading to possible segfaults. Signed-off-by: Dimitry Andric <dimi...@andric.com> --- libgcc/config.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/config.host b/libgcc/config.host index 8930081069e..6a88ee5a2dd 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" -- 2.48.1