http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47571
--- Comment #6 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-02-01 15:50:52
UTC ---
(In reply to comment #3)
> clock_gettime is defined in librt, so if libgfortran started using librt
> symbols, it needs to a) link against it dynamically for libgfortran.so
Yes, that's what it does, using a configure.ac snippet lifted from libgomp. On
my system, ldd libgfortran.so shows:
linux-vdso.so.1 => (0x00007fff71ae9000)
libquadmath.so.0 =>
/home/janne/src/gfortran/trunk/install/lib/../lib64/libquadmath.so.0
(0x00007f885a485000)
libm.so.6 => /lib/libm.so.6 (0x00007f885a1df000)
librt.so.1 => /lib/librt.so.1 (0x00007f8859fd7000)
libc.so.6 => /lib/libc.so.6 (0x00007f8859c54000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f8859a36000)
/lib64/ld-linux-x86-64.so.2 (0x00007f885a9cf000)
where the librt and libpthread dependencies are due to using clock_gettime()
from librt.
> b)
> arrange for gfortran driver to pass in -lrt when linking libgfortran
> statically.
Right, I haven't considered this part. Anyone have any idea how that could be
done?