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 246903851C32 for ; Wed, 26 Jan 2022 09:45:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 246903851C32 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 3B022342B9E; Wed, 26 Jan 2022 09:45:11 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 3/3] libgloss: move to ../config/multi.m4 for multilib logic Date: Wed, 26 Jan 2022 04:45:08 -0500 Message-Id: <20220126094508.24259-3-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220126094508.24259-1-vapier@gentoo.org> References: <20220126094508.24259-1-vapier@gentoo.org> 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: Wed, 26 Jan 2022 09:45:16 -0000 The current libgloss 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. The insertions here look larger and that's because none of the scripts were declaring --enable-multilib explicitly even though they checked the flag and changed behavior. --- libgloss/aarch64/aclocal.m4 | 1 + libgloss/aarch64/configure | 69 +++++++++++++++++++++-- libgloss/aarch64/configure.ac | 11 +--- libgloss/aarch64/cpu-init/aclocal.m4 | 1 + libgloss/aarch64/cpu-init/configure | 69 +++++++++++++++++++++-- libgloss/aarch64/cpu-init/configure.ac | 11 +--- libgloss/aclocal.m4 | 1 + libgloss/arm/aclocal.m4 | 1 + libgloss/arm/configure | 77 ++++++++++++++++++++----- libgloss/arm/configure.ac | 21 ++----- libgloss/configure | 78 ++++++++++++++++++++------ libgloss/configure.ac | 24 +------- libgloss/csky/aclocal.m4 | 1 + libgloss/csky/configure | 70 ++++++++++++++++++++--- libgloss/csky/configure.ac | 12 +--- libgloss/i386/aclocal.m4 | 1 + libgloss/i386/configure | 69 +++++++++++++++++++++-- libgloss/i386/configure.ac | 11 +--- libgloss/m68k/aclocal.m4 | 1 + libgloss/m68k/configure | 70 ++++++++++++++++++++--- libgloss/m68k/configure.ac | 12 +--- libgloss/mcore/aclocal.m4 | 1 + libgloss/mcore/configure | 69 +++++++++++++++++++++-- libgloss/mcore/configure.ac | 11 +--- libgloss/mips/aclocal.m4 | 1 + libgloss/mips/configure | 69 +++++++++++++++++++++-- libgloss/mips/configure.ac | 11 +--- libgloss/mn10200/aclocal.m4 | 1 + libgloss/mn10200/configure | 71 ++++++++++++++++++++--- libgloss/mn10200/configure.ac | 13 +---- libgloss/mn10300/aclocal.m4 | 1 + libgloss/mn10300/configure | 74 ++++++++++++++++++++---- libgloss/mn10300/configure.ac | 16 +----- libgloss/moxie/aclocal.m4 | 1 + libgloss/moxie/configure | 69 +++++++++++++++++++++-- libgloss/moxie/configure.ac | 11 +--- libgloss/sparc/aclocal.m4 | 1 + libgloss/sparc/configure | 73 ++++++++++++++++++++---- libgloss/sparc/configure.ac | 11 +--- 39 files changed, 868 insertions(+), 247 deletions(-) diff --git a/libgloss/aarch64/configure.ac b/libgloss/aarch64/configure.ac index 303e51359ca6..b26f55ecaca1 100644 --- a/libgloss/aarch64/configure.ac +++ b/libgloss/aarch64/configure.ac @@ -43,12 +43,7 @@ if test -d "${srcdir}/cpu-init"; then AC_SUBST(subdirs) fi -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/aarch64/cpu-init/configure.ac b/libgloss/aarch64/cpu-init/configure.ac index 91aa2211d8b1..91f9c709a18a 100644 --- a/libgloss/aarch64/cpu-init/configure.ac +++ b/libgloss/aarch64/cpu-init/configure.ac @@ -28,12 +28,7 @@ host_makefile_frag_path=$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/arm/configure.ac b/libgloss/arm/configure.ac index 806020b04668..2b98b5453725 100644 --- a/libgloss/arm/configure.ac +++ b/libgloss/arm/configure.ac @@ -62,24 +62,11 @@ AC_SUBST_FILE(host_makefile_frag) # Configure cpu init plug-ins if test -d "${srcdir}/cpu-init"; then subdirs="${subdirs} cpu-init" - AC_CONFIG_FILES(cpu-init/Makefile, - . ${srcdir}/../../config-ml.in, - srcdir=${srcdir} - target=${target} - with_multisubdir=${with_multisubdir} - ac_configure_args="${ac_configure_args} --enable-multilib" - CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - ) + AC_CONFIG_FILES([cpu-init/Makefile]) AC_SUBST(subdirs) fi -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT +AM_ENABLE_MULTILIB(, ../..) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/configure.ac b/libgloss/configure.ac index d635f6af9df3..faacfd93d367 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -328,27 +328,7 @@ target_makefile_frag_path=$target_makefile_frag AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) -if test "${multilib}" = "yes"; then - multilib_arg="--enable-multilib" -else - multilib_arg= -fi +AM_ENABLE_MULTILIB(, ..) -# for now, only add multilibs for specific targets -AC_CONFIG_FILES([Makefile], -[if test -n "$CONFIG_FILES"; then - unset ac_file - . ${srcdir}/../config-ml.in -fi], -srcdir=${srcdir} -target=${target} -host=${host} -with_multisubdir=${with_multisubdir} -ac_configure_args="--enable-multilib ${ac_configure_args}" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -CC="${CC}" -LDFLAGS=${LDFLAGS} -) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT - - diff --git a/libgloss/csky/configure.ac b/libgloss/csky/configure.ac index 0387ea46b351..bb9a9195df97 100644 --- a/libgloss/csky/configure.ac +++ b/libgloss/csky/configure.ac @@ -65,13 +65,7 @@ target_makefile_frag_path=$target_makefile_frag AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT +AM_ENABLE_MULTILIB(, ../..) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/i386/configure.ac b/libgloss/i386/configure.ac index 895e4476edcc..e03620770235 100644 --- a/libgloss/i386/configure.ac +++ b/libgloss/i386/configure.ac @@ -53,12 +53,7 @@ host_makefile_frag_path=$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/m68k/configure.ac b/libgloss/m68k/configure.ac index 53615ffc66df..de35d7934966 100644 --- a/libgloss/m68k/configure.ac +++ b/libgloss/m68k/configure.ac @@ -65,13 +65,7 @@ target_makefile_frag_path=$target_makefile_frag AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT +AM_ENABLE_MULTILIB(, ../..) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/mcore/configure.ac b/libgloss/mcore/configure.ac index a314d4ee368d..f6b3f009643e 100644 --- a/libgloss/mcore/configure.ac +++ b/libgloss/mcore/configure.ac @@ -39,12 +39,7 @@ host_makefile_frag_path=$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/mips/configure.ac b/libgloss/mips/configure.ac index a609233a6105..ca99c7287635 100644 --- a/libgloss/mips/configure.ac +++ b/libgloss/mips/configure.ac @@ -97,12 +97,7 @@ AC_SUBST(bsp_list) AC_SUBST(crt0) AC_SUBST(pcrt0) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/mn10200/configure.ac b/libgloss/mn10200/configure.ac index 70dbd49d9b16..d5a0cc87aac6 100644 --- a/libgloss/mn10200/configure.ac +++ b/libgloss/mn10200/configure.ac @@ -52,14 +52,7 @@ AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) AC_SUBST(part_specific_obj) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT - +AM_ENABLE_MULTILIB(, ../..) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/mn10300/configure.ac b/libgloss/mn10300/configure.ac index 9526576b067f..88af0f948748 100644 --- a/libgloss/mn10300/configure.ac +++ b/libgloss/mn10300/configure.ac @@ -61,17 +61,7 @@ AC_SUBST(part_specific_obj) AC_SUBST(script_list) AC_SUBST(bsp_list) -AC_CONFIG_FILES([Makefile], -[if test -n "$CONFIG_FILES"; then - unset ac_file - . ${srcdir}/../../config-ml.in -fi], -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT - +AM_ENABLE_MULTILIB(, ../..) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/moxie/configure.ac b/libgloss/moxie/configure.ac index baf66ef496b9..f09d72b77932 100644 --- a/libgloss/moxie/configure.ac +++ b/libgloss/moxie/configure.ac @@ -44,12 +44,7 @@ host_makefile_frag_path=$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/sparc/configure.ac b/libgloss/sparc/configure.ac index 9a9b987da8af..56049d5b9b33 100644 --- a/libgloss/sparc/configure.ac +++ b/libgloss/sparc/configure.ac @@ -58,12 +58,7 @@ AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) AC_SUBST(CYGMONLDSCRIPTTEMPL) -AC_OUTPUT(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=${srcdir} -target=${target} -with_multisubdir=${with_multisubdir} -ac_configure_args="${ac_configure_args} --enable-multilib" -CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT -- 2.34.1