diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2015-08-31 14:02:43 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2015-08-31 14:02:43 +0000 |
commit | 6a822a740359967372f33491ae59b1e0fa34fd4c (patch) | |
tree | c9054c51386948d792f44e8f5e9259a9285492d3 /libgfortran/configure | |
parent | b0eb889bf88eff3316690c6397a7f3dc75fbeda7 (diff) |
re PR fortran/47571 (undefined reference to clock_gettime in Linux build of 02/01/2011)
PR libfortran/47571
* acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Reinstate.
* configure.ac: Call LIBGFOR_GTHREAD_WEAK again.
* config.h.in: Regenerate.
* configure: Regenerate.
From-SVN: r227347
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index 12f6f131e61..f746f6f5d1d 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -25953,6 +25953,52 @@ $as_echo "#define HAVE_SYNC_FETCH_AND_ADD 1" >>confdefs.h fi +# Check out #pragma weak. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma weak works" >&5 +$as_echo_n "checking whether pragma weak works... " >&6; } +if test "${libgfor_cv_have_pragma_weak+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gfor_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wunknown-pragmas" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +void foo (void); +#pragma weak foo + +int +main () +{ +if (foo) foo (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libgfor_cv_have_pragma_weak=yes +else + libgfor_cv_have_pragma_weak=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_pragma_weak" >&5 +$as_echo "$libgfor_cv_have_pragma_weak" >&6; } + if test $libgfor_cv_have_pragma_weak = yes; then + +$as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h + + fi + case "$host" in + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + +$as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h + + ;; + esac + # Check out weakref support. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports weakref" >&5 |