[PATCH 4/4] Darwin, Ada : Add loader path as a default rpath.

Iain Sandoe iains.gcc@gmail.com
Wed Nov 17 21:03:19 GMT 2021


Allow the Ada runtimes to find GCC runtimes relative to their non-
standard install positions.

gcc/ada/
	* gcc-interface/Makefile.in: Add @loader_path runpaths to the
	libgnat and libgnarl shared library builds.
	
---
 gcc/ada/gcc-interface/Makefile.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 53d0739470a..bffe9de4c89 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -788,6 +788,7 @@ gnatlib-shared-darwin:
 		$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
 		$(SO_OPTS) \
 		-Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-Wl,-rpath,@loader_path \
 		$(MISCLIB)
 	cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
@@ -795,6 +796,7 @@ gnatlib-shared-darwin:
 		$(GNATRTL_TASKING_OBJS) \
 		$(SO_OPTS) \
 		-Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-Wl,-rpath,@loader_path \
 		$(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
 	cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
 		libgnat$(soext)
-- 
2.24.3 (Apple Git-128)



More information about the Gcc-patches mailing list