integer size on NetBSD amd64

Donn Cave donn at
Thu May 22 12:09:51 EDT 2008

I have been trying to get ghc working on the NetBSD AMD64
platform, and there seems to be a little problem with the
integer size.  With minInt and maxInt defined as they are
in GHC/Base.lhs, ghc can't compile this file - it cranks
away and just gets bigger until all the memory is gone.

Base.lhs compiles right away if I reduce the size of minInt
and maxInt by several bits -

minInt     = I# (-0x2000000000000000#)
maxInt     = I# 0x1FFFFFFFFFFFFFFF# 
-- minInt  = I# (-0x8000000000000000#) 
-- maxInt  = I# 0x7FFFFFFFFFFFFFFF#

(... and it goes on to crash in GHC/Num.lhs.)  So ... maybe
somewhere in there, something isn't configured right for 64 bit
integer arithmetic, even though the word size parameters in
ghcautoconf.h look right?  Anyone have an idea what to look for?

The GHC version is 6.6.1.  The .hc donor host is OpenBSD, gcc3
(NetBSD has gcc4.)  The include files from NetBSD (DerivedConstants.h,
GHCConstants.h, ghcautoconf.h) look fine, I just went back to
the OpenBSD build to verify that they weren't changed during
the build.  The procedure I'm following is `Cross-compiling to
produce an unregisterised GHC'

	Donn Cave, donn at

More information about the Glasgow-haskell-users mailing list