[base] CLK_TCK issue for QNXNTO

Stephen Paul Weber singpolyma at singpolyma.net
Sat Dec 8 21:08:33 CET 2012


When I try to build base for QNXNTO (BlackBerry 10) using my cross-compiler 
I get an error about "test_array is not of static size" or similar.  
Currently I fix it with this patch:

diff --git a/System/CPUTime.hsc b/System/CPUTime.hsc
index 8934a7e..514641f 100644
--- a/System/CPUTime.hsc
+++ b/System/CPUTime.hsc
@@ -187,7 +187,7 @@ cpuTimePrecision = round ((1000000000000::Integer) % fromIntegral (clockTicks))
  #ifdef __GLASGOW_HASKELL__
  clockTicks :: Int
  clockTicks =
-#if defined(CLK_TCK)
+#if defined(CLK_TCK) && !defined(__QNXNTO__)
      (#const CLK_TCK)
  #else
      unsafePerformIO (sysconf (#const _SC_CLK_TCK) >>= return . fromIntegral)

But I don't actually understand what this code does or what the error I get 
means.  I'm not sure my patch is safe.  I'd like to get more clarity on 
this.

-- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph



More information about the Cvs-ghc mailing list