public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/7] modernize toolchain macros
@ 2022-02-05  7:34 Mike Frysinger
  2022-02-05  7:34 ` [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code Mike Frysinger
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

The NEWLIB_CONFIGURE logic had a lot of duplication of older autoconf
toolchain checks to workaround limitations in linking checks.  Since we
use AC_NO_EXECUTABLES and modern autoconf and modern automake versions,
we can clean a bunch of these up.

Mike Frysinger (7):
  newlib: move AC_NO_EXECUTABLES logic up to common code
  newlib: switch to standard AC_PROG_CC
  newlib: switch to standard AM_PROG_AS
  newlib: switch to AM_PROG_AR
  newlib: drop cygnus EXEEXT hack
  newlib: drop autoconf-2.13 hack
  newlib: switch to standard AC_PROG_RANLIB

 newlib/Makefile.in                            |    8 +-
 newlib/acinclude.m4                           |   86 +-
 newlib/aclocal.m4                             |  396 +-
 newlib/configure                              | 3718 ++++++++---------
 newlib/libc/Makefile.in                       |    8 +-
 newlib/libc/aclocal.m4                        |  396 +-
 newlib/libc/argz/Makefile.in                  |    8 +-
 newlib/libc/configure                         | 3422 +++++++--------
 newlib/libc/configure.ac                      |    2 -
 newlib/libc/ctype/Makefile.in                 |    8 +-
 newlib/libc/errno/Makefile.in                 |    8 +-
 newlib/libc/iconv/Makefile.in                 |    8 +-
 newlib/libc/iconv/ccs/Makefile.in             |    8 +-
 newlib/libc/iconv/ccs/binary/Makefile.in      |    8 +-
 newlib/libc/iconv/ces/Makefile.in             |    8 +-
 newlib/libc/iconv/lib/Makefile.in             |    8 +-
 newlib/libc/locale/Makefile.in                |    8 +-
 newlib/libc/machine/a29k/Makefile.in          |    8 +-
 newlib/libc/machine/aarch64/Makefile.in       |    8 +-
 newlib/libc/machine/amdgcn/Makefile.in        |    8 +-
 newlib/libc/machine/arc/Makefile.in           |    8 +-
 newlib/libc/machine/arm/Makefile.in           |    8 +-
 newlib/libc/machine/bfin/Makefile.in          |    8 +-
 newlib/libc/machine/cr16/Makefile.in          |    8 +-
 newlib/libc/machine/cris/Makefile.in          |    8 +-
 newlib/libc/machine/crx/Makefile.in           |    8 +-
 newlib/libc/machine/csky/Makefile.in          |    8 +-
 newlib/libc/machine/d10v/Makefile.in          |    8 +-
 newlib/libc/machine/d30v/Makefile.in          |    8 +-
 newlib/libc/machine/epiphany/Makefile.in      |    8 +-
 newlib/libc/machine/fr30/Makefile.in          |    8 +-
 newlib/libc/machine/frv/Makefile.in           |    8 +-
 newlib/libc/machine/ft32/Makefile.in          |    8 +-
 newlib/libc/machine/h8300/Makefile.in         |    8 +-
 newlib/libc/machine/h8500/Makefile.in         |    8 +-
 newlib/libc/machine/hppa/Makefile.in          |    8 +-
 newlib/libc/machine/i386/Makefile.in          |    8 +-
 newlib/libc/machine/i960/Makefile.in          |    8 +-
 newlib/libc/machine/iq2000/Makefile.in        |    8 +-
 newlib/libc/machine/lm32/Makefile.in          |    8 +-
 newlib/libc/machine/m32c/Makefile.in          |    8 +-
 newlib/libc/machine/m32r/Makefile.in          |    8 +-
 newlib/libc/machine/m68hc11/Makefile.in       |    8 +-
 newlib/libc/machine/m68k/Makefile.in          |    8 +-
 newlib/libc/machine/m88k/Makefile.in          |    8 +-
 newlib/libc/machine/mep/Makefile.in           |    8 +-
 newlib/libc/machine/microblaze/Makefile.in    |    8 +-
 newlib/libc/machine/mips/Makefile.in          |    8 +-
 newlib/libc/machine/mn10200/Makefile.in       |    8 +-
 newlib/libc/machine/mn10300/Makefile.in       |    8 +-
 newlib/libc/machine/moxie/Makefile.in         |    8 +-
 newlib/libc/machine/msp430/Makefile.in        |    8 +-
 newlib/libc/machine/mt/Makefile.in            |    8 +-
 newlib/libc/machine/nds32/Makefile.in         |    8 +-
 newlib/libc/machine/necv70/Makefile.in        |    8 +-
 newlib/libc/machine/nios2/Makefile.in         |    8 +-
 newlib/libc/machine/nvptx/Makefile.in         |    8 +-
 newlib/libc/machine/or1k/Makefile.in          |    8 +-
 newlib/libc/machine/powerpc/Makefile.in       |    8 +-
 newlib/libc/machine/pru/Makefile.in           |    8 +-
 newlib/libc/machine/riscv/Makefile.in         |    8 +-
 newlib/libc/machine/rl78/Makefile.in          |    8 +-
 newlib/libc/machine/rx/Makefile.in            |    8 +-
 newlib/libc/machine/sh/Makefile.in            |    8 +-
 newlib/libc/machine/sparc/Makefile.in         |    8 +-
 newlib/libc/machine/spu/Makefile.in           |    8 +-
 newlib/libc/machine/tic4x/Makefile.in         |    8 +-
 newlib/libc/machine/tic6x/Makefile.in         |    8 +-
 newlib/libc/machine/tic80/Makefile.in         |    8 +-
 newlib/libc/machine/v850/Makefile.in          |    8 +-
 newlib/libc/machine/visium/Makefile.in        |    8 +-
 newlib/libc/machine/w65/Makefile.in           |    8 +-
 newlib/libc/machine/x86_64/Makefile.in        |    8 +-
 newlib/libc/machine/xc16x/Makefile.in         |    8 +-
 newlib/libc/machine/xstormy16/Makefile.in     |    8 +-
 newlib/libc/machine/z8k/Makefile.in           |    8 +-
 newlib/libc/misc/Makefile.in                  |    8 +-
 newlib/libc/posix/Makefile.in                 |    8 +-
 newlib/libc/reent/Makefile.in                 |    8 +-
 newlib/libc/search/Makefile.in                |    8 +-
 newlib/libc/signal/Makefile.in                |    8 +-
 newlib/libc/ssp/Makefile.in                   |    8 +-
 newlib/libc/stdio/Makefile.in                 |    8 +-
 newlib/libc/stdio64/Makefile.in               |    8 +-
 newlib/libc/stdlib/Makefile.in                |    8 +-
 newlib/libc/string/Makefile.in                |    8 +-
 newlib/libc/sys/a29khif/Makefile.in           |    8 +-
 newlib/libc/sys/amdgcn/Makefile.in            |    8 +-
 newlib/libc/sys/arm/Makefile.in               |    8 +-
 newlib/libc/sys/d10v/Makefile.in              |    8 +-
 newlib/libc/sys/decstation/Makefile.in        |    8 +-
 newlib/libc/sys/epiphany/Makefile.in          |    8 +-
 newlib/libc/sys/h8300hms/Makefile.in          |    8 +-
 newlib/libc/sys/h8500hms/Makefile.in          |    8 +-
 newlib/libc/sys/linux/Makefile.in             |    8 +-
 newlib/libc/sys/linux/aclocal.m4              |  396 +-
 newlib/libc/sys/linux/argp/Makefile.in        |    8 +-
 newlib/libc/sys/linux/cmath/Makefile.in       |    8 +-
 newlib/libc/sys/linux/configure               | 3712 ++++++++--------
 newlib/libc/sys/linux/dl/Makefile.in          |    8 +-
 newlib/libc/sys/linux/iconv/Makefile.in       |    8 +-
 newlib/libc/sys/linux/intl/Makefile.in        |    8 +-
 .../libc/sys/linux/linuxthreads/Makefile.in   |    8 +-
 newlib/libc/sys/linux/linuxthreads/aclocal.m4 |  396 +-
 newlib/libc/sys/linux/linuxthreads/configure  | 3712 ++++++++--------
 .../linux/linuxthreads/machine/Makefile.in    |    6 +-
 .../sys/linux/linuxthreads/machine/aclocal.m4 |  396 +-
 .../sys/linux/linuxthreads/machine/configure  | 3712 ++++++++--------
 .../linuxthreads/machine/i386/Makefile.in     |    6 +-
 .../linuxthreads/machine/i386/aclocal.m4      |  396 +-
 .../linux/linuxthreads/machine/i386/configure | 3712 ++++++++--------
 newlib/libc/sys/linux/machine/Makefile.in     |    8 +-
 newlib/libc/sys/linux/machine/aclocal.m4      |  396 +-
 newlib/libc/sys/linux/machine/configure       | 3712 ++++++++--------
 .../libc/sys/linux/machine/i386/Makefile.in   |    6 +-
 newlib/libc/sys/linux/machine/i386/aclocal.m4 |  396 +-
 newlib/libc/sys/linux/machine/i386/configure  | 3712 ++++++++--------
 newlib/libc/sys/linux/net/Makefile.in         |    8 +-
 newlib/libc/sys/m88kbug/Makefile.in           |    8 +-
 newlib/libc/sys/mmixware/Makefile.in          |    8 +-
 newlib/libc/sys/netware/Makefile.in           |    8 +-
 newlib/libc/sys/or1k/Makefile.in              |    8 +-
 newlib/libc/sys/phoenix/Makefile.in           |   15 +-
 newlib/libc/sys/phoenix/aclocal.m4            |  460 +-
 newlib/libc/sys/phoenix/configure             | 2244 ++++++----
 newlib/libc/sys/phoenix/machine/Makefile.in   |   15 +-
 newlib/libc/sys/phoenix/machine/aclocal.m4    |  460 +-
 .../libc/sys/phoenix/machine/arm/Makefile.in  |   13 +-
 .../libc/sys/phoenix/machine/arm/aclocal.m4   |  460 +-
 newlib/libc/sys/phoenix/machine/arm/configure | 2244 ++++++----
 newlib/libc/sys/phoenix/machine/configure     | 2244 ++++++----
 newlib/libc/sys/rdos/Makefile.in              |    8 +-
 newlib/libc/sys/rtems/Makefile.in             |    8 +-
 newlib/libc/sys/sh/Makefile.in                |    8 +-
 newlib/libc/sys/sparc64/Makefile.in           |    8 +-
 newlib/libc/sys/sun4/Makefile.in              |    8 +-
 newlib/libc/sys/sysmec/Makefile.in            |    8 +-
 newlib/libc/sys/sysnec810/Makefile.in         |    8 +-
 newlib/libc/sys/sysnecv850/Makefile.in        |    8 +-
 newlib/libc/sys/sysvi386/Makefile.in          |    8 +-
 newlib/libc/sys/sysvnecv70/Makefile.in        |    8 +-
 newlib/libc/sys/tic80/Makefile.in             |    8 +-
 newlib/libc/sys/tirtos/Makefile.in            |    8 +-
 newlib/libc/sys/w65/Makefile.in               |    8 +-
 newlib/libc/sys/z8ksim/Makefile.in            |    8 +-
 newlib/libc/syscalls/Makefile.in              |    8 +-
 newlib/libc/time/Makefile.in                  |    8 +-
 newlib/libc/unix/Makefile.in                  |    8 +-
 newlib/libc/xdr/Makefile.in                   |    8 +-
 newlib/libm/Makefile.in                       |    8 +-
 newlib/libm/aclocal.m4                        |  396 +-
 newlib/libm/common/Makefile.in                |    8 +-
 newlib/libm/complex/Makefile.in               |    8 +-
 newlib/libm/configure                         | 3422 +++++++--------
 newlib/libm/configure.ac                      |    2 -
 newlib/libm/fenv/Makefile.in                  |    8 +-
 newlib/libm/machine/aarch64/Makefile.in       |    8 +-
 newlib/libm/machine/arm/Makefile.in           |    8 +-
 newlib/libm/machine/i386/Makefile.in          |    8 +-
 newlib/libm/machine/mips/Makefile.in          |    8 +-
 newlib/libm/machine/nds32/Makefile.in         |    8 +-
 newlib/libm/machine/powerpc/Makefile.in       |    8 +-
 newlib/libm/machine/pru/Makefile.in           |    8 +-
 newlib/libm/machine/riscv/Makefile.in         |    8 +-
 newlib/libm/machine/sparc/Makefile.in         |    8 +-
 newlib/libm/machine/spu/Makefile.in           |    8 +-
 newlib/libm/machine/x86_64/Makefile.in        |    8 +-
 newlib/libm/math/Makefile.in                  |    8 +-
 newlib/libm/mathfp/Makefile.in                |    8 +-
 169 files changed, 19937 insertions(+), 25812 deletions(-)

-- 
2.34.1


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

* [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
@ 2022-02-05  7:34 ` Mike Frysinger
  2022-02-09 19:42   ` Jon Turney
  2022-02-05  7:34 ` [PATCH 2/7] newlib: switch to standard AC_PROG_CC Mike Frysinger
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

