From: Alexandre Oliva Date: Wed, 26 Jul 2000 13:35:20 +0000 (+0000) Subject: Merge from development tree: X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9717961fc5a5ea31412cddc090c30c26623f613;p=thirdparty%2Flibtool.git Merge from development tree: 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. --- diff --git a/ChangeLog b/ChangeLog index a68868103..f5d59797d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-07-26 Alexandre Oliva + + Merge from development tree: + 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-07-24 Mocha * ltconfig.in (NetBSD, deplibs_check_method): Use file_magic. diff --git a/ltconfig.in b/ltconfig.in index a1e055317..4ac414d68 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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 , 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 diff --git a/ltmain.in b/ltmain.in index 20009201d..03bb58ced 100644 --- 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 , 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