From patchwork Thu Nov 20 22:17:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 412889 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B72A140182 for ; Fri, 21 Nov 2014 09:17:14 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=e++SSloywU2Hk+P8MVHYAU8rV+ybHsK MgO+u5ScTNWm4Z05uISp5Lz0qrcVSGfbSD4s1S39jozcItnOZZXrsFoz7WaD58m2 3uIvGf2egbWqnpUhKKxTN7u6pYgFjrGEc9/zMoygnGwNb3bnxMNbC6hQ6syKJSF1 smvjg+6pWYbI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=/o8IxY/O88HDAdnOKLEmuBM2l9s=; b=BqLvM RGo+FH2lCMmPSDR02cRx22zqPsL8DRvxcAyELtWVUeMB/1r9u04rHyfxk/3EJZH6 8UwtXcjZPt8lqlllc7u6/ZGV0+zigvgwM1tzky853O6T/XhEg7EyBcxHK6MLIQzD qre9I7F3n/REWa4isphT1wTIOduxiZpLLkm6hY= Received: (qmail 20393 invoked by alias); 20 Nov 2014 22:17:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 20380 invoked by uid 89); 20 Nov 2014 22:17:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org From: Mike Frysinger To: libc-alpha@sourceware.org Subject: [PATCH] arm: wrap EABI check with a cache var Date: Thu, 20 Nov 2014 17:17:01 -0500 Message-Id: <1416521821-31271-1-git-send-email-vapier@gentoo.org> In-Reply-To: <1416468692-4317-1-git-send-email-vapier@gentoo.org> References: <1416468692-4317-1-git-send-email-vapier@gentoo.org> This way people can force the test one way or the other. It also matches the style in other configure flags where tests are wrapper in cache vars. Signed-off-by: Mike Frysinger --- tested: ../configure --host=armv7a-jalsjdf-linux-gnueabi -> fail libc_cv_arm_eabi=yes ../configure --host=armv7a-jalsjdf-linux-gnueabi -> pass libc_cv_arm_eabi=no ../configure --host=armv7a-jalsjdf-linux-gnueabi -> fail ../configure --host=armv7a-unknown-linux-gnueabi -> pass libc_cv_arm_eabi=yes ../configure --host=armv7a-unknown-linux-gnueabi -> pass libc_cv_arm_eabi=no ../configure --host=armv7a-unknown-linux-gnueabi -> fail ChangeLog | 6 ++++++ sysdeps/arm/preconfigure | 17 ++++++++++++++--- sysdeps/arm/preconfigure.ac | 7 ++++++- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2fa59cf..f1db041 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-11-20 Mike Frysinger + + * sysdeps/arm/preconfigure.ac: Wrap EABI check in a libc_cv_arm_eabi + cache var. + * sysdeps/arm/preconfigure: Regenerate. + 2014-11-19 Carlos O'Donell Florian Weimer Joseph Myers diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index 59d776d..c99a412 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -4,7 +4,12 @@ case "$machine" in arm*) -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports ARM EABI" >&5 +$as_echo_n "checking whether $CC supports ARM EABI... " >&6; } +if ${libc_cv_arm_eabi+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if !__ARM_EABI__ @@ -19,11 +24,17 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - + libc_cv_arm_eabi=yes else - as_fn_error $? "Old ABI no longer supported" "$LINENO" 5 + libc_cv_arm_eabi=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_eabi" >&5 +$as_echo "$libc_cv_arm_eabi" >&6; } + if test "$libc_cv_arm_eabi" != yes; then + as_fn_error $? "Old ABI no longer supported" "$LINENO" 5 + fi # If the compiler enables unwind tables by default, this causes # problems with undefined symbols in -nostdlib link tests. To diff --git a/sysdeps/arm/preconfigure.ac b/sysdeps/arm/preconfigure.ac index d78817b..3fe8e9c 100644 --- a/sysdeps/arm/preconfigure.ac +++ b/sysdeps/arm/preconfigure.ac @@ -3,10 +3,15 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. case "$machine" in arm*) + AC_CACHE_CHECK(whether $CC supports ARM EABI, + libc_cv_arm_eabi, [dnl AC_TRY_COMPILE([ #if !__ARM_EABI__ #error -#endif], [], [], [AC_MSG_ERROR([Old ABI no longer supported])]) +#endif], [], [libc_cv_arm_eabi=yes], [libc_cv_arm_eabi=no])]) + if test "$libc_cv_arm_eabi" != yes; then + AC_MSG_ERROR([Old ABI no longer supported]) + fi # If the compiler enables unwind tables by default, this causes # problems with undefined symbols in -nostdlib link tests. To