This logic was added to libc & libm to get it working again after some
reworks in the CPP handling, but now that that's settled, let's move
this to the common newlib configure logic.  This will make it easier
to consolidate all the configure calls into the top-level newlib dir.

This does create a lot of noise in the generate scripts, but that's
because of the ordering of the calls, not because of correctness. We
will try to draw that back down in follow up commits as we modernize
the toolchain calls in here.
---
 newlib/acinclude.m4                           |    3 +
 newlib/configure                              | 3828 +++++++++--------
 newlib/libc/configure                         | 3568 +++++++--------
 newlib/libc/configure.ac                      |    2 -
 newlib/libc/sys/linux/configure               | 3828 +++++++++--------
 newlib/libc/sys/linux/linuxthreads/configure  | 3828 +++++++++--------
 .../sys/linux/linuxthreads/machine/configure  | 3828 +++++++++--------
 .../linux/linuxthreads/machine/i386/configure | 3828 +++++++++--------
 newlib/libc/sys/linux/machine/configure       | 3828 +++++++++--------
 newlib/libc/sys/linux/machine/i386/configure  | 3828 +++++++++--------
 newlib/libc/sys/phoenix/Makefile.in           |    6 +
 newlib/libc/sys/phoenix/aclocal.m4            |   64 +
 newlib/libc/sys/phoenix/configure             | 1405 +++++-
 newlib/libc/sys/phoenix/machine/Makefile.in   |    6 +
 newlib/libc/sys/phoenix/machine/aclocal.m4    |   64 +
 .../libc/sys/phoenix/machine/arm/Makefile.in  |    6 +
 .../libc/sys/phoenix/machine/arm/aclocal.m4   |   64 +
 newlib/libc/sys/phoenix/machine/arm/configure | 1405 +++++-
 newlib/libc/sys/phoenix/machine/configure     | 1405 +++++-
 newlib/libm/configure                         | 3568 +++++++--------
 newlib/libm/configure.ac                      |    2 -
 21 files changed, 21391 insertions(+), 16973 deletions(-)

diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index 888d417943e3..c851d622e942 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -118,6 +118,8 @@ AM_INIT_AUTOMAKE([foreign no-installinfo no-dependencies no-dist no-define subdi
 AM_MAINTAINER_MODE()
 AM_SILENT_RULES(yes)
 
+AC_NO_EXECUTABLES
+
 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
 # are probably using a cross compiler, which will not be able to fully
@@ -180,6 +182,7 @@ fi
 ])
 
 LIB_AC_PROG_CC
+AC_REQUIRE([AC_PROG_CPP])dnl
 
 AC_CHECK_TOOL(AS, as)
 AC_CHECK_TOOL(AR, ar)
diff --git a/newlib/libc/configure.ac b/newlib/libc/configure.ac
index 14b6aa466cd3..c24021c1d539 100644
--- a/newlib/libc/configure.ac
+++ b/newlib/libc/configure.ac
@@ -45,9 +45,7 @@ AC_ARG_ENABLE(newlib-retargetable-locking,
  esac],[newlib_retargetable_locking=no])
 AM_CONDITIONAL(NEWLIB_RETARGETABLE_LOCKING, test x$newlib_retargetable_locking = xyes)
 
-AC_NO_EXECUTABLES
 NEWLIB_CONFIGURE(..)
-AC_PROG_CPP
 
 AM_CONDITIONAL(NEWLIB_NANO_MALLOC, test x$newlib_nano_malloc = xyes)
 
diff --git a/newlib/libm/configure.ac b/newlib/libm/configure.ac
index a03ea3872bd5..e4611ed846dd 100644
--- a/newlib/libm/configure.ac
+++ b/newlib/libm/configure.ac
@@ -16,9 +16,7 @@ AM_CONDITIONAL(NEWLIB_HW_FP, test x$newlib_hw_fp = xtrue)
 dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
 AC_CONFIG_AUX_DIR(../..)
 
-AC_NO_EXECUTABLES
 NEWLIB_CONFIGURE(..)
-AC_PROG_CPP
 
 dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
 dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-- 
2.34.1


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

* [PATCH 2/7] newlib: switch to standard AC_PROG_CC
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
  2022-02-05  7:34 ` [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code Mike Frysinger
@ 2022-02-05  7:34 ` Mike Frysinger
  2022-02-05  7:34 ` [PATCH 3/7] newlib: switch to standard AM_PROG_AS Mike Frysinger
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

Now that we use AC_NO_EXECUTABLES, and we require a recent version of
autoconf, we don't need to define our own copies of these macros.  So
switch to the standard AC_PROG_CC.
---
 newlib/Makefile.in                            |   7 +-
 newlib/acinclude.m4                           |  55 +-
 newlib/aclocal.m4                             | 316 ----------
 newlib/configure                              | 540 +----------------
 newlib/libc/Makefile.in                       |   7 +-
 newlib/libc/aclocal.m4                        | 316 ----------
 newlib/libc/argz/Makefile.in                  |   7 +-
 newlib/libc/configure                         | 540 +----------------
 newlib/libc/ctype/Makefile.in                 |   7 +-
 newlib/libc/errno/Makefile.in                 |   7 +-
 newlib/libc/iconv/Makefile.in                 |   7 +-
 newlib/libc/iconv/ccs/Makefile.in             |   7 +-
 newlib/libc/iconv/ccs/binary/Makefile.in      |   7 +-
 newlib/libc/iconv/ces/Makefile.in             |   7 +-
 newlib/libc/iconv/lib/Makefile.in             |   7 +-
 newlib/libc/locale/Makefile.in                |   7 +-
 newlib/libc/machine/a29k/Makefile.in          |   7 +-
 newlib/libc/machine/aarch64/Makefile.in       |   7 +-
 newlib/libc/machine/amdgcn/Makefile.in        |   7 +-
 newlib/libc/machine/arc/Makefile.in           |   7 +-
 newlib/libc/machine/arm/Makefile.in           |   7 +-
 newlib/libc/machine/bfin/Makefile.in          |   7 +-
 newlib/libc/machine/cr16/Makefile.in          |   7 +-
 newlib/libc/machine/cris/Makefile.in          |   7 +-
 newlib/libc/machine/crx/Makefile.in           |   7 +-
 newlib/libc/machine/csky/Makefile.in          |   7 +-
 newlib/libc/machine/d10v/Makefile.in          |   7 +-
 newlib/libc/machine/d30v/Makefile.in          |   7 +-
 newlib/libc/machine/epiphany/Makefile.in      |   7 +-
 newlib/libc/machine/fr30/Makefile.in          |   7 +-
 newlib/libc/machine/frv/Makefile.in           |   7 +-
 newlib/libc/machine/ft32/Makefile.in          |   7 +-
 newlib/libc/machine/h8300/Makefile.in         |   7 +-
 newlib/libc/machine/h8500/Makefile.in         |   7 +-
 newlib/libc/machine/hppa/Makefile.in          |   7 +-
 newlib/libc/machine/i386/Makefile.in          |   7 +-
 newlib/libc/machine/i960/Makefile.in          |   7 +-
 newlib/libc/machine/iq2000/Makefile.in        |   7 +-
 newlib/libc/machine/lm32/Makefile.in          |   7 +-
 newlib/libc/machine/m32c/Makefile.in          |   7 +-
 newlib/libc/machine/m32r/Makefile.in          |   7 +-
 newlib/libc/machine/m68hc11/Makefile.in       |   7 +-
 newlib/libc/machine/m68k/Makefile.in          |   7 +-
 newlib/libc/machine/m88k/Makefile.in          |   7 +-
 newlib/libc/machine/mep/Makefile.in           |   7 +-
 newlib/libc/machine/microblaze/Makefile.in    |   7 +-
 newlib/libc/machine/mips/Makefile.in          |   7 +-
 newlib/libc/machine/mn10200/Makefile.in       |   7 +-
 newlib/libc/machine/mn10300/Makefile.in       |   7 +-
 newlib/libc/machine/moxie/Makefile.in         |   7 +-
 newlib/libc/machine/msp430/Makefile.in        |   7 +-
 newlib/libc/machine/mt/Makefile.in            |   7 +-
 newlib/libc/machine/nds32/Makefile.in         |   7 +-
 newlib/libc/machine/necv70/Makefile.in        |   7 +-
 newlib/libc/machine/nios2/Makefile.in         |   7 +-
 newlib/libc/machine/nvptx/Makefile.in         |   7 +-
 newlib/libc/machine/or1k/Makefile.in          |   7 +-
 newlib/libc/machine/powerpc/Makefile.in       |   7 +-
 newlib/libc/machine/pru/Makefile.in           |   7 +-
 newlib/libc/machine/riscv/Makefile.in         |   7 +-
 newlib/libc/machine/rl78/Makefile.in          |   7 +-
 newlib/libc/machine/rx/Makefile.in            |   7 +-
 newlib/libc/machine/sh/Makefile.in            |   7 +-
 newlib/libc/machine/sparc/Makefile.in         |   7 +-
 newlib/libc/machine/spu/Makefile.in           |   7 +-
 newlib/libc/machine/tic4x/Makefile.in         |   7 +-
 newlib/libc/machine/tic6x/Makefile.in         |   7 +-
 newlib/libc/machine/tic80/Makefile.in         |   7 +-
 newlib/libc/machine/v850/Makefile.in          |   7 +-
 newlib/libc/machine/visium/Makefile.in        |   7 +-
 newlib/libc/machine/w65/Makefile.in           |   7 +-
 newlib/libc/machine/x86_64/Makefile.in        |   7 +-
 newlib/libc/machine/xc16x/Makefile.in         |   7 +-
 newlib/libc/machine/xstormy16/Makefile.in     |   7 +-
 newlib/libc/machine/z8k/Makefile.in           |   7 +-
 newlib/libc/misc/Makefile.in                  |   7 +-
 newlib/libc/posix/Makefile.in                 |   7 +-
 newlib/libc/reent/Makefile.in                 |   7 +-
 newlib/libc/search/Makefile.in                |   7 +-
 newlib/libc/signal/Makefile.in                |   7 +-
 newlib/libc/ssp/Makefile.in                   |   7 +-
 newlib/libc/stdio/Makefile.in                 |   7 +-
 newlib/libc/stdio64/Makefile.in               |   7 +-
 newlib/libc/stdlib/Makefile.in                |   7 +-
 newlib/libc/string/Makefile.in                |   7 +-
 newlib/libc/sys/a29khif/Makefile.in           |   7 +-
 newlib/libc/sys/amdgcn/Makefile.in            |   7 +-
 newlib/libc/sys/arm/Makefile.in               |   7 +-
 newlib/libc/sys/d10v/Makefile.in              |   7 +-
 newlib/libc/sys/decstation/Makefile.in        |   7 +-
 newlib/libc/sys/epiphany/Makefile.in          |   7 +-
 newlib/libc/sys/h8300hms/Makefile.in          |   7 +-
 newlib/libc/sys/h8500hms/Makefile.in          |   7 +-
 newlib/libc/sys/linux/Makefile.in             |   7 +-
 newlib/libc/sys/linux/aclocal.m4              | 316 ----------
 newlib/libc/sys/linux/argp/Makefile.in        |   7 +-
 newlib/libc/sys/linux/cmath/Makefile.in       |   7 +-
 newlib/libc/sys/linux/configure               | 540 +----------------
 newlib/libc/sys/linux/dl/Makefile.in          |   7 +-
 newlib/libc/sys/linux/iconv/Makefile.in       |   7 +-
 newlib/libc/sys/linux/intl/Makefile.in        |   7 +-
 .../libc/sys/linux/linuxthreads/Makefile.in   |   7 +-
 newlib/libc/sys/linux/linuxthreads/aclocal.m4 | 316 ----------
 newlib/libc/sys/linux/linuxthreads/configure  | 540 +----------------
 .../linux/linuxthreads/machine/Makefile.in    |   5 -
 .../sys/linux/linuxthreads/machine/aclocal.m4 | 316 ----------
 .../sys/linux/linuxthreads/machine/configure  | 540 +----------------
 .../linuxthreads/machine/i386/Makefile.in     |   5 -
 .../linuxthreads/machine/i386/aclocal.m4      | 316 ----------
 .../linux/linuxthreads/machine/i386/configure | 540 +----------------
 newlib/libc/sys/linux/machine/Makefile.in     |   7 +-
 newlib/libc/sys/linux/machine/aclocal.m4      | 316 ----------
 newlib/libc/sys/linux/machine/configure       | 540 +----------------
 .../libc/sys/linux/machine/i386/Makefile.in   |   5 -
 newlib/libc/sys/linux/machine/i386/aclocal.m4 | 316 ----------
 newlib/libc/sys/linux/machine/i386/configure  | 540 +----------------
 newlib/libc/sys/linux/net/Makefile.in         |   7 +-
 newlib/libc/sys/m88kbug/Makefile.in           |   7 +-
 newlib/libc/sys/mmixware/Makefile.in          |   7 +-
 newlib/libc/sys/netware/Makefile.in           |   7 +-
 newlib/libc/sys/or1k/Makefile.in              |   7 +-
 newlib/libc/sys/phoenix/Makefile.in           |   7 +-
 newlib/libc/sys/phoenix/aclocal.m4            | 316 ----------
 newlib/libc/sys/phoenix/configure             | 553 +-----------------
 newlib/libc/sys/phoenix/machine/Makefile.in   |   7 +-
 newlib/libc/sys/phoenix/machine/aclocal.m4    | 316 ----------
 .../libc/sys/phoenix/machine/arm/Makefile.in  |   5 -
 .../libc/sys/phoenix/machine/arm/aclocal.m4   | 316 ----------
 newlib/libc/sys/phoenix/machine/arm/configure | 553 +-----------------
 newlib/libc/sys/phoenix/machine/configure     | 553 +-----------------
 newlib/libc/sys/rdos/Makefile.in              |   7 +-
 newlib/libc/sys/rtems/Makefile.in             |   7 +-
 newlib/libc/sys/sh/Makefile.in                |   7 +-
 newlib/libc/sys/sparc64/Makefile.in           |   7 +-
 newlib/libc/sys/sun4/Makefile.in              |   7 +-
 newlib/libc/sys/sysmec/Makefile.in            |   7 +-
 newlib/libc/sys/sysnec810/Makefile.in         |   7 +-
 newlib/libc/sys/sysnecv850/Makefile.in        |   7 +-
 newlib/libc/sys/sysvi386/Makefile.in          |   7 +-
 newlib/libc/sys/sysvnecv70/Makefile.in        |   7 +-
 newlib/libc/sys/tic80/Makefile.in             |   7 +-
 newlib/libc/sys/tirtos/Makefile.in            |   7 +-
 newlib/libc/sys/w65/Makefile.in               |   7 +-
 newlib/libc/sys/z8ksim/Makefile.in            |   7 +-
 newlib/libc/syscalls/Makefile.in              |   7 +-
 newlib/libc/time/Makefile.in                  |   7 +-
 newlib/libc/unix/Makefile.in                  |   7 +-
 newlib/libc/xdr/Makefile.in                   |   7 +-
 newlib/libm/Makefile.in                       |   7 +-
 newlib/libm/aclocal.m4                        | 316 ----------
 newlib/libm/common/Makefile.in                |   7 +-
 newlib/libm/complex/Makefile.in               |   7 +-
 newlib/libm/configure                         | 540 +----------------
 newlib/libm/fenv/Makefile.in                  |   7 +-
 newlib/libm/machine/aarch64/Makefile.in       |   7 +-
 newlib/libm/machine/arm/Makefile.in           |   7 +-
 newlib/libm/machine/i386/Makefile.in          |   7 +-
 newlib/libm/machine/mips/Makefile.in          |   7 +-
 newlib/libm/machine/nds32/Makefile.in         |   7 +-
 newlib/libm/machine/powerpc/Makefile.in       |   7 +-
 newlib/libm/machine/pru/Makefile.in           |   7 +-
 newlib/libm/machine/riscv/Makefile.in         |   7 +-
 newlib/libm/machine/sparc/Makefile.in         |   7 +-
 newlib/libm/machine/spu/Makefile.in           |   7 +-
 newlib/libm/machine/x86_64/Makefile.in        |   7 +-
 newlib/libm/math/Makefile.in                  |   7 +-
 newlib/libm/mathfp/Makefile.in                |   7 +-
 167 files changed, 160 insertions(+), 11192 deletions(-)

diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index c851d622e942..a2a383335314 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -120,68 +120,15 @@ AM_SILENT_RULES(yes)
 
 AC_NO_EXECUTABLES
 
-# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable.  This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi])])
-
 AC_DEFUN([LIB_AM_PROG_AS],
 [# By default we simply use the C compiler to build assembly code.
-AC_REQUIRE([LIB_AC_PROG_CC])
 test "${CCAS+set}" = set || CCAS=$CC
 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
 ])
 
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-_AM_DEPENDENCIES(CC)
-if test -z "$CC"; then
-  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
-  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-LIB_AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  _AC_PROG_CC_G
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-O2"
-  fi
-else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
+AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 
 AC_CHECK_TOOL(AS, as)
-- 
2.34.1


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

* [PATCH 3/7] newlib: switch to standard AM_PROG_AS
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
  2022-02-05  7:34 ` [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code Mike Frysinger
  2022-02-05  7:34 ` [PATCH 2/7] newlib: switch to standard AC_PROG_CC Mike Frysinger
@ 2022-02-05  7:34 ` Mike Frysinger
  2022-02-05  7:34 ` [PATCH 4/7] newlib: switch to AM_PROG_AR Mike Frysinger
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

Now that we require a recent automake version, rely on it to provide AS
and CCAS and CCASFLAGS for us.
---
 newlib/acinclude.m4                           |  11 +-
 newlib/aclocal.m4                             |  20 +++
 newlib/configure                              | 117 ++----------------
 newlib/libc/aclocal.m4                        |  20 +++
 newlib/libc/configure                         | 117 ++----------------
 newlib/libc/sys/linux/aclocal.m4              |  20 +++
 newlib/libc/sys/linux/configure               | 117 ++----------------
 newlib/libc/sys/linux/linuxthreads/aclocal.m4 |  20 +++
 newlib/libc/sys/linux/linuxthreads/configure  | 117 ++----------------
 .../sys/linux/linuxthreads/machine/aclocal.m4 |  20 +++
 .../sys/linux/linuxthreads/machine/configure  | 117 ++----------------
 .../linuxthreads/machine/i386/aclocal.m4      |  20 +++
 .../linux/linuxthreads/machine/i386/configure | 117 ++----------------
 newlib/libc/sys/linux/machine/aclocal.m4      |  20 +++
 newlib/libc/sys/linux/machine/configure       | 117 ++----------------
 newlib/libc/sys/linux/machine/i386/aclocal.m4 |  20 +++
 newlib/libc/sys/linux/machine/i386/configure  | 117 ++----------------
 newlib/libc/sys/phoenix/Makefile.in           |   1 -
 newlib/libc/sys/phoenix/aclocal.m4            |  20 +++
 newlib/libc/sys/phoenix/configure             | 112 ++---------------
 newlib/libc/sys/phoenix/machine/Makefile.in   |   1 -
 newlib/libc/sys/phoenix/machine/aclocal.m4    |  20 +++
 .../libc/sys/phoenix/machine/arm/Makefile.in  |   1 -
 .../libc/sys/phoenix/machine/arm/aclocal.m4   |  20 +++
 newlib/libc/sys/phoenix/machine/arm/configure | 112 ++---------------
 newlib/libc/sys/phoenix/machine/configure     | 112 ++---------------
 newlib/libm/aclocal.m4                        |  20 +++
 newlib/libm/configure                         | 117 ++----------------
 28 files changed, 376 insertions(+), 1267 deletions(-)

diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index a2a383335314..19e86f8691fe 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -120,18 +120,10 @@ AM_SILENT_RULES(yes)
 
 AC_NO_EXECUTABLES
 
-AC_DEFUN([LIB_AM_PROG_AS],
-[# By default we simply use the C compiler to build assembly code.
-test "${CCAS+set}" = set || CCAS=$CC
-test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
-AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
-AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
-])
-
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 
-AC_CHECK_TOOL(AS, as)
+AC_REQUIRE([AM_PROG_AS])dnl
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 AC_CHECK_TOOL(READELF, readelf, :)
@@ -145,7 +137,6 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 ac_given_INSTALL=$INSTALL
 
 AM_MAINTAINER_MODE
-LIB_AM_PROG_AS
 
 # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
 # at least currently, we never actually build a program, so we never
-- 
2.34.1


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

* [PATCH 4/7] newlib: switch to AM_PROG_AR
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
                   ` (2 preceding siblings ...)
  2022-02-05  7:34 ` [PATCH 3/7] newlib: switch to standard AM_PROG_AS Mike Frysinger
@ 2022-02-05  7:34 ` Mike Frysinger
  2022-02-05  7:34 ` [PATCH 5/7] newlib: drop cygnus EXEEXT hack Mike Frysinger
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

Now that we require automake-1.15
---
 newlib/Makefile.in                            |   1 +
 newlib/acinclude.m4                           |   2 +-
 newlib/aclocal.m4                             |  60 ++++
 newlib/configure                              | 270 ++++++++++++------
 newlib/libc/Makefile.in                       |   1 +
 newlib/libc/aclocal.m4                        |  60 ++++
 newlib/libc/argz/Makefile.in                  |   1 +
 newlib/libc/configure                         | 270 ++++++++++++------
 newlib/libc/ctype/Makefile.in                 |   1 +
 newlib/libc/errno/Makefile.in                 |   1 +
 newlib/libc/iconv/Makefile.in                 |   1 +
 newlib/libc/iconv/ccs/Makefile.in             |   1 +
 newlib/libc/iconv/ccs/binary/Makefile.in      |   1 +
 newlib/libc/iconv/ces/Makefile.in             |   1 +
 newlib/libc/iconv/lib/Makefile.in             |   1 +
 newlib/libc/locale/Makefile.in                |   1 +
 newlib/libc/machine/a29k/Makefile.in          |   1 +
 newlib/libc/machine/aarch64/Makefile.in       |   1 +
 newlib/libc/machine/amdgcn/Makefile.in        |   1 +
 newlib/libc/machine/arc/Makefile.in           |   1 +
 newlib/libc/machine/arm/Makefile.in           |   1 +
 newlib/libc/machine/bfin/Makefile.in          |   1 +
 newlib/libc/machine/cr16/Makefile.in          |   1 +
 newlib/libc/machine/cris/Makefile.in          |   1 +
 newlib/libc/machine/crx/Makefile.in           |   1 +
 newlib/libc/machine/csky/Makefile.in          |   1 +
 newlib/libc/machine/d10v/Makefile.in          |   1 +
 newlib/libc/machine/d30v/Makefile.in          |   1 +
 newlib/libc/machine/epiphany/Makefile.in      |   1 +
 newlib/libc/machine/fr30/Makefile.in          |   1 +
 newlib/libc/machine/frv/Makefile.in           |   1 +
 newlib/libc/machine/ft32/Makefile.in          |   1 +
 newlib/libc/machine/h8300/Makefile.in         |   1 +
 newlib/libc/machine/h8500/Makefile.in         |   1 +
 newlib/libc/machine/hppa/Makefile.in          |   1 +
 newlib/libc/machine/i386/Makefile.in          |   1 +
 newlib/libc/machine/i960/Makefile.in          |   1 +
 newlib/libc/machine/iq2000/Makefile.in        |   1 +
 newlib/libc/machine/lm32/Makefile.in          |   1 +
 newlib/libc/machine/m32c/Makefile.in          |   1 +
 newlib/libc/machine/m32r/Makefile.in          |   1 +
 newlib/libc/machine/m68hc11/Makefile.in       |   1 +
 newlib/libc/machine/m68k/Makefile.in          |   1 +
 newlib/libc/machine/m88k/Makefile.in          |   1 +
 newlib/libc/machine/mep/Makefile.in           |   1 +
 newlib/libc/machine/microblaze/Makefile.in    |   1 +
 newlib/libc/machine/mips/Makefile.in          |   1 +
 newlib/libc/machine/mn10200/Makefile.in       |   1 +
 newlib/libc/machine/mn10300/Makefile.in       |   1 +
 newlib/libc/machine/moxie/Makefile.in         |   1 +
 newlib/libc/machine/msp430/Makefile.in        |   1 +
 newlib/libc/machine/mt/Makefile.in            |   1 +
 newlib/libc/machine/nds32/Makefile.in         |   1 +
 newlib/libc/machine/necv70/Makefile.in        |   1 +
 newlib/libc/machine/nios2/Makefile.in         |   1 +
 newlib/libc/machine/nvptx/Makefile.in         |   1 +
 newlib/libc/machine/or1k/Makefile.in          |   1 +
 newlib/libc/machine/powerpc/Makefile.in       |   1 +
 newlib/libc/machine/pru/Makefile.in           |   1 +
 newlib/libc/machine/riscv/Makefile.in         |   1 +
 newlib/libc/machine/rl78/Makefile.in          |   1 +
 newlib/libc/machine/rx/Makefile.in            |   1 +
 newlib/libc/machine/sh/Makefile.in            |   1 +
 newlib/libc/machine/sparc/Makefile.in         |   1 +
 newlib/libc/machine/spu/Makefile.in           |   1 +
 newlib/libc/machine/tic4x/Makefile.in         |   1 +
 newlib/libc/machine/tic6x/Makefile.in         |   1 +
 newlib/libc/machine/tic80/Makefile.in         |   1 +
 newlib/libc/machine/v850/Makefile.in          |   1 +
 newlib/libc/machine/visium/Makefile.in        |   1 +
 newlib/libc/machine/w65/Makefile.in           |   1 +
 newlib/libc/machine/x86_64/Makefile.in        |   1 +
 newlib/libc/machine/xc16x/Makefile.in         |   1 +
 newlib/libc/machine/xstormy16/Makefile.in     |   1 +
 newlib/libc/machine/z8k/Makefile.in           |   1 +
 newlib/libc/misc/Makefile.in                  |   1 +
 newlib/libc/posix/Makefile.in                 |   1 +
 newlib/libc/reent/Makefile.in                 |   1 +
 newlib/libc/search/Makefile.in                |   1 +
 newlib/libc/signal/Makefile.in                |   1 +
 newlib/libc/ssp/Makefile.in                   |   1 +
 newlib/libc/stdio/Makefile.in                 |   1 +
 newlib/libc/stdio64/Makefile.in               |   1 +
 newlib/libc/stdlib/Makefile.in                |   1 +
 newlib/libc/string/Makefile.in                |   1 +
 newlib/libc/sys/a29khif/Makefile.in           |   1 +
 newlib/libc/sys/amdgcn/Makefile.in            |   1 +
 newlib/libc/sys/arm/Makefile.in               |   1 +
 newlib/libc/sys/d10v/Makefile.in              |   1 +
 newlib/libc/sys/decstation/Makefile.in        |   1 +
 newlib/libc/sys/epiphany/Makefile.in          |   1 +
 newlib/libc/sys/h8300hms/Makefile.in          |   1 +
 newlib/libc/sys/h8500hms/Makefile.in          |   1 +
 newlib/libc/sys/linux/Makefile.in             |   1 +
 newlib/libc/sys/linux/aclocal.m4              |  60 ++++
 newlib/libc/sys/linux/argp/Makefile.in        |   1 +
 newlib/libc/sys/linux/cmath/Makefile.in       |   1 +
 newlib/libc/sys/linux/configure               | 270 ++++++++++++------
 newlib/libc/sys/linux/dl/Makefile.in          |   1 +
 newlib/libc/sys/linux/iconv/Makefile.in       |   1 +
 newlib/libc/sys/linux/intl/Makefile.in        |   1 +
 .../libc/sys/linux/linuxthreads/Makefile.in   |   1 +
 newlib/libc/sys/linux/linuxthreads/aclocal.m4 |  60 ++++
 newlib/libc/sys/linux/linuxthreads/configure  | 270 ++++++++++++------
 .../linux/linuxthreads/machine/Makefile.in    |   1 +
 .../sys/linux/linuxthreads/machine/aclocal.m4 |  60 ++++
 .../sys/linux/linuxthreads/machine/configure  | 270 ++++++++++++------
 .../linuxthreads/machine/i386/Makefile.in     |   1 +
 .../linuxthreads/machine/i386/aclocal.m4      |  60 ++++
 .../linux/linuxthreads/machine/i386/configure | 270 ++++++++++++------
 newlib/libc/sys/linux/machine/Makefile.in     |   1 +
 newlib/libc/sys/linux/machine/aclocal.m4      |  60 ++++
 newlib/libc/sys/linux/machine/configure       | 270 ++++++++++++------
 .../libc/sys/linux/machine/i386/Makefile.in   |   1 +
 newlib/libc/sys/linux/machine/i386/aclocal.m4 |  60 ++++
 newlib/libc/sys/linux/machine/i386/configure  | 270 ++++++++++++------
 newlib/libc/sys/linux/net/Makefile.in         |   1 +
 newlib/libc/sys/m88kbug/Makefile.in           |   1 +
 newlib/libc/sys/mmixware/Makefile.in          |   1 +
 newlib/libc/sys/netware/Makefile.in           |   1 +
 newlib/libc/sys/or1k/Makefile.in              |   1 +
 newlib/libc/sys/phoenix/Makefile.in           |   1 +
 newlib/libc/sys/phoenix/aclocal.m4            |  60 ++++
 newlib/libc/sys/phoenix/configure             | 265 +++++++++++------
 newlib/libc/sys/phoenix/machine/Makefile.in   |   1 +
 newlib/libc/sys/phoenix/machine/aclocal.m4    |  60 ++++
 .../libc/sys/phoenix/machine/arm/Makefile.in  |   1 +
 .../libc/sys/phoenix/machine/arm/aclocal.m4   |  60 ++++
 newlib/libc/sys/phoenix/machine/arm/configure | 265 +++++++++++------
 newlib/libc/sys/phoenix/machine/configure     | 265 +++++++++++------
 newlib/libc/sys/rdos/Makefile.in              |   1 +
 newlib/libc/sys/rtems/Makefile.in             |   1 +
 newlib/libc/sys/sh/Makefile.in                |   1 +
 newlib/libc/sys/sparc64/Makefile.in           |   1 +
 newlib/libc/sys/sun4/Makefile.in              |   1 +
 newlib/libc/sys/sysmec/Makefile.in            |   1 +
 newlib/libc/sys/sysnec810/Makefile.in         |   1 +
 newlib/libc/sys/sysnecv850/Makefile.in        |   1 +
 newlib/libc/sys/sysvi386/Makefile.in          |   1 +
 newlib/libc/sys/sysvnecv70/Makefile.in        |   1 +
 newlib/libc/sys/tic80/Makefile.in             |   1 +
 newlib/libc/sys/tirtos/Makefile.in            |   1 +
 newlib/libc/sys/w65/Makefile.in               |   1 +
 newlib/libc/sys/z8ksim/Makefile.in            |   1 +
 newlib/libc/syscalls/Makefile.in              |   1 +
 newlib/libc/time/Makefile.in                  |   1 +
 newlib/libc/unix/Makefile.in                  |   1 +
 newlib/libc/xdr/Makefile.in                   |   1 +
 newlib/libm/Makefile.in                       |   1 +
 newlib/libm/aclocal.m4                        |  60 ++++
 newlib/libm/common/Makefile.in                |   1 +
 newlib/libm/complex/Makefile.in               |   1 +
 newlib/libm/configure                         | 270 ++++++++++++------
 newlib/libm/fenv/Makefile.in                  |   1 +
 newlib/libm/machine/aarch64/Makefile.in       |   1 +
 newlib/libm/machine/arm/Makefile.in           |   1 +
 newlib/libm/machine/i386/Makefile.in          |   1 +
 newlib/libm/machine/mips/Makefile.in          |   1 +
 newlib/libm/machine/nds32/Makefile.in         |   1 +
 newlib/libm/machine/powerpc/Makefile.in       |   1 +
 newlib/libm/machine/pru/Makefile.in           |   1 +
 newlib/libm/machine/riscv/Makefile.in         |   1 +
 newlib/libm/machine/sparc/Makefile.in         |   1 +
 newlib/libm/machine/spu/Makefile.in           |   1 +
 newlib/libm/machine/x86_64/Makefile.in        |   1 +
 newlib/libm/math/Makefile.in                  |   1 +
 newlib/libm/mathfp/Makefile.in                |   1 +
 167 files changed, 2957 insertions(+), 1132 deletions(-)

diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index 19e86f8691fe..8c5122b5fc2f 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -124,7 +124,7 @@ AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 
 AC_REQUIRE([AM_PROG_AS])dnl
-AC_CHECK_TOOL(AR, ar)
+AC_REQUIRE([AM_PROG_AR])dnl
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 AC_CHECK_TOOL(READELF, readelf, :)
 
-- 
2.34.1


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

* [PATCH 5/7] newlib: drop cygnus EXEEXT hack
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
                   ` (3 preceding siblings ...)
  2022-02-05  7:34 ` [PATCH 4/7] newlib: switch to AM_PROG_AR Mike Frysinger
@ 2022-02-05  7:34 ` Mike Frysinger
  2022-02-05  7:34 ` [PATCH 6/7] newlib: drop autoconf-2.13 hack Mike Frysinger
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

Now that we rely on AC_NO_EXECUTABLES to disable link tests, we don't
need this hack to disable exeext probing.
---
 newlib/acinclude.m4                              | 12 ------------
 newlib/configure                                 | 16 ++--------------
 newlib/libc/configure                            | 16 ++--------------
 newlib/libc/sys/linux/configure                  | 16 ++--------------
 newlib/libc/sys/linux/linuxthreads/configure     | 16 ++--------------
 .../sys/linux/linuxthreads/machine/configure     | 16 ++--------------
 .../linux/linuxthreads/machine/i386/configure    | 16 ++--------------
 newlib/libc/sys/linux/machine/configure          | 16 ++--------------
 newlib/libc/sys/linux/machine/i386/configure     | 16 ++--------------
 newlib/libc/sys/phoenix/configure                | 12 ------------
 newlib/libc/sys/phoenix/machine/arm/configure    | 12 ------------
 newlib/libc/sys/phoenix/machine/configure        | 12 ------------
 newlib/libm/configure                            | 16 ++--------------
 13 files changed, 18 insertions(+), 174 deletions(-)

diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index 8c5122b5fc2f..7795e580b715 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -138,18 +138,6 @@ ac_given_INSTALL=$INSTALL
 
 AM_MAINTAINER_MODE
 
-# We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables.  So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-  AC_EXEEXT
-  dummy_var=1
-fi
-
 . [$]{newlib_basedir}/configure.host
 
 NEWLIB_CFLAGS=${newlib_cflags}
-- 
2.34.1


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

* [PATCH 6/7] newlib: drop autoconf-2.13 hack
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
                   ` (4 preceding siblings ...)
  2022-02-05  7:34 ` [PATCH 5/7] newlib: drop cygnus EXEEXT hack Mike Frysinger
@ 2022-02-05  7:34 ` Mike Frysinger
  2022-02-05  7:34 ` [PATCH 7/7] newlib: switch to standard AC_PROG_RANLIB Mike Frysinger
  2022-02-08 10:10 ` [PATCH 0/7] modernize toolchain macros Corinna Vinschen
  7 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

We require autoconf-2.69 now, so we don't need this old install hack.
---
 newlib/acinclude.m4                                       | 3 ---
 newlib/configure                                          | 7 ++-----
 newlib/libc/configure                                     | 7 ++-----
 newlib/libc/sys/linux/configure                           | 7 ++-----
 newlib/libc/sys/linux/linuxthreads/configure              | 7 ++-----
 newlib/libc/sys/linux/linuxthreads/machine/configure      | 7 ++-----
 newlib/libc/sys/linux/linuxthreads/machine/i386/configure | 7 ++-----
 newlib/libc/sys/linux/machine/configure                   | 7 ++-----
 newlib/libc/sys/linux/machine/i386/configure              | 7 ++-----
 newlib/libc/sys/phoenix/configure                         | 3 ---
 newlib/libc/sys/phoenix/machine/arm/configure             | 3 ---
 newlib/libc/sys/phoenix/machine/configure                 | 3 ---
 newlib/libm/configure                                     | 7 ++-----
 13 files changed, 18 insertions(+), 57 deletions(-)

diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index 7795e580b715..efbd1b258e7c 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -133,9 +133,6 @@ dnl expanding them multiple times.
 AC_REQUIRE([AC_PROG_INSTALL])dnl
 AC_REQUIRE([AC_PROG_AWK])dnl
 
-# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13.  */
-ac_given_INSTALL=$INSTALL
-
 AM_MAINTAINER_MODE
 
 . [$]{newlib_basedir}/configure.host
-- 
2.34.1


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

* [PATCH 7/7] newlib: switch to standard AC_PROG_RANLIB
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
                   ` (5 preceding siblings ...)
  2022-02-05  7:34 ` [PATCH 6/7] newlib: drop autoconf-2.13 hack Mike Frysinger
@ 2022-02-05  7:34 ` Mike Frysinger
  2022-02-08 10:10 ` [PATCH 0/7] modernize toolchain macros Corinna Vinschen
  7 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-05  7:34 UTC (permalink / raw)
  To: newlib

This is basically a noop, but switch to the autoconf macro for finding
a suitable ranlib tool.
---
 newlib/acinclude.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index efbd1b258e7c..3a4edbd6ed77 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -125,7 +125,7 @@ AC_REQUIRE([AC_PROG_CPP])dnl
 
 AC_REQUIRE([AM_PROG_AS])dnl
 AC_REQUIRE([AM_PROG_AR])dnl
-AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_PROG_RANLIB
 AC_CHECK_TOOL(READELF, readelf, :)
 
 dnl We need these programs, but so does Automake.  Require the macros to avoid
-- 
2.34.1


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

* Re: [PATCH 0/7] modernize toolchain macros
  2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
                   ` (6 preceding siblings ...)
  2022-02-05  7:34 ` [PATCH 7/7] newlib: switch to standard AC_PROG_RANLIB Mike Frysinger
@ 2022-02-08 10:10 ` Corinna Vinschen
  7 siblings, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 2022-02-08 10:10 UTC (permalink / raw)
  To: newlib

On Feb  5 02:34, Mike Frysinger wrote:
> The NEWLIB_CONFIGURE logic had a lot of duplication of older autoconf
> toolchain checks to workaround limitations in linking checks.  Since we
> use AC_NO_EXECUTABLES and modern autoconf and modern automake versions,
> we can clean a bunch of these up.
> 
> Mike Frysinger (7):
>   newlib: move AC_NO_EXECUTABLES logic up to common code
>   newlib: switch to standard AC_PROG_CC
>   newlib: switch to standard AM_PROG_AS
>   newlib: switch to AM_PROG_AR
>   newlib: drop cygnus EXEEXT hack
>   newlib: drop autoconf-2.13 hack
>   newlib: switch to standard AC_PROG_RANLIB

LGTM, please push.


Thanks,
Corinna


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

* Re: [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code
  2022-02-05  7:34 ` [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code Mike Frysinger
@ 2022-02-09 19:42   ` Jon Turney
  2022-02-10  4:25     ` Mike Frysinger
  2022-02-10  4:27     ` [PATCH/committed] newlib: fix mkdoc dependencies Mike Frysinger
  0 siblings, 2 replies; 12+ messages in thread
From: Jon Turney @ 2022-02-09 19:42 UTC (permalink / raw)
  To: Mike Frysinger, newlib

On 05/02/2022 07:34, Mike Frysinger wrote:
> This logic was added to libc & libm to get it working again after some
> reworks in the CPP handling, but now that that's settled, let's move
> this to the common newlib configure logic.  This will make it easier
> to consolidate all the configure calls into the top-level newlib dir.
> 
> This does create a lot of noise in the generate scripts, but that's
> because of the ordering of the calls, not because of correctness. We
> will try to draw that back down in follow up commits as we modernize
> the toolchain calls in here.

Somehow, this change seems to prevent a self-hosted cygwin build from 
working.

See e.g. https://github.com/cygwin/cygwin/runs/5118411294

Comparing this with the previous successful run, it looks like:

Because doc/makedoc appears in noinst_DATA, which the target all depends 
on, it tries to make the target doc/makedoc (without EXEEXT_FOR_BUILD 
appended), which uses a one step built-in(?) compiler rule, and fails as 
the directory $builddir/doc/ doesn't exist yet.

Note that 'make info' still works, as this properly depends on $(MKDOC).

So maybe something like this is needed?  But I have no idea what this 
change did to stop it working as before...

> diff --git a/newlib/doc/local.mk b/newlib/doc/local.mk
> index 15c43f225..de1dd1f2b 100644
> --- a/newlib/doc/local.mk
> +++ b/newlib/doc/local.mk
> @@ -1,8 +1,8 @@
> -# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> -noinst_DATA += doc/makedoc
> -
>  MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
>  
> +# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> +noinst_DATA += $(MKDOC)
> +
>  # We don't use CFLAGS with CC_FOR_BUILD because here CFLAGS will
>  # actually be CFLAGS_FOR_TARGET, and in some cases that will include
>  # -Os, which CC_FOR_BUILD may not recognize.

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

* Re: [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code
  2022-02-09 19:42   ` Jon Turney
@ 2022-02-10  4:25     ` Mike Frysinger
  2022-02-10  4:27     ` [PATCH/committed] newlib: fix mkdoc dependencies Mike Frysinger
  1 sibling, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-10  4:25 UTC (permalink / raw)
  To: Jon Turney; +Cc: newlib

[-- Attachment #1: Type: text/plain, Size: 2302 bytes --]

On 09 Feb 2022 19:42, Jon Turney wrote:
> On 05/02/2022 07:34, Mike Frysinger wrote:
> > This logic was added to libc & libm to get it working again after some
> > reworks in the CPP handling, but now that that's settled, let's move
> > this to the common newlib configure logic.  This will make it easier
> > to consolidate all the configure calls into the top-level newlib dir.
> > 
> > This does create a lot of noise in the generate scripts, but that's
> > because of the ordering of the calls, not because of correctness. We
> > will try to draw that back down in follow up commits as we modernize
> > the toolchain calls in here.
> 
> Somehow, this change seems to prevent a self-hosted cygwin build from 
> working.
> 
> See e.g. https://github.com/cygwin/cygwin/runs/5118411294
> 
> Comparing this with the previous successful run, it looks like:
> 
> Because doc/makedoc appears in noinst_DATA, which the target all depends 
> on, it tries to make the target doc/makedoc (without EXEEXT_FOR_BUILD 
> appended), which uses a one step built-in(?) compiler rule, and fails as 
> the directory $builddir/doc/ doesn't exist yet.
> 
> Note that 'make info' still works, as this properly depends on $(MKDOC).
> 
> So maybe something like this is needed?  But I have no idea what this 
> change did to stop it working as before...
> 
> > --- a/newlib/doc/local.mk
> > +++ b/newlib/doc/local.mk
> > @@ -1,8 +1,8 @@
> > -# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> > -noinst_DATA += doc/makedoc
> > -
> >  MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
> >  
> > +# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> > +noinst_DATA += $(MKDOC)
> > +
> >  # We don't use CFLAGS with CC_FOR_BUILD because here CFLAGS will
> >  # actually be CFLAGS_FOR_TARGET, and in some cases that will include
> >  # -Os, which CC_FOR_BUILD may not recognize.

i don't have an answer off the top of my head as to why it was working but
now is not, but if we focus on the failures, i think we have bugs regardless
here that should be fixed.

first your change here looks correct.  but i don't think it suffices.  we
also need the actual .def files to depend on the tool since they need it to
exist.  i'll push a fix shortly.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH/committed] newlib: fix mkdoc dependencies
  2022-02-09 19:42   ` Jon Turney
  2022-02-10  4:25     ` Mike Frysinger
@ 2022-02-10  4:27     ` Mike Frysinger
  1 sibling, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2022-02-10  4:27 UTC (permalink / raw)
  To: newlib; +Cc: Jon Turney

Make sure we depend on the right name of mkdoc all the time, and that
the rules that need it (e.g. .def files) depend on it.

Reported-by: Jon Turney <jon.turney@dronecode.org.uk>
---
 newlib/Makefile.in       | 4 +++-
 newlib/doc/local.mk      | 6 +++---
 newlib/libc/Makefile.inc | 1 +
 newlib/libm/Makefile.inc | 1 +
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/newlib/doc/local.mk b/newlib/doc/local.mk
index 15c43f225e66..de1dd1f2bb09 100644
--- a/newlib/doc/local.mk
+++ b/newlib/doc/local.mk
@@ -1,8 +1,8 @@
-# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
-noinst_DATA += doc/makedoc
-
 MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
 
+# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
+noinst_DATA += $(MKDOC)
+
 # We don't use CFLAGS with CC_FOR_BUILD because here CFLAGS will
 # actually be CFLAGS_FOR_TARGET, and in some cases that will include
 # -Os, which CC_FOR_BUILD may not recognize.
diff --git a/newlib/libc/Makefile.inc b/newlib/libc/Makefile.inc
index fff9e880506f..f30ced867eec 100644
--- a/newlib/libc/Makefile.inc
+++ b/newlib/libc/Makefile.inc
@@ -5,6 +5,7 @@ LIBC_CHEWOUT_FILES =
 
 LIBC_CHAPTERS = %D%/sys.tex
 LIBC_DOCBOOK_OUT_FILES = $(LIBC_CHEWOUT_FILES:.def=.xml)
+$(LIBC_CHEWOUT_FILES): $(MKDOC)
 
 %D%/libc.dvi: %D%/targetdep.tex $(LIBC_CHEWOUT_FILES)
 
diff --git a/newlib/libm/Makefile.inc b/newlib/libm/Makefile.inc
index f2f192ea81fe..7fdea0ca518e 100644
--- a/newlib/libm/Makefile.inc
+++ b/newlib/libm/Makefile.inc
@@ -5,6 +5,7 @@ LIBM_CHEWOUT_FILES =
 
 LIBM_CHAPTERS =
 LIBM_DOCBOOK_OUT_FILES = $(LIBM_CHEWOUT_FILES:.def=.xml)
+$(LIBM_CHEWOUT_FILES): $(MKDOC)
 
 %D%/libm.dvi: %D%/targetdep.tex $(LIBM_CHEWOUT_FILES)
 
-- 
2.34.1


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

end of thread, other threads:[~2022-02-10  4:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05  7:34 [PATCH 0/7] modernize toolchain macros Mike Frysinger
2022-02-05  7:34 ` [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code Mike Frysinger
2022-02-09 19:42   ` Jon Turney
2022-02-10  4:25     ` Mike Frysinger
2022-02-10  4:27     ` [PATCH/committed] newlib: fix mkdoc dependencies Mike Frysinger
2022-02-05  7:34 ` [PATCH 2/7] newlib: switch to standard AC_PROG_CC Mike Frysinger
2022-02-05  7:34 ` [PATCH 3/7] newlib: switch to standard AM_PROG_AS Mike Frysinger
2022-02-05  7:34 ` [PATCH 4/7] newlib: switch to AM_PROG_AR Mike Frysinger
2022-02-05  7:34 ` [PATCH 5/7] newlib: drop cygnus EXEEXT hack Mike Frysinger
2022-02-05  7:34 ` [PATCH 6/7] newlib: drop autoconf-2.13 hack Mike Frysinger
2022-02-05  7:34 ` [PATCH 7/7] newlib: switch to standard AC_PROG_RANLIB Mike Frysinger
2022-02-08 10:10 ` [PATCH 0/7] modernize toolchain macros 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).