[PATCH, v3] Potential solution to librt issue.

Paolo Carlini paolo.carlini@oracle.com
Fri Jul 25 12:52:00 GMT 2008


Hi,

> Yes, of course.  Thanks.
> 
> As I said, the patch was completely untested (not even "make
> gcc") due to lack of time.

I was testing something similar. The problem is that in my experiments the compiler builds now, but apparently the trick doesn't work. That is, if I try to build something like the below, the link fails, -lrt is not added... Any idea why?

Paolo.

////////////

#include <ctime>

void f()
{
  timespec t;
  clock_gettime(CLOCK_REALTIME, &t);
}

int main()
{
  f();
}



More information about the Libstdc++ mailing list