
#13259: cross-endian GHC generates invalid .hi files -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I've reproduced the bug in the following setup: {{{ ./configure \ --enable-unregisterised \ --host=x86_64-pc-linux-gnu \ --target=m68k-unknown-linux-gnu }}} m68k is a 32-bit big-endian machine. {{{ $ LD_BIND_NOW=1 inplace/bin/ghc-stage2 --show-iface libraries/base/dist- install/build/System/IO.hi Magic: Wanted 129742, got 3472490752 magic number mismatch: old/corrupt interface file? (wanted 129742, got 3472490752) $ printf "%08X - %08X\n" 129742 3472490752 0001FACE - CEFA0100 }}} Reverting changeset:fbcef83a3aa130d976a201f2a21c5afc5a43d000 restores .hi loading and ghc-stage2. I'm still not sure what exactly breaks. WORDS_BIGENDIAN looks suspicious. I guess it breaks ghc-stage1 endianness understanding. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13259 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler