This patch fixes PR 47571 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47571) by providing an adequate configure check (with AC_LINK_IFELSE) for weakref (which we use in intrinsics/system_clock.c).
Tested by building libgfortran on x86_64-pc-linux-gnu, where SUPPORTS_WEAKREF gets defined to 1 as it should, and x86_64-apple-darwin14, where SUPPORTS_WEAKREF gets defined to 0 as it should. Then regtested on both targets. OK to commit to trunk? FX
2015-08-14 Francois-Xavier Coudert <fxcoud...@gcc.gnu.org> 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.
weakref.diff
Description: Binary data