Patchwork [Build,libquadmath] PR 46520 Do not call AC_CHECK_LIB for gcc_no_link

login
register
mail settings
Submitter Tobias Burnus
Date Dec. 18, 2010, 10:17 a.m.
Message ID <4D0C8A2C.3080209@net-b.de>
Download mbox | patch
Permalink /patch/76060/
State New
Headers show

Comments

Tobias Burnus - Dec. 18, 2010, 10:17 a.m.
The title says all. I am not sure whether this patch is sufficient but 
it is the next step to fix the build. (The symbol-versioning check might 
still fail on bare irons.)

OK for the trunk?

Tobias
Ralf Wildenhues - Dec. 19, 2010, 12:08 p.m.
Hi Tobias,

* Tobias Burnus wrote on Sat, Dec 18, 2010 at 11:17:16AM CET:
> The title says all. I am not sure whether this patch is sufficient
> but it is the next step to fix the build. (The symbol-versioning
> check might still fail on bare irons.)
> 
> OK for the trunk?

Is the usage of the two HAVE_* defines for optimization only?
Then the patch is OK.  But you might still consider adding a case
statement in the gcc_no_link branch seeding the correct defines
or the respective configure cache variables (ac_cv_lib_m_cbrtl etc)
for targets where the functions are known to be available.

For configure choices that are not just used for optimization,
of course that becomes required procedure.

Thanks,
Ralf

> 2010-12-18  Tobias Burnus  <burnus@net-b.de>
> 
> 	PR fortran/46520
> 	* configure.ac: Do not call AC_CHECK_LIB for gcc_no_link.
> 	* configure: Regenerate
> 
> diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac
> index 56b1fcb..603d2c1 100644
> --- a/libquadmath/configure.ac
> +++ b/libquadmath/configure.ac
> @@ -109,8 +109,10 @@ esac
>  AC_SUBST(toolexecdir)
>  AC_SUBST(toolexeclibdir)
>  
> -AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])])
> -AC_CHECK_LIB([m],[cbrtl],[AC_DEFINE([HAVE_CBRTL],[1],[libm includes cbrtl])])
> +if test x$gcc_no_link != xyes; then
> +  AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])])
> +  AC_CHECK_LIB([m],[cbrtl],[AC_DEFINE([HAVE_CBRTL],[1],[libm includes cbrtl])])
> +fi
>  
>  # Check for symbol versioning (copied from libssp).
>  AC_MSG_CHECKING([whether symbol versioning is supported])

Patch

2010-12-18  Tobias Burnus  <burnus@net-b.de>

	PR fortran/46520
	* configure.ac: Do not call AC_CHECK_LIB for gcc_no_link.
	* configure: Regenerate

diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac
index 56b1fcb..603d2c1 100644
--- a/libquadmath/configure.ac
+++ b/libquadmath/configure.ac
@@ -109,8 +109,10 @@  esac
 AC_SUBST(toolexecdir)
 AC_SUBST(toolexeclibdir)
 
-AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])])
-AC_CHECK_LIB([m],[cbrtl],[AC_DEFINE([HAVE_CBRTL],[1],[libm includes cbrtl])])
+if test x$gcc_no_link != xyes; then
+  AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])])
+  AC_CHECK_LIB([m],[cbrtl],[AC_DEFINE([HAVE_CBRTL],[1],[libm includes cbrtl])])
+fi
 
 # Check for symbol versioning (copied from libssp).
 AC_MSG_CHECKING([whether symbol versioning is supported])