[MLton] MLton.Platform on AMD64
Matthew Fluet
fluet@cs.cornell.edu
Sun, 7 Aug 2005 15:29:28 -0400 (EDT)
I don't recall anyone commenting on this before, but there is an oddity in
the behavior of MLton.Platform.Arch.host on AMD64 (in the "target AMD64 as
a 32-bit platform" world). Apparently, because of the -m32 flags to gcc,
the evaluation of platform.h defines MLton_Platform_Arch_host as "x86".
Howerver, /bin/platform (and, hence, the architecture in the description
of self in the target-map) yields amd64.
Hence, MLton.Platform.Arch.host always gives X86, even though the self
architecture is amd64.
This led to one confusion, whereby mlnlffigen selects the default
architecture target by consulting MLton.Platform.Arch.host, but the
TARGET_ARCH MLB path variable is set by consulting Control.targetArch.
Anyways, this will eventually go away, but others may want to be aware of
this in the interim.