From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 0266D385800E for ; Fri, 11 Feb 2022 12:51:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0266D385800E 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 6DBB3343172; Fri, 11 Feb 2022 12:51:03 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 5/8] libgloss: m68k: switch to AC_NO_EXECUTABLES Date: Fri, 11 Feb 2022 07:50:51 -0500 Message-Id: <20220211125054.12397-6-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220211125054.12397-1-vapier@gentoo.org> References: <20220211125054.12397-1-vapier@gentoo.org> 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: Fri, 11 Feb 2022 12:51:05 -0000 Use this macro rather than hacking up the LDFLAGS settings. This will make it easier to merge the logic into the top-level which is already using AC_NO_EXECUTABLES. --- libgloss/m68k/configure | 82 ++++++++++++++++++++++++++++++++++++-- libgloss/m68k/configure.ac | 10 +---- 2 files changed, 81 insertions(+), 11 deletions(-) diff --git a/libgloss/m68k/configure.ac b/libgloss/m68k/configure.ac index 41b49a530a5d..0230e08d8346 100644 --- a/libgloss/m68k/configure.ac +++ b/libgloss/m68k/configure.ac @@ -30,15 +30,10 @@ AC_SUBST(LD) AC_PROG_RANLIB LIB_AM_PROG_AS +AC_NO_EXECUTABLES + AC_MSG_CHECKING([target cpu family]) TARGET=m68k -dnl Temporarily modify LDFLAGS so that link tests will succeed without -dnl a C library. Note that we may not have a C librabry yet and that -dnl autoconf automatically adds script to check whether we can create -dnl an executable or not. -dnl -saved_LDFLAGS="$LDFLAGS" -LDFLAGS="-nostdlib -e main" AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mcoldfire__ #error we are not coldfire #endif])], @@ -47,7 +42,6 @@ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mfido__ #error we are not fido #endif])], TARGET="fido",) -LDFLAGS=$saved_LDFLAGS AC_MSG_RESULT($TARGET) AC_SUBST(TARGET) -- 2.34.1