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

Message ID 20211117210319.92514-5-iain@sandoe.co.uk
State New
Headers
Series Darwin: Replace environment runpath with embedded [PR88590]. |

Commit Message

Iain Sandoe Nov. 17, 2021, 9:03 p.m. UTC
  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(+)
  

Comments

Arnaud Charlet Nov. 18, 2021, 7:28 a.m. UTC | #1
> 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.

OK, thanks.
  

Patch

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)