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/intrinsics | |
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/intrinsics')
-rw-r--r-- | libgfortran/intrinsics/system_clock.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libgfortran/intrinsics/system_clock.c b/libgfortran/intrinsics/system_clock.c index ba0bdfe68cb..e36650061ab 100644 --- a/libgfortran/intrinsics/system_clock.c +++ b/libgfortran/intrinsics/system_clock.c @@ -45,16 +45,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Weakref trickery for clock_gettime(). On Glibc <= 2.16, clock_gettime() requires us to link in librt, which also pulls in libpthread. In order to avoid this by default, only call - clock_gettime() through a weak reference. - - Some targets don't support weak undefined references; on these - GTHREAD_USE_WEAK is 0. So we need to define it to 1 on other - targets. */ -#ifndef GTHREAD_USE_WEAK -#define GTHREAD_USE_WEAK 1 -#endif - -#if SUPPORTS_WEAK && GTHREAD_USE_WEAK && defined(HAVE_CLOCK_GETTIME_LIBRT) + clock_gettime() through a weak reference. */ +#if SUPPORTS_WEAKREF && defined(HAVE_CLOCK_GETTIME_LIBRT) static int weak_gettime (clockid_t, struct timespec *) __attribute__((__weakref__("clock_gettime"))); #endif @@ -90,7 +82,7 @@ gf_gettime_mono (time_t * secs, long * fracsecs, long * tck) *fracsecs = ts.tv_nsec; return err; #else -#if defined(HAVE_CLOCK_GETTIME_LIBRT) && SUPPORTS_WEAK && GTHREAD_USE_WEAK +#if SUPPORTS_WEAKREF && defined(HAVE_CLOCK_GETTIME_LIBRT) if (weak_gettime) { struct timespec ts; |