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: 3825 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