From: Charles Wilson Date: Fri, 17 Sep 2010 16:23:28 +0000 (-0400) Subject: Fix order of PATH manipulation in cwrapper and shwrapper X-Git-Tag: v2.4~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69e77671311ab54de44ba24ff5dbf5568bf1221d;p=thirdparty%2Flibtool.git 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 Signed-off-by: Charles Wilson --- diff --git a/ChangeLog b/ChangeLog index 334a5d09a..17e50cf2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-09-17 Charles Wilson + + 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 + 2010-09-17 Charles Wilson Document libtool variable to_host_file_cmd. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 7bbca85a9..4f5bbb39b 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -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));