From 3e0e7d6e5cfdc46342fcad5fe6b24b4f47af0d87 Mon Sep 17 00:00:00 2001 Message-Id: <3e0e7d6e5cfdc46342fcad5fe6b24b4f47af0d87.1532988611.git.John.Ericson@Obsidian.Systems> From: John Ericson Date: Mon, 30 Jul 2018 18:06:02 -0400 Subject: [PATCH] multilib: Don't bother with multilib configuration To: gcc-patches@gcc.gnu.org * config/multi.m4: Don't bother with multilib configuration when it is disabled. --- ChangeLog | 5 +++++ config/multi.m4 | 50 +++++++++++++++++++++++++++---------------------- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4bc5123c84e..2445071bea4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-07-30 John Ericson + + * config/multi.m4: Don't bother with multilib configuration when it + is disabled. + 2018-07-19 DJ Delorie * MAINTAINERS (m32c, msp43, rl78, libiberty, build): Remove myself diff --git a/config/multi.m4 b/config/multi.m4 index bba338a8265..f5081155564 100644 --- a/config/multi.m4 +++ b/config/multi.m4 @@ -20,40 +20,45 @@ AC_ARG_ENABLE(multilib, no) multilib=no ;; *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;; esac], - [multilib=yes]) +[multilib=yes]) -# We may get other options which we leave undocumented: -# --with-target-subdir, --with-multisrctop, --with-multisubdir -# See config-ml.in if you want the gory details. +if test "x$multilib" = xyes; then -if test "$srcdir" = "."; then - if test "$with_target_subdir" != "."; then - multi_basedir="$srcdir/$with_multisrctop../$2" + # We may get other options which we leave undocumented: + # --with-target-subdir, --with-multisrctop, --with-multisubdir + # See config-ml.in if you want the gory details. + + if test "$srcdir" = "."; then + if test "$with_target_subdir" != "."; then + multi_basedir="$srcdir/$with_multisrctop../$2" + else + multi_basedir="$srcdir/$with_multisrctop$2" + fi else - multi_basedir="$srcdir/$with_multisrctop$2" + multi_basedir="$srcdir/$2" + fi + AC_SUBST(multi_basedir) + + # Even if the default multilib is not a cross compilation, + # it may be that some of the other multilibs are. + if test $cross_compiling = no && test $multilib = yes \ + && test "x${with_multisubdir}" != x ; then + cross_compiling=maybe fi -else - multi_basedir="$srcdir/$2" -fi -AC_SUBST(multi_basedir) -# Even if the default multilib is not a cross compilation, -# it may be that some of the other multilibs are. -if test $cross_compiling = no && test $multilib = yes \ - && test "x${with_multisubdir}" != x ; then - cross_compiling=maybe fi -AC_OUTPUT_COMMANDS([ +AC_CONFIG_COMMANDS([config-ml], +[if test "x$multilib" = xyes; then # Only add multilib support code if we just rebuilt the top-level # Makefile. case " $CONFIG_FILES " in *" ]m4_default([$1],Makefile)[ "*) ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in ;; -esac], - [ -srcdir="$srcdir" +esac +fi], +[srcdir="$srcdir" host="$host" target="$target" with_multisubdir="$with_multisubdir" @@ -64,4 +69,5 @@ multi_basedir="$multi_basedir" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} CC="$CC" CXX="$CXX" -GFORTRAN="$GFORTRAN"])])dnl +GFORTRAN="$GFORTRAN"]) +])dnl -- 2.17.1