[pypy-commit] pypy default: Need '-lrt' to use clock_gettime. Fix the tests on some random subset of Linuxes

arigo pypy.commits at gmail.com
Fri Dec 18 09:56:18 EST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r81374:de2631dc2ed7
Date: 2015-12-18 15:55 +0100
http://bitbucket.org/pypy/pypy/changeset/de2631dc2ed7/

Log:	Need '-lrt' to use clock_gettime. Fix the tests on some random
	subset of Linuxes

diff --git a/rpython/rlib/rtime.py b/rpython/rlib/rtime.py
--- a/rpython/rlib/rtime.py
+++ b/rpython/rlib/rtime.py
@@ -165,9 +165,11 @@
     globals().update(rffi_platform.configure(CConfigForClockGetTime))
     TIMESPEC = TIMESPEC
     CLOCK_PROCESS_CPUTIME_ID = CLOCK_PROCESS_CPUTIME_ID
+    eci_with_lrt = eci.merge(ExternalCompilationInfo(libraries=['rt']))
     c_clock_gettime = external('clock_gettime',
                                [lltype.Signed, lltype.Ptr(TIMESPEC)],
-                               rffi.INT, releasegil=False)
+                               rffi.INT, releasegil=False,
+                               compilation_info=eci_with_lrt)
 else:
     RUSAGE = RUSAGE
     RUSAGE_SELF = RUSAGE_SELF or 0


More information about the pypy-commit mailing list