[PATCH, v3] Potential solution to librt issue.

Paolo Carlini paolo.carlini@oracle.com
Fri Jul 25 06:14:00 GMT 2008


first, as you may have noticed, I have just reverted our first attempt at solving this issue.

> So it works on my arch (x86_64) w/o librt and pthread... I
> must be missing something.

I think the only unspected behavior here is that nothing crashes. Because you are not linking the library containing clock_gettime and thus __clock_gettime should still be zero at run time. Anyway, whatever value it has, I don't think the actual clock_gettime is being called: just check in the debugger, no?

Anyway, what we really want is playing a bit with Paolo's draft, nothing is going to wrong, otherwise, because nothing in the compiler + library takes care of linking librt on demand. If the compiler bits are ok, then the library bits, which you have essentially ready, are very simple.


More information about the Gcc-patches mailing list