]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
config-ml.in: Adjust multilib search paths to the appropriate multilib tree.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 3 Aug 2000 19:19:33 +0000 (19:19 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 3 Aug 2000 19:19:33 +0000 (19:19 +0000)
* config-ml.in: Adjust multilib search paths to the
appropriate multilib tree.

From-SVN: r35459

ChangeLog
config-ml.in

index 2767631e9b3c9ad2e47a67d91d46c6461da65775..3e2de5550e82448f1c8510fa3e00b94ac4d7513d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config-ml.in: Adjust multilib search paths to the
+       appropriate multilib tree.
+
 2000-08-02  Alexandre Oliva  <aoliva@redhat.com>
 
        * configure.in (CHILL_FOR_TARGET, CXX_FOR_TARGET): Convert blanks to
index e5ca10ec1db1a5c1cfc4e0b0c22a5f88804d7342..090cc2bb48223e5cc3ebbf45cc6df2864d3d1484 100644 (file)
@@ -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} \