Fixes for cross-compiling to a different word size
authorSimon Marlow <marlowsd@gmail.com>
Wed, 14 Oct 2009 13:06:12 +0000 (13:06 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 14 Oct 2009 13:06:12 +0000 (13:06 +0000)
commit79e9cfa32cc3b94428e1199ce550bb62c50bf8e6
tree1304c1a2fe909f8ac3fc35963e6f8345bceeb8fc
parent2354f96975dc845b1c62b4c72d770be4b638ebba
Fixes for cross-compiling to a different word size
This patch eliminates a couple of places where we were assuming that
the host word size is the same as the target word size.

Also a little refactoring: Constants now exports the types TargetInt
and TargetWord corresponding to the Int/Word type on the target
platform, and I moved the definitions of tARGET_INT_MAX and friends
from Literal to Constants.

Thanks to Barney Stratford <barney_stratford@fastmail.fm> for helping
track down the problem and fix it.  We now know that GHC can
successfully cross-compile from 32-bit to 64-bit.
compiler/basicTypes/Literal.lhs
compiler/prelude/PrelRules.lhs
includes/HaskellConstants.hs