This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47571] [4.6 Regression] undefined reference to clock_gettime in Linux build of 02/01/2011
- From: "jb at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Mar 2011 11:50:49 +0000
- Subject: [Bug fortran/47571] [4.6 Regression] undefined reference to clock_gettime in Linux build of 02/01/2011
- Auto-submitted: auto-generated
- References: <bug-47571-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47571
--- Comment #35 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-03-14 11:50:26 UTC ---
(In reply to comment #33)
> I think you should add below the hunk defining conditionally
> GF_CLOCK_MONOTONIC:
> #ifndef GF_CLOCK_MONOTONIC
> #undef HAVE_CLOCK_GETTIME
> #undef HAVE_CLOCK_GETTIME_LIBRT
> #endif
> now that you don't define GF_CLOCK_MONOTONIC if CLOCK_REALTIME isn't defined.
Thanks; that should protect against the case where clock_gettime is available
but neither CLOCK_REALTIME nor CLOCK_MONOTONIC are. Ideally, this shouldn't be
necessary as POSIX specifies that CLOCK_REALTIME must always be available if
clock_gettime exists, but I suppose both belts and suspenders are nice in this
case.. :)