* [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
* [PATCH 2/2] newlib: stop checking --enable-multilib in subdirs
2022-01-21 3:58 [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic Mike Frysinger
@ 2022-01-21 3:58 ` Mike Frysinger
2022-01-21 11:23 ` [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic Corinna Vinschen
1 sibling, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2022-01-21 3:58 UTC (permalink / raw)
To: newlib
None of the subdirs actually use the multilib arg, so include the
logic only in the top-level configure.
---
NB: I can invert the order of these patches easily enough if preferred.
newlib/acinclude.m4 | 11 ---
newlib/configure | 74 +++++++++----------
newlib/configure.ac | 1 +
newlib/iconvdata/configure | 17 +----
newlib/libc/configure | 17 +----
newlib/libc/machine/a29k/configure | 13 ----
newlib/libc/machine/aarch64/configure | 13 ----
newlib/libc/machine/amdgcn/configure | 13 ----
newlib/libc/machine/arc/configure | 13 ----
newlib/libc/machine/arm/configure | 13 ----
newlib/libc/machine/bfin/configure | 13 ----
newlib/libc/machine/configure | 17 +----
newlib/libc/machine/cr16/configure | 13 ----
newlib/libc/machine/cris/configure | 13 ----
newlib/libc/machine/crx/configure | 13 ----
newlib/libc/machine/csky/configure | 13 ----
newlib/libc/machine/d10v/configure | 13 ----
newlib/libc/machine/d30v/configure | 13 ----
newlib/libc/machine/epiphany/configure | 13 ----
newlib/libc/machine/fr30/configure | 13 ----
newlib/libc/machine/frv/configure | 13 ----
newlib/libc/machine/ft32/configure | 13 ----
newlib/libc/machine/h8300/configure | 13 ----
newlib/libc/machine/h8500/configure | 13 ----
newlib/libc/machine/hppa/configure | 13 ----
newlib/libc/machine/i386/configure | 17 +----
newlib/libc/machine/i960/configure | 13 ----
newlib/libc/machine/iq2000/configure | 13 ----
newlib/libc/machine/lm32/configure | 13 ----
newlib/libc/machine/m32c/configure | 13 ----
newlib/libc/machine/m32r/configure | 13 ----
newlib/libc/machine/m68hc11/configure | 13 ----
newlib/libc/machine/m68k/configure | 13 ----
newlib/libc/machine/m88k/configure | 13 ----
newlib/libc/machine/mep/configure | 13 ----
newlib/libc/machine/microblaze/configure | 13 ----
newlib/libc/machine/mips/configure | 13 ----
newlib/libc/machine/mn10200/configure | 13 ----
newlib/libc/machine/mn10300/configure | 13 ----
newlib/libc/machine/moxie/configure | 13 ----
newlib/libc/machine/msp430/configure | 13 ----
newlib/libc/machine/mt/configure | 13 ----
newlib/libc/machine/nds32/configure | 13 ----
newlib/libc/machine/necv70/configure | 13 ----
newlib/libc/machine/nios2/configure | 13 ----
newlib/libc/machine/nvptx/configure | 13 ----
newlib/libc/machine/or1k/configure | 13 ----
newlib/libc/machine/powerpc/configure | 13 ----
newlib/libc/machine/pru/configure | 13 ----
newlib/libc/machine/riscv/configure | 13 ----
newlib/libc/machine/rl78/configure | 13 ----
newlib/libc/machine/rx/configure | 13 ----
newlib/libc/machine/sh/configure | 13 ----
newlib/libc/machine/sparc/configure | 13 ----
newlib/libc/machine/spu/configure | 13 ----
newlib/libc/machine/tic4x/configure | 13 ----
newlib/libc/machine/tic6x/configure | 13 ----
newlib/libc/machine/tic80/configure | 13 ----
newlib/libc/machine/v850/configure | 13 ----
newlib/libc/machine/visium/configure | 13 ----
newlib/libc/machine/w65/configure | 13 ----
newlib/libc/machine/x86_64/configure | 13 ----
newlib/libc/machine/xc16x/configure | 13 ----
newlib/libc/machine/xscale/configure | 13 ----
newlib/libc/machine/xstormy16/configure | 13 ----
newlib/libc/machine/z8k/configure | 13 ----
newlib/libc/sys/a29khif/configure | 13 ----
newlib/libc/sys/amdgcn/configure | 13 ----
newlib/libc/sys/arm/configure | 13 ----
newlib/libc/sys/configure | 17 +----
newlib/libc/sys/d10v/configure | 13 ----
newlib/libc/sys/decstation/configure | 13 ----
newlib/libc/sys/epiphany/configure | 13 ----
newlib/libc/sys/h8300hms/configure | 13 ----
newlib/libc/sys/h8500hms/configure | 13 ----
newlib/libc/sys/linux/configure | 17 +----
newlib/libc/sys/linux/linuxthreads/configure | 17 +----
.../sys/linux/linuxthreads/machine/configure | 17 +----
.../linux/linuxthreads/machine/i386/configure | 17 +----
newlib/libc/sys/linux/machine/configure | 17 +----
newlib/libc/sys/linux/machine/i386/configure | 17 +----
newlib/libc/sys/m88kbug/configure | 13 ----
newlib/libc/sys/mmixware/configure | 13 ----
newlib/libc/sys/netware/configure | 13 ----
newlib/libc/sys/or1k/configure | 13 ----
newlib/libc/sys/phoenix/configure | 13 ----
newlib/libc/sys/phoenix/machine/arm/configure | 13 ----
newlib/libc/sys/phoenix/machine/configure | 13 ----
newlib/libc/sys/rdos/configure | 13 ----
newlib/libc/sys/rtems/configure | 13 ----
newlib/libc/sys/sh/configure | 13 ----
newlib/libc/sys/sparc64/configure | 13 ----
newlib/libc/sys/sun4/configure | 13 ----
newlib/libc/sys/sysmec/configure | 13 ----
newlib/libc/sys/sysnec810/configure | 13 ----
newlib/libc/sys/sysnecv850/configure | 13 ----
newlib/libc/sys/sysvi386/configure | 13 ----
newlib/libc/sys/sysvnecv70/configure | 13 ----
newlib/libc/sys/tic80/configure | 13 ----
newlib/libc/sys/tirtos/configure | 13 ----
newlib/libc/sys/w65/configure | 13 ----
newlib/libc/sys/z8ksim/configure | 13 ----
newlib/libm/configure | 17 +----
newlib/libm/machine/aarch64/configure | 13 ----
newlib/libm/machine/arm/configure | 13 ----
newlib/libm/machine/configure | 17 +----
newlib/libm/machine/i386/configure | 17 +----
newlib/libm/machine/mips/configure | 13 ----
newlib/libm/machine/nds32/configure | 13 ----
newlib/libm/machine/powerpc/configure | 13 ----
newlib/libm/machine/pru/configure | 13 ----
newlib/libm/machine/riscv/configure | 13 ----
newlib/libm/machine/sparc/configure | 13 ----
newlib/libm/machine/spu/configure | 13 ----
newlib/libm/machine/x86_64/configure | 17 +----
115 files changed, 68 insertions(+), 1534 deletions(-)
diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index 9e25b8589b84..1a5dc60dbbbd 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -13,17 +13,6 @@ 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)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- 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,
[ --enable-target-optspace optimize for space],
diff --git a/newlib/configure.ac b/newlib/configure.ac
index f56832247111..31e4586cd674 100644
--- a/newlib/configure.ac
+++ b/newlib/configure.ac
@@ -285,6 +285,7 @@ AC_ARG_ENABLE(newlib-use-gdtoa,
esac
fi], [newlib_use_gdtoa=yes])dnl
+AM_ENABLE_MULTILIB(, ..)
NEWLIB_CONFIGURE(.)
dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic
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 ` Corinna Vinschen
2022-01-21 12:17 ` Mike Frysinger
1 sibling, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2022-01-21 11:23 UTC (permalink / raw)
To: newlib
On Jan 20 22:58, Mike Frysinger wrote:
> 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.
What differences are that? Did you check them?
Corinna
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic
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
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2022-01-21 12:17 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]
On 21 Jan 2022 12:23, Corinna Vinschen wrote:
> On Jan 20 22:58, Mike Frysinger wrote:
> > 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.
>
> What differences are that?
the differences don't affect the actual compilation.
newlib/configure.ac uses AC_CONFIG_FILES to hack up Makefile. multi.m4
uses AC_OUTPUT_COMMANDS instead.
newlib/configure.ac passes LDFLAGS to init-cmds while multi.m4 does not
(it does pass additional non-C toolchain vars that newlib doesn't use).
afaict omitting LDFLAGS shouldn't make a diff since newlib has been
clobbering that with an invalid setting ($ldflags).
there's also a few internal variable names that changed, but since newlib
doesn't check them, it shouldn't matter.
> Did you check them?
yes, i've build every commit against bfin-elf multilib. if you want me
to check something specifically, please highlight it.
-mike
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] newlib: move to ../config/multi.m4 for multilib logic
2022-01-21 12:17 ` Mike Frysinger
@ 2022-01-21 13:26 ` Corinna Vinschen
0 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2022-01-21 13:26 UTC (permalink / raw)
To: newlib
On Jan 21 07:17, Mike Frysinger wrote:
> On 21 Jan 2022 12:23, Corinna Vinschen wrote:
> > On Jan 20 22:58, Mike Frysinger wrote:
> > > 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.
> >
> > What differences are that?
>
> the differences don't affect the actual compilation.
>
> newlib/configure.ac uses AC_CONFIG_FILES to hack up Makefile. multi.m4
> uses AC_OUTPUT_COMMANDS instead.
>
> newlib/configure.ac passes LDFLAGS to init-cmds while multi.m4 does not
> (it does pass additional non-C toolchain vars that newlib doesn't use).
> afaict omitting LDFLAGS shouldn't make a diff since newlib has been
> clobbering that with an invalid setting ($ldflags).
>
> there's also a few internal variable names that changed, but since newlib
> doesn't check them, it shouldn't matter.
>
> > Did you check them?
>
> yes, i've build every commit against bfin-elf multilib. if you want me
> to check something specifically, please highlight it.
> -mike
No it's fine. I just checked again Cygwin which still works,
apparently. Please push.
Thanks,
Corinna
^ 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).