gcc15: fix build on aarch64-darwin (#461497)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
--- a/libgcc/config.host
|
||||
+++ b/libgcc/config.host
|
||||
@@ -239,7 +239,7 @@ case ${host} in
|
||||
@@ -239,8 +239,8 @@ case ${host} in
|
||||
x86_64-*-darwin2[0-2]*)
|
||||
tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file"
|
||||
;;
|
||||
- *-*-darwin2*)
|
||||
- tmake_file="t-darwin-min-11 $tmake_file"
|
||||
+ *-*-darwin2* | *-*-darwin)
|
||||
tmake_file="t-darwin-min-11 $tmake_file"
|
||||
+ tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file"
|
||||
;;
|
||||
*-*-darwin1[89]*)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/libgcc/config/t-slibgcc-darwin
|
||||
+++ b/libgcc/config/t-slibgcc-darwin
|
||||
@@ -139,8 +139,7 @@ libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
|
||||
$(CC) -arch $${arch} -nodefaultlibs -dynamiclib -nodefaultrpaths \
|
||||
-o libgcc_s.1$(SHLIB_EXT)_T_$${mlib} \
|
||||
-Wl,-reexport_library,libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T_$${mlib} \
|
||||
-lSystem \
|
||||
- -Wl,-reexported_symbols_list,$(srcdir)/config/darwin-unwind.ver \
|
||||
-install_name $(SHLIB_RPATH)/libgcc_s.1.dylib \
|
||||
-compatibility_version 1 -current_version 1.1 ; \
|
||||
done
|
||||
@@ -160,13 +160,14 @@ optionals noSysDirs (
|
||||
|
||||
## Darwin
|
||||
|
||||
# Fixes detection of Darwin on x86_64-darwin. Otherwise, GCC uses a deployment target of 10.5, which crashes ld64.
|
||||
# Fixes detection of Darwin on x86_64-darwin and aarch64-darwin. Otherwise, GCC uses a deployment target of 10.5, which crashes ld64.
|
||||
++ optional (is14 && stdenv.hostPlatform.isDarwin) ../patches/14/libgcc-darwin-detection.patch
|
||||
++ optional (atLeast15 && stdenv.hostPlatform.isDarwin) ../patches/15/libgcc-darwin-detection.patch
|
||||
|
||||
# Fix libgcc_s.1.dylib build on Darwin 11+ by not reexporting unwind symbols that don't exist
|
||||
++ optional (
|
||||
is14 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
|
||||
) ../patches/14/libgcc-darwin-detection.patch
|
||||
++ optional (
|
||||
atLeast15 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
|
||||
) ../patches/15/libgcc-darwin-detection.patch
|
||||
atLeast15 && stdenv.hostPlatform.isDarwin
|
||||
) ../patches/15/libgcc-darwin-fix-reexport.patch
|
||||
|
||||
# Fix detection of bootstrap compiler Ada support (cctools as) on Nix Darwin
|
||||
++ optional (stdenv.hostPlatform.isDarwin && langAda) ./ada-cctools-as-detection-configure.patch
|
||||
|
||||
Reference in New Issue
Block a user