[PATCH] relax -rpath argument test for Snow Leopard
Hello, I had to patch libtool in order to get shared libraries to build with the Snow Leopard '@rpath/' syntax which stands in for the place where the lib gets installed. I thought that this might be useful for more than just myself. Cheers, Leo From a7f66c6ae219f335d79464350d76245a707e56f9 Mon Sep 17 00:00:00 2001 From: Leo Davis lda...@fonix.com Date: Wed, 22 Sep 2010 19:29:11 -0600 Subject: [PATCH] relax -rpath argument test for Snow Leopard * libltdl/config/ltmain.m4sh: Relax the absolute path rules requirement for -rpath a little to allow '@rpath/' to begin the string for Darwin (Snow Leopard) load paths. --- libltdl/config/ltmain.m4sh |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 0418007..3b21851 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -4607,9 +4607,9 @@ func_mode_link () continue ;; rpath | xrpath) - # We need an absolute path. + # We need an absolute path or a runpath. case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; + [\\/]* | [A-Za-z]:[\\/]* | @rpath[\\/]*) ;; *) func_fatal_error only absolute run-paths are allowed ;; -- 1.7.2.3
Re: [PATCH] relax -rpath argument test for Snow Leopard
On 09/22/2010 09:00 PM, Leo Davis wrote: Hello, I had to patch libtool in order to get shared libraries to build with the Snow Leopard '@rpath/' syntax which stands in for the place where the lib gets installed. I thought that this might be useful for more than just myself. Well, there is no method to encode @executable_path or @loader_path in the library install_name either. I always figured that people would just build as normal and then postprocess using install_name_tool(1) if they needed to. Why should libtool treat the Mac OS X @rpath differently to the other two special paths? Peter
Re: [PATCH] relax -rpath argument test for Snow Leopard
Hello, * Peter O'Gorman wrote on Thu, Sep 23, 2010 at 07:43:44AM CEST: On 09/22/2010 09:00 PM, Leo Davis wrote: I had to patch libtool in order to get shared libraries to build with the Snow Leopard '@rpath/' syntax which stands in for the place where the lib gets installed. I thought that this might be useful for more than just myself. Well, there is no method to encode @executable_path or @loader_path in the library install_name either. I always figured that people would just build as normal and then postprocess using install_name_tool(1) if they needed to. Why should libtool treat the Mac OS X @rpath differently to the other two special paths? More generally, $ORIGIN support (which is what a number of other linkers call it, IIUC) should be added completely if it's added, including a portable 'libtool' notation, testsuite coverage and fixing of fall-out, and correct treatment of the non-absolute paths throughout ltmain. I don't know how much work the latter would be, but guessing from the sysroot branch, there is work to do there. The most important question to this end is how to degrade gracefully on systems without such a feature. Cheers, Ralf