[PATCH 2/7] newlib: switch to standard AC_PROG_CC

Mike Frysinger vapier@gentoo.org
Sat Feb 5 07:34:31 GMT 2022


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



More information about the Newlib mailing list