diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-31 10:37:30 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-31 10:37:30 +0000 |
commit | 1d9726df12360075758f09a9d62333553fe778f7 (patch) | |
tree | 8abc0ef2b196b276af26f60460040f32e81575d8 /libgfortran/configure | |
parent | bfd098e9011473417d2cec61c4b0d1dcd2da77b2 (diff) | |
download | gcc-1d9726df12360075758f09a9d62333553fe778f7.tar.gz |
PR libfortran/47571
* acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove.
(LIBGFOR_CHECK_WEAKREF): New test.
* configure.ac: Call LIBGFOR_CHECK_WEAKREF instead of
LIBGFOR_GTHREAD_WEAK.
* config.h.in: Regenerate.
* configure: Regenerate.
* intrinsics/system_clock.c: Use SUPPORTS_WEAKREF instead of
SUPPORTS_WEAK and GTHREAD_USE_WEAK.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227335 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index 546a5a9b55e..12f6f131e61 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -25953,51 +25953,48 @@ $as_echo "#define HAVE_SYNC_FETCH_AND_ADD 1" >>confdefs.h fi -# Check out #pragma weak. +# Check out weakref support. - { $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 "$as_me:${as_lineno-$LINENO}: checking whether the target supports weakref" >&5 +$as_echo_n "checking whether the target supports weakref... " >&6; } +if test "${libgfor_cv_have_weakref+set}" = set; then : $as_echo_n "(cached) " >&6 else - gfor_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wunknown-pragmas" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wunknown-pragmas -Werror" + if test x$gcc_no_link = xyes; then + as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -void foo (void); -#pragma weak foo +static int mytoto (int) __attribute__((__weakref__("toto"))); int main () { -if (foo) foo (); +return (mytoto != 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - libgfor_cv_have_pragma_weak=yes +if ac_fn_c_try_link "$LINENO"; then : + libgfor_cv_have_weakref=yes else - libgfor_cv_have_pragma_weak=no + libgfor_cv_have_weakref=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$save_CFLAGS" 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 "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_weakref" >&5 +$as_echo "$libgfor_cv_have_weakref" >&6; } + if test $libgfor_cv_have_weakref = yes; then -$as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h +$as_echo "#define SUPPORTS_WEAKREF 1" >>confdefs.h fi - case "$host" in - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - -$as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h - - ;; - esac # Various other checks on target |