diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-03 19:19:33 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-03 19:19:33 +0000 |
commit | 454c751b661b96f53033acf047eeb6f4bc556900 (patch) | |
tree | d2680cea399af81bbcce7a2cda27bfa15afbe468 /config-ml.in | |
parent | 73ca2d39d888eb873202f4f55ad1c620490b38e6 (diff) | |
download | gcc-454c751b661b96f53033acf047eeb6f4bc556900.tar.gz |
* config-ml.in: Adjust multilib search paths to the
appropriate multilib tree.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config-ml.in')
-rw-r--r-- | config-ml.in | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/config-ml.in b/config-ml.in index e5ca10ec1db..090cc2bb482 100644 --- a/config-ml.in +++ b/config-ml.in @@ -753,7 +753,40 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then break fi done - ml_config_env='CC="${CC} $flags"' + ml_config_env='CC="${CC_} $flags" CXX="${CXX_} $flags"' + + if [ "${with_target_subdir}" = "." ]; then + CC_=$CC + CXX_=$CXX + else + # Create a regular expression that matches any string as long + # as ML_POPDIR. + popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'` + CC_= + for arg in ${CC}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CC_="${CC_} "`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"` ;; + "${ML_POPDIR}"/*) + CC_="${CC_} "`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p""`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` ;; + *) + CC_="${CC_} ${arg}" ;; + esac + done + + CXX_= + for arg in ${CXX}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CXX_="${CXX_} "`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"` ;; + "${ML_POPDIR}"/*) + CXX_="${CXX_} "`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` ;; + *) + CXX_="${CXX_} ${arg}" ;; + esac + done + + fi if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \ |