gnat13: fix build on x86_64-darwin

+22 -1
+4 -1
pkgs/development/compilers/gcc/patches/default.nix
··· 128 ++ optional (atLeast12 && stdenv.isDarwin && langAda) ./ada-cctools-as-detection-configure.patch 129 130 # Use absolute path in GNAT dylib install names on Darwin 131 - ++ optional (atLeast12 && stdenv.isDarwin && langAda) ./gnat-darwin-dylib-install-name.patch 132 133 # We only apply this patch when building a native toolchain for aarch64-darwin, as it breaks building 134 # a foreign one: https://github.com/iains/gcc-12-branch/issues/18
··· 128 ++ optional (atLeast12 && stdenv.isDarwin && langAda) ./ada-cctools-as-detection-configure.patch 129 130 # Use absolute path in GNAT dylib install names on Darwin 131 + ++ optionals (stdenv.isDarwin && langAda) ({ 132 + "13" = [ ./gnat-darwin-dylib-install-name-13.patch ]; 133 + "12" = [ ./gnat-darwin-dylib-install-name.patch ]; 134 + }.${majorVersion} or []) 135 136 # We only apply this patch when building a native toolchain for aarch64-darwin, as it breaks building 137 # a foreign one: https://github.com/iains/gcc-12-branch/issues/18
+18
pkgs/development/compilers/gcc/patches/gnat-darwin-dylib-install-name-13.patch
···
··· 1 + --- a/gcc/ada/gcc-interface/Makefile.in 2 + +++ b/gcc/ada/gcc-interface/Makefile.in 3 + @@ -788,13 +788,13 @@ gnatlib-shared-darwin: 4 + -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ 5 + $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ 6 + $(SO_OPTS) \ 7 + - -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ 8 + + -Wl,-install_name,$(ADA_RTL_DSO_DIR)/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ 9 + $(MISCLIB) 10 + cd $(RTSDIR); $(GCC_FOR_ADA_RTS) -dynamiclib $(PICFLAG_FOR_TARGET) \ 11 + -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ 12 + $(GNATRTL_TASKING_OBJS) \ 13 + $(SO_OPTS) \ 14 + - -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ 15 + + -Wl,-install_name,$(ADA_RTL_DSO_DIR)/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ 16 + $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) 17 + cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ 18 + libgnat$(soext)