public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
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	[thread overview]
Message-ID: <20220126094508.24259-3-vapier@gentoo.org> (raw)
In-Reply-To: <20220126094508.24259-1-vapier@gentoo.org>

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


  parent reply	other threads:[~2022-01-26  9:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  9:45 [PATCH 1/3] libgloss: merge epiphany & libnosys & or1k configure scripts up a level Mike Frysinger
2022-01-26  9:45 ` [PATCH 2/3] libgloss: merge subdirs that have unique makefile_frags " Mike Frysinger
2022-01-26  9:45 ` Mike Frysinger [this message]
2022-01-26 12:30 ` [PATCH 1/3] libgloss: merge epiphany & libnosys & or1k configure scripts " Corinna Vinschen
2022-01-27  2:32   ` Mike Frysinger
2022-01-27 14:45     ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220126094508.24259-3-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).