From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id B57433857816 for ; Fri, 21 Jan 2022 03:58:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B57433857816 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 264E0342DA4; Fri, 21 Jan 2022 03:58:24 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic Date: Thu, 20 Jan 2022 22:58:22 -0500 Message-Id: <20220121035823.11754-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2022 03:58:26 -0000 The current newlib multilib logic is almost exactly the same as the config/multi.m4, and the differences should be minor, so switch over to that to delete custom logic on ourside. --- newlib/Makefile.in | 2 ++ newlib/acinclude.m4 | 2 ++ newlib/aclocal.m4 | 1 + newlib/configure | 79 +++++++++++++++++++++++++++++++-------------- newlib/configure.ac | 21 +----------- 5 files changed, 61 insertions(+), 44 deletions(-) diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4 index bdefd963542a..9e25b8589b84 100644 --- a/newlib/acinclude.m4 +++ b/newlib/acinclude.m4 @@ -13,6 +13,7 @@ dnl newlib directory. AC_DEFUN([NEWLIB_CONFIGURE], [AC_REQUIRE([DEF_NEWLIB_VERSION]) +m4_if($1, [.], [AM_ENABLE_MULTILIB(, ..)], [dnl dnl Default to --enable-multilib AC_ARG_ENABLE(multilib, [ --enable-multilib build many library versions (default)], @@ -21,6 +22,7 @@ AC_ARG_ENABLE(multilib, no) multilib=no ;; *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; esac], [multilib=yes])dnl +])dnl dnl Support --enable-target-optspace AC_ARG_ENABLE(target-optspace, diff --git a/newlib/configure.ac b/newlib/configure.ac index b4d11f5e3b57..f56832247111 100644 --- a/newlib/configure.ac +++ b/newlib/configure.ac @@ -500,12 +500,6 @@ AC_SUBST([NEWLIB_MAJOR_VERSION]) AC_SUBST([NEWLIB_MINOR_VERSION]) AC_SUBST([NEWLIB_PATCHLEVEL_VERSION]) -if test "${multilib}" = "yes"; then - multilib_arg="--enable-multilib" -else - multilib_arg= -fi - if test "${newlib_iconv}" = "yes"; then AC_DEFINE(_ICONV_ENABLED, 1, [ICONV enabled.]) fi @@ -746,18 +740,5 @@ fi AC_SUBST(CFLAGS) -AC_CONFIG_FILES([Makefile], -[if test -n "$CONFIG_FILES"; then - unset ac_file - . ${newlib_basedir}/../config-ml.in -fi], -srcdir=${srcdir} -host=${host} -with_multisubdir=${with_multisubdir} -ac_configure_args="${multilib_arg} ${ac_configure_args}" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -newlib_basedir=${newlib_basedir} -CC="${CC}" -LDFLAGS="${LDFLAGS}" -) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- 2.34.1