From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 6D6C73858D37 for ; Fri, 28 Jan 2022 10:23:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6D6C73858D37 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 6E7E13431F0; Fri, 28 Jan 2022 10:23:52 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 1/2] newlib: fix preprocessor checks Date: Fri, 28 Jan 2022 05:23:54 -0500 Message-Id: <20220128102355.10213-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171dc9cb-6b2c-ead3-1c55-27fadb33220f@gmail.com> References: <171dc9cb-6b2c-ead3-1c55-27fadb33220f@gmail.com> 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, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Fri, 28 Jan 2022 10:23:57 -0000 Restore the call to AC_NO_EXECUTABLES -- I naively assumed in commit 2e9aa5f56cc26a411014a7f788423c670cfb5646 ("newlib: update preprocessor configure checks") that checking for a preprocessor would not involve linking code. Unfortunately, autoconf will implicitly check that the compiler "works" before allowing it to be used, and that involves a link test, and that fails because newlib provides the C library which is needed to pass a link test. There is some code in NEWLIB_CONFIGURE specifically to help mitigate these, but it's not kicking in here for some reason, so let's just add the AC_NO_EXECUTABLES call back until we can unwind that custom logic. Additionally, we have to call AC_PROG_CPP explicitly. This was being invoked later on, but only in the use_libtool=yes codepath, and that is almost never enabled. --- newlib/libc/configure | 1206 +++++++++++++++++++++----------------- newlib/libc/configure.ac | 2 + newlib/libm/configure | 1128 +++++++++++++++++++---------------- newlib/libm/configure.ac | 2 + 4 files changed, 1285 insertions(+), 1053 deletions(-) diff --git a/newlib/libc/configure.ac b/newlib/libc/configure.ac index 5d4dc7bf5600..4a0160a57d80 100644 --- a/newlib/libc/configure.ac +++ b/newlib/libc/configure.ac @@ -45,7 +45,9 @@ 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 e4611ed846dd..a03ea3872bd5 100644 --- a/newlib/libm/configure.ac +++ b/newlib/libm/configure.ac @@ -16,7 +16,9 @@ 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