]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltconfig.in (variables_saved_for_relink): Set to `PATH
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Tue, 21 Mar 2000 12:39:33 +0000 (12:39 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 21 Mar 2000 12:39:33 +0000 (12:39 +0000)
$shlibpath_var $runpath_var'.  If with_gcc, add gcc-related
environment variables.  Add it to the configuration section.
* ltmain.in (relink_command): Expand those variables.

ChangeLog
ltconfig.in
ltmain.in

index 22c97649e57785eeb125eeefb2864aa606a082da..a1d11a3d4c3173816ac3c03abadb84789e8456c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-03-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
+
+       * ltconfig.in (variables_saved_for_relink): Set to `PATH
+       $shlibpath_var $runpath_var'.  If with_gcc, add gcc-related
+       environment variables.  Add it to the configuration section.
+       * ltmain.in (relink_command): Expand those variables.
+
 2000-03-14  Christopher A. Knight  <chriskn@crt.com>
 
        * ltconfig.in: added main() definition in compile
index ee7cb2061d50d0bce9a673b5bd3281123727e9fd..413d10f4f3dae2f393bc7f5bd7a888a110c34034 100755 (executable)
@@ -2008,6 +2008,11 @@ elif test "$shlibpath_overrides_runpath" = yes ||
   enable_fast_install=needless
 fi
 
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$with_gcc" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
 # Check whether we must set pic_mode to default
 test -z "$pic_flag" && pic_mode=default
 # On Cygwin there's no "real" PIC flag so we must build both object types
@@ -2806,6 +2811,10 @@ hardcode_minus_L=$hardcode_minus_L
 # the resulting binary.
 hardcode_shlibpath_var=$hardcode_shlibpath_var
 
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs
 
index 37cfb3e6a043690aadfcd19ae77c9d916cfd92fc..4cc6f7b175b06d9c6e46b4e318d05f62a7aae4ff 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -3327,6 +3327,12 @@ static const void *lt_preloaded_setup() {
 
       # Quote the relink command for shipping.
       if test -n "$relink_command"; then
+        # Preserve any variables that may affect compiler behavior
+       for var in $variables_saved_for_relink; do
+         eval var_value=\$$var
+         var_value=`\$echo \"X$var_value\" | $Xsed -e "$sed_quote_subst"`
+         relink_command="$var=\"$var_value\"; export $var; $relink_command"
+       done
        relink_command="cd `pwd`; $relink_command"
        relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
       fi
@@ -3631,6 +3637,12 @@ fi\
       test "$build_old_libs" = yes && old_library="$libname.$libext"
       $show "creating $output"
 
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+       eval var_value=\$$var
+       var_value=`\$echo \"X$var_value\" | $Xsed -e "$sed_quote_subst"`
+       relink_command="$var=\"$var_value\"; export $var; $relink_command"
+      done
       # Quote the link command for shipping.
       relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`