If it is set, we don't try to use clock_gettime
GhcEnableTablesNextToCode=YES
endif
+# When building bindists we set this to yes so that the binaries are as
+# portable as possible.
+BeConservative = NO
+
#
# Building various ways?
# (right now, empty if not).
GhcRtsCcOpts=-g -O0
endif
+ifeq "$(BeConservative)" "YES"
+GhcRtsCcOpts += -DBE_CONSERVATIVE
+endif
+
# -----------------------------------------------------------------------------
# There's nothing for Haddock here...
}
return ((usec * TICKS_PER_SECOND) / 1000000);
-#elif defined(HAVE_CLOCK_GETTIME) && defined (_POSIX_THREAD_CPUTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(HAVE_SYSCONF)
+#elif !defined(BE_CONSERVATIVE) && defined(HAVE_CLOCK_GETTIME) && defined (_POSIX_THREAD_CPUTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(HAVE_SYSCONF)
if (sysconf(_POSIX_THREAD_CPUTIME) != -1) {
// clock_gettime() gives us per-thread CPU time. It isn't
// reliable on Linux, but it's the best we have.