libgcc_s: Add a linker script to link to libgcc

When using outline atomics on arm64 the compiler will create a call to
a function that performs the atomic operation. This allows us to use
the fastest operation depending on the hardware.

As these functions are implemented in libgcc create a linker script
so libraries that link against libgcc_s will include libgcc to pull
them in.

Reviewed by:	imp, jhb
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45268
This commit is contained in:
Andrew Turner
2026-04-27 11:54:18 +01:00
parent b5bad6df46
commit e63eee84ca
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@ PACKAGE= clibs
SHLIB_NAME= libgcc_s.so.1 SHLIB_NAME= libgcc_s.so.1
SHLIBDIR?= /lib SHLIBDIR?= /lib
SHLIB_LDSCRIPT=libgcc_s.ldscript
# Enabling UBSan triggers "undefined reference to vtable for __cxxabiv1::__function_type_info" # Enabling UBSan triggers "undefined reference to vtable for __cxxabiv1::__function_type_info"
MK_UBSAN:= no MK_UBSAN:= no
+1
View File
@@ -0,0 +1 @@
GROUP ( @@SHLIB@@ @@LIBDIR@@/libgcc.a )