diff mbox

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

Message ID yddr5a6oxj7.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth March 17, 2011, 10:23 a.m. UTC
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.

Comments

Jakub Jelinek March 17, 2011, 10:41 a.m. UTC | #1
On Thu, Mar 17, 2011 at 11:23:56AM +0100, Rainer Orth wrote:
> 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?

Ok, but for 4.6.1 and 4.7 please revert it and apply the real fix.

> 2011-03-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	PR fortran/47571
> 	* intrinsics/system_clock.c [__alpha__ && __osf__]
> 	(HAVE_CLOCK_GETTIME): Undef.

	Jakub
Rainer Orth March 17, 2011, 1:33 p.m. UTC | #2
Jakub Jelinek <jakub@redhat.com> writes:

>> Jakub, ok for the 4.6 branch once the bootstrap has finished
>> successfully?
>
> Ok, but for 4.6.1 and 4.7 please revert it and apply the real fix.

I think Janne meant to apply the real fix to 4.7, so I can keep the
workaround locally for mainline.  I just wanted to avoid releasing 4.6.0
with Fortran completely broken.

	Rainer
diff mbox

Patch

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.  */