From cd9b42e98daeeaa8b088e160dd56318b4731d29c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 21 Mar 2000 12:39:33 +0000 Subject: [PATCH] * 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 | 7 +++++++ ltconfig.in | 9 +++++++++ ltmain.in | 12 ++++++++++++ 3 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index 22c97649e..a1d11a3d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-03-21 Alexandre Oliva + + * 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 * ltconfig.in: added main() definition in compile diff --git a/ltconfig.in b/ltconfig.in index ee7cb2061..413d10f4f 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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 diff --git a/ltmain.in b/ltmain.in index 37cfb3e6a..4cc6f7b17 100644 --- 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"` -- 2.47.3