]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Merge from development tree:
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Wed, 26 Jul 2000 13:35:20 +0000 (13:35 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 26 Jul 2000 13:35:20 +0000 (13:35 +0000)
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.

ChangeLog
ltconfig.in
ltmain.in

index a68868103c9e9eb64145bc4bfe86b7fd26740004..f5d59797d3c30359e16ddc723a871df414a952e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-07-26  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
+       
+       Merge from development tree:
+       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-07-24  Mocha  <netbsd_alpha@yahoo.com>
 
        * ltconfig.in (NetBSD, deplibs_check_method): Use file_magic.
index a1e0553179ead3d3e28ab5d124c90ba84a20ac0f..4ac414d684071a8d56cc0bb6ab9f76cb86e87357 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This file is free software; you can redistribute it and/or modify it
@@ -2233,6 +2233,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
+
 echo $ac_n "checking for objdir... $ac_c" 1>&6
 rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
@@ -3005,6 +3010,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"
+
 # Compile-time system search path for libraries
 sys_lib_search_path_spec=$sys_lib_search_path_spec
 
index 20009201df581f77ec8d5103a419cab0acb97267..03bb58cedac3d3e943d3474a5e2d12136842edc6 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1,7 +1,7 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
 #
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This program is free software; you can redistribute it and/or modify
@@ -2766,6 +2766,13 @@ 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