This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix config-ml.in (take 2)
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Oct 2003 17:15:13 -0700
- Subject: PATCH: Fix config-ml.in (take 2)
- References: <20031001182547.GA16552@lucon.org>
On Wed, Oct 01, 2003 at 11:25:47AM -0700, H. J. Lu wrote:
> config-ml.in sets environment with ${ml_config_env}. But configure
> may override them if the same variable is passed at the command
> line in ${ml_arguments}. One of them is CC, among others. This patch
> makes sure the ones in ${ml_config_env} will be used.
>
>
It turns out that not all configures can take FOO=bar. This patch
passes ${ml_config_env} only if ${ml_arguments} has some FOO=bar.
H.J.
---
2003-10-01 H.J. Lu <hongjiu.lu@intel.com>
* config-ml.in: Also pass ${ml_config_env} as arguments.
--- config-ml.in.multilib 2003-07-07 14:44:21.000000000 -0700
+++ config-ml.in 2003-10-01 12:44:44.000000000 -0700
@@ -843,9 +843,17 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n
fi
fi
- if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
- --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ml_arguments} ${ml_srcdiroption} ; then
+ ml_run_config="${ml_config_env} ${ml_config_shell} ${ml_recprog}
+ --with-multisubdir=${ml_dir}
+ --with-multisrctop=${multisrctop} ${ml_arguments}
+ ${ml_srcdiroption}"
+ case "${ml_arguments}" in
+ *\'CC=* | *\'CXX=* | *\'GCJ=* | *\`LD_LIBRARY_PATH=* | *\`SHLIB_PATH=*)
+ ml_run_config="${ml_run_config} ${ml_config_env}"
+ ;;
+ esac
+
+ if eval ${ml_run_config} ; then
true
else
exit 1