[Bug fortran/47571] [4.6 Regression] undefined reference to clock_gettime in Linux build of 02/01/2011
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 1 16:13:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47571
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-01 16:13:24 UTC ---
How many fortran users actually need to more precise DATE_AND_TIME though?
Bringing in -lpthread (as dependency of -lrt) certainly has some extra
overhead, e.g. everything that uses gthr* will suddenly use real locking.
You could e.g. use clock_gettime only through a weakref, thus let the users
choose if clock_gettime should be used or not. If they don't link in librt,
less precise implementation would be used, if they do link it in, it would
become more precise (-lrt would be linked in automatically e.g. for -fopenmp
compilations).
More information about the Gcc-bugs
mailing list