public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic
@ 2022-01-21  3:58 Mike Frysinger
  2022-01-21  3:58 ` [PATCH 2/2] newlib: stop checking --enable-multilib in subdirs Mike Frysinger
  2022-01-21 11:23 ` [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic Corinna Vinschen
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Frysinger @ 2022-01-21  3:58 UTC (permalink / raw)
  To: newlib

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-21 13:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21  3:58 [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic Mike Frysinger
2022-01-21  3:58 ` [PATCH 2/2] newlib: stop checking --enable-multilib in subdirs Mike Frysinger
2022-01-21 11:23 ` [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic Corinna Vinschen
2022-01-21 12:17   ` Mike Frysinger
2022-01-21 13:26     ` Corinna Vinschen

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).