Since clock compiles its bundled C code with -O3, gcc will optimize a division followed by a modulo calculation to a single 64-bit divmod. This isn't natively supported on 32-bit architectures, which can lead
to bizarre linking errors (as in #50). To avoid this, we simply prevent gcc from doing this optimization using an __attribute__.
Since clock compiles its bundled C code with
-O3
,gcc
will optimize a division followed by a modulo calculation to a single 64-bitdivmod
. This isn't natively supported on 32-bit architectures, which can lead to bizarre linking errors (as in #50). To avoid this, we simply preventgcc
from doing this optimization using an__attribute__
.For more information, see the discussion at https://ghc.haskell.org/trac/ghc/ticket/15094.