]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix order of PATH manipulation in cwrapper and shwrapper
authorCharles Wilson <libtool@cwilson.fastmail.fm>
Fri, 17 Sep 2010 16:23:28 +0000 (12:23 -0400)
committerCharles Wilson <libtool@cwilson.fastmail.fm>
Fri, 17 Sep 2010 18:38:22 +0000 (14:38 -0400)
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src:main): Call
lt_update_exe_path before lt_update_lib_path, to ensure that the
temporary rpath values (which include the OBJDIRs of uninstalled
libtool libraries) precede installation and final -rpath directories.
(func_emit_wrapper): Prepend $dllsearchpath to PATH before prepending
$temp_rpath to $shlibpath_var; similar rationale as above.
Reported by Jon Turney <jon.turney@dronecode.org.uk>

Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
ChangeLog
libltdl/config/ltmain.m4sh

index 334a5d09a8f7d8a2ed8981bf88ab5dcb25827458..17e50cf2db7f11ba48e11c1d885b3d28df7e1cbb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-17  Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+       Fix order of PATH manipulation in cwrapper and shwrapper
+       * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src:main): Call
+       lt_update_exe_path before lt_update_lib_path, to ensure that the
+       temporary rpath values (which include the OBJDIRs of uninstalled
+       libtool libraries) precede installation and final -rpath directories.
+       (func_emit_wrapper): Prepend $dllsearchpath to PATH before prepending
+       $temp_rpath to $shlibpath_var; similar rationale as above.
+       Reported by Jon Turney <jon.turney@dronecode.org.uk>
+
 2010-09-17  Charles Wilson  <libtool@cwilson.fastmail.fm>
 
        Document libtool variable to_host_file_cmd.
index 7bbca85a9a3de6b3231757d42be51c79109e1714..4f5bbb39b1243b81c8e52cf1c694c23fbe6cef9e 100644 (file)
@@ -3293,6 +3293,18 @@ func_exec_program ()
 
   if test -f \"\$progdir/\$program\"; then"
 
+       # fixup the dll searchpath if we need to.
+       #
+       # Fix the DLL searchpath if we need to.  Do this before prepending
+       # to shlibpath, because on Windows, both are PATH and uninstalled
+       # libraries must come first.
+       if test -n "$dllsearchpath"; then
+         $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
        # Export our shlibpath_var if we have one.
        if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
          $ECHO "\
@@ -3307,14 +3319,6 @@ func_exec_program ()
 "
        fi
 
-       # fixup the dll searchpath if we need to.
-       if test -n "$dllsearchpath"; then
-         $ECHO "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-       fi
-
        $ECHO "\
     if test \"\$libtool_execute_magic\" != \"$magic\"; then
       # Run the actual program with our arguments.
@@ -3703,8 +3707,12 @@ EOF
 
   lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
   lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
   lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
 
   lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
                  nonnull (lt_argv_zero));