This is the mail archive of the gcc-bugs@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]

[Bug fortran/47571] [4.6 Regression] undefined reference to clock_gettime in Linux build of 02/01/2011


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.. :)


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