From patchwork Wed Dec 8 19:45:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 74758 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]) by ozlabs.org (Postfix) with SMTP id B03CBB6EED for ; Thu, 9 Dec 2010 06:45:35 +1100 (EST) Received: (qmail 3933 invoked by alias); 8 Dec 2010 19:45:33 -0000 Received: (qmail 3919 invoked by uid 22791); 8 Dec 2010 19:45:32 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_IB X-Spam-Check-By: sourceware.org Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Dec 2010 19:45:26 +0000 Received: from [192.168.178.22] (port-92-204-53-80.dynamic.qsc.de [92.204.53.80]) by mx02.qsc.de (Postfix) with ESMTP id 11F101E1B1; Wed, 8 Dec 2010 20:45:23 +0100 (CET) Message-ID: <4CFFE054.4080204@net-b.de> Date: Wed, 08 Dec 2010 20:45:24 +0100 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.12) Gecko/20101026 SUSE/3.1.6 Thunderbird/3.1.6 MIME-Version: 1.0 To: gcc patches , gfortran Subject: [Patch, quadmath] PR 46520 [configure.ac] Cache __float128 check and use GCC_TRY_COMPILE_OR_LINK Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org I have actually lost the overview about libquadmath related build issues. The PR 46520 talks about build issues due to linkage failing for bare irons. However, a couple of patches have been applied. This patch adds _cv_ to the libquad_have_float128 check, which enables caching and thus to override the result. Additionally, I have changed AC_TRY_LINK to GCC_TRY_COMPILE_OR_LINK. I think those changes are useful. However, before I try to make the symbol versioning checking part working on bare-iron targets, I would like to know whether libquadmath still fails on those. Is the attached patch OK for committal? Tobias 2010-12-08 Tobias Burnus PR fortran/46520 * configure.ac: Use GCC_TRY_COMPILE_OR_LINK instead of AC_TRY_LINK and cache libquad_have_float128. * configure: Regenerate. Index: configure.ac =================================================================== --- configure.ac (revision 167583) +++ configure.ac (working copy) @@ -150,7 +150,7 @@ AM_CONDITIONAL(LIBQUAD_USE_SYMVER_SUN, [test "x$quadmath_use_symver" = xsun]) AC_MSG_CHECKING([whether __float128 is supported]) - AC_TRY_LINK([ + GCC_TRY_COMPILE_OR_LINK([ typedef _Complex float __attribute__((mode(TC))) __complex128; __float128 foo (__float128 x) @@ -173,21 +173,13 @@ foo (1.2Q); bar (1.2Q); ],[ - libquad_have_float128=yes + libquad_cv_have_float128=yes ],[ - libquad_have_float128=no + libquad_cv_have_float128=no ]) -AC_MSG_RESULT([$libquad_have_float128]) +AC_MSG_RESULT([$libquad_cv_have_float128]) +AM_CONDITIONAL(BUILD_LIBQUADMATH, [test "x$libquad_cv_have_float128" = xyes]) -dnl -dnl Enable the following for a stand-alone library: -dnl -dnl if test $libquad_have_float128 = no; then -dnl AC_MSG_ERROR([__float128 support is required to build this library.]) -dnl fi - -AM_CONDITIONAL(BUILD_LIBQUADMATH, [test "x$libquad_have_float128" = xyes]) - AC_CACHE_SAVE if test ${multilib} = yes; then