This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libgfortran, 4.6] Don't use clock_gettime on Tru64 UNIX (PR fortran/47571)


The conditional use of clock_gettime via weakrefs completely broke
Fortran on Tru64 UNIX: while the function is available in librt, the
platform doesn't support weakrefs, so every execution test fails due to
the undefined symbol.  While a proper patch is being tested for mainline
(to be backported to 4.6.1), I'd like to get this workaround into the
4.6 branch.

alpha-dec-osf5.1b bootstrap on the branch is still running, but so far
only a few fortran tests fail (as they did before) and not all
execution tests.

Already approved by Janne Blomqvist in the PR, provided the RMs agree.

Jakub, ok for the 4.6 branch once the bootstrap has finished
successfully?

Thanks.
	Rainer


2011-03-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR fortran/47571
	* intrinsics/system_clock.c [__alpha__ && __osf__]
	(HAVE_CLOCK_GETTIME): Undef.

diff -r 3a5a11b25084 libgfortran/intrinsics/system_clock.c
--- a/libgfortran/intrinsics/system_clock.c	Tue Mar 15 12:05:24 2011 +0100
+++ b/libgfortran/intrinsics/system_clock.c	Wed Mar 16 13:45:24 2011 +0100
@@ -29,6 +29,13 @@
 
 #include "time_1.h"
 
+/* Tru64 UNIX doesn't support weakrefs, so the trickery below completely
+   breaks libgfortran (PR fortran/47571).  Don't use clock_gettime until a
+   proper solution has been tested.  */
+#if defined(__alpha__) && defined(__osf__)
+#undef HAVE_CLOCK_GETTIME
+#endif
+
 #ifdef HAVE_CLOCK_GETTIME
 /* POSIX states that CLOCK_REALTIME must be present if clock_gettime
    is available, others are optional.  */


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]