From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id CCAB5385F017 for ; Sat, 19 Feb 2022 02:52:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCAB5385F017 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 206323433F0; Sat, 19 Feb 2022 02:52:57 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH] libgloss: switch to standard AC_PROG_CC Date: Fri, 18 Feb 2022 21:52:52 -0500 Message-Id: <20220219025252.23879-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2022 02:53:04 -0000 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. --- libgloss/aarch64/aclocal.m4 | 368 ------------ libgloss/aarch64/configure | 1029 ++++++++++++++++++++++----------- libgloss/aarch64/configure.ac | 3 +- libgloss/acinclude.m4 | 55 -- libgloss/arm/aclocal.m4 | 368 ------------ libgloss/arm/configure | 1029 ++++++++++++++++++++++----------- libgloss/arm/configure.ac | 3 +- libgloss/configure | 801 ++++++++----------------- libgloss/configure.ac | 2 +- 9 files changed, 1605 insertions(+), 2053 deletions(-) diff --git a/libgloss/aarch64/configure.ac b/libgloss/aarch64/configure.ac index 1ed0a767bc75..1e8fce7cca03 100644 --- a/libgloss/aarch64/configure.ac +++ b/libgloss/aarch64/configure.ac @@ -8,7 +8,8 @@ AC_ARG_PROGRAM AC_PROG_INSTALL -LIB_AC_PROG_CC +AC_NO_EXECUTABLES +AC_PROG_CC AS=${AS-as} AC_SUBST(AS) AR=${AR-ar} diff --git a/libgloss/acinclude.m4 b/libgloss/acinclude.m4 index cdd34b6f0304..d792f66b1e30 100644 --- a/libgloss/acinclude.m4 +++ b/libgloss/acinclude.m4 @@ -1,62 +1,7 @@ -# 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 </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" - 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 -]) - diff --git a/libgloss/arm/configure.ac b/libgloss/arm/configure.ac index 3d7ba7da15d6..5c6fb8920ce5 100644 --- a/libgloss/arm/configure.ac +++ b/libgloss/arm/configure.ac @@ -28,7 +28,8 @@ AC_ARG_PROGRAM AC_PROG_INSTALL -LIB_AC_PROG_CC +AC_NO_EXECUTABLES +AC_PROG_CC AS=${AS-as} AC_SUBST(AS) AR=${AR-ar} diff --git a/libgloss/configure.ac b/libgloss/configure.ac index 4aa0f19140fe..895ca4289115 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -248,7 +248,7 @@ dnl fi AM_CONDITIONAL(CONFIG_LIBNOSYS, test x$config_libnosys = xtrue) -LIB_AC_PROG_CC +AC_PROG_CC AS=${AS-as} AC_SUBST(AS) AC_CHECK_PROG(AR, ar, ar, :) -- 2.34.1