[PATCH, v3] Potential solution to librt issue.

Paolo Carlini paolo.carlini@oracle.com
Thu Jul 24 23:30:00 GMT 2008


Hi,

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.

Paolo.



More information about the Libstdc++ mailing list