]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - config-ml.in
Small enhancement to implementation of -fdump-ada-spec
[thirdparty/gcc.git] / config-ml.in
index 927bad66dc094283cceae5abf8f09e3414b99e51..645cac822fdcf90c6f839f94653c209e17db8fc5 100644 (file)
@@ -31,7 +31,7 @@
 # user select which libraries s/he really wants.
 #
 # Subdirectories wishing to use multilib should put the following lines
-# in the "post-target" section of configure.in.
+# in the "post-target" section of configure.ac.
 #
 # if [ "${srcdir}" = "." ] ; then
 #   if [ "${with_target_subdir}" != "." ] ; then
@@ -182,8 +182,8 @@ if [ "${enable_multilib}" = yes ]; then
 # ${with_multisubdir} tells us we're in the right branch, but we could be
 # in a subdir of that.
 # ??? The previous version could void this test by separating the process into
-# two files: one that only the library's toplevel configure.in ran (to
-# configure the multilib subdirs), and another that all configure.in's ran to
+# two files: one that only the library's toplevel configure.ac ran (to
+# configure the multilib subdirs), and another that all configure.ac's ran to
 # update the Makefile.  It seemed reasonable to collapse all multilib support
 # into one file, but it does leave us with having to perform this test.
 ml_toplevel_p=no
@@ -383,6 +383,19 @@ mips*-*-*)
          done
        fi
        ;;
+msp430-*-*)
+       if [ x$enable_no_exceptions = xno ]
+       then
+         old_multidirs="${multidirs}"
+         multidirs=""
+         for x in ${old_multidirs}; do
+           case "$x" in
+             *no-exceptions* ) : ;;
+             *) multidirs="${multidirs} ${x}" ;;
+           esac
+         done
+       fi
+       ;;
 powerpc*-*-* | rs6000*-*-*)
        if [ x$enable_aix64 = xno ]
        then
@@ -486,10 +499,8 @@ cat > Multi.tem <<\EOF
 
 PWD_COMMAND=$${PWDCMD-pwd}
 
-# FIXME: There should be an @-sign in front of the `if'.
-# Leave out until this is tested a bit more.
 multi-do:
-       if [ -z "$(MULTIDIRS)" ]; then \
+       @if [ -z "$(MULTIDIRS)" ]; then \
          true; \
        else \
          rootpre=`${PWD_COMMAND}`/; export rootpre; \
@@ -503,7 +514,12 @@ multi-do:
            else \
              if [ -d ../$${dir}/$${lib} ]; then \
                flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
-               if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
+               libsuffix_=`$${compiler} $${flags} --print-multi-os-directory`; \
+               if (cd ../$${dir}/$${lib}; $(MAKE) $(subst \
+                               -B$(build_tooldir)/lib/, \
+                               -B$(build_tooldir)/lib/$${libsuffix_}/ \
+                               -B$(build_tooldir)/lib/, \
+                               $(FLAGS_TO_PASS)) \
                                CFLAGS="$(CFLAGS) $${flags}" \
                                CCASFLAGS="$(CCASFLAGS) $${flags}" \
                                FCFLAGS="$(FCFLAGS) $${flags}" \
@@ -511,8 +527,8 @@ multi-do:
                                ADAFLAGS="$(ADAFLAGS) $${flags}" \
                                prefix="$(prefix)" \
                                exec_prefix="$(exec_prefix)" \
-                               GCJFLAGS="$(GCJFLAGS) $${flags}" \
                                GOCFLAGS="$(GOCFLAGS) $${flags}" \
+                               GDCFLAGS="$(GDCFLAGS) $${flags}" \
                                CXXFLAGS="$(CXXFLAGS) $${flags}" \
                                LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
                                LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
@@ -534,10 +550,8 @@ multi-do:
          done; \
        fi
 
-# FIXME: There should be an @-sign in front of the `if'.
-# Leave out until this is tested a bit more.
 multi-clean:
-       if [ -z "$(MULTIDIRS)" ]; then \
+       @if [ -z "$(MULTIDIRS)" ]; then \
          true; \
        else \
          lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
@@ -746,19 +760,20 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
         break
       fi
     done
-    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags"'
+    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags" GDC="${GDC_}$flags"'
 
     if [ "${with_target_subdir}" = "." ]; then
        CC_=$CC' '
        CXX_=$CXX' '
        F77_=$F77' '
-       GCJ_=$GCJ' '
        GFORTRAN_=$GFORTRAN' '
        GOC_=$GOC' '
+       GDC_=$GDC' '
     else
        # Create a regular expression that matches any string as long
        # as ML_POPDIR.
        popdir_rx=`echo "${ML_POPDIR}" | sed 's,.,.,g'`
+       multi_osdir=`${CC-gcc} ${flags} --print-multi-os-directory 2>/dev/null`
        CC_=
        for arg in ${CC}; do
          case $arg in
@@ -766,6 +781,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
            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"`' ' ;;
+         -B*/lib/)
+           CC_="${CC_}${arg}${multi_osdir} ${arg} " ;;
          *)
            CC_="${CC_}${arg} " ;;
          esac
@@ -778,6 +795,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
            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"`' ' ;;
+         -B*/lib/)
+           CXX_="${CXX_}${arg}${multi_osdir} ${arg} " ;;
          *)
            CXX_="${CXX_}${arg} " ;;
          esac
@@ -790,23 +809,13 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
            F77_="${F77_}"`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}"/*)
            F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         -B*/lib/)
+           F77_="${F77_}${arg}${multi_osdir} ${arg} " ;;
          *)
            F77_="${F77_}${arg} " ;;
          esac
        done
 
-       GCJ_=
-       for arg in ${GCJ}; do
-         case $arg in
-         -[BIL]"${ML_POPDIR}"/*)
-           GCJ_="${GCJ_}"`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}"/*)
-           GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
-         *)
-           GCJ_="${GCJ_}${arg} " ;;
-         esac
-       done
-
        GFORTRAN_=
        for arg in ${GFORTRAN}; do
          case $arg in
@@ -814,6 +823,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
            GFORTRAN_="${GFORTRAN_}"`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}"/*)
            GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         -B*/lib/)
+           GFORTRAN_="${GFORTRAN_}${arg}${multi_osdir} ${arg} " ;;
          *)
            GFORTRAN_="${GFORTRAN_}${arg} " ;;
          esac
@@ -826,11 +837,27 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
            GOC_="${GOC_}"`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}"/*)
            GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         -B*/lib/)
+           GOC_="${GOC_}${arg}${multi_osdir} ${arg} " ;;
          *)
            GOC_="${GOC_}${arg} " ;;
          esac
        done
 
+       GDC_=
+       for arg in ${GDC}; do
+         case $arg in
+         -[BIL]"${ML_POPDIR}"/*)
+           GDC_="${GDC_}"`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}"/*)
+           GDC_="${GDC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         -B*/lib/)
+           GDC_="${GDC_}${arg}${multi_osdir} ${arg} " ;;
+         *)
+           GDC_="${GDC_}${arg} " ;;
+         esac
+       done
+
        if test "x${LD_LIBRARY_PATH+set}" = xset; then
          LD_LIBRARY_PATH_=
          for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do