This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[Patch, quadmath] PR 46520 [configure.ac] Cache __float128 check and use GCC_TRY_COMPILE_OR_LINK
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 08 Dec 2010 20:45:24 +0100
- Subject: [Patch, quadmath] PR 46520 [configure.ac] Cache __float128 check and use GCC_TRY_COMPILE_OR_LINK
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 <burnus@net-b.de>
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