
#15399: Build failure on PowerPC 64-bit big endian ----------------------------------------+--------------------------------- Reporter: trommler | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.5 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+--------------------------------- Comment (by trommler): My patch was not quite good enough. Here is another endianness issue: {{{ BCO -> do // removed checks let splitWord = rawWds !! 3 pure $ BCOClosure itbl (pts !! 0) (pts !! 1) (pts !! 2) // on big endian this is the wrong way around (fromIntegral splitWord) (fromIntegral $ shiftR splitWord (wORD_SIZE_IN_BITS `div` 2)) (drop 4 rawWds) }}} I need a way to tell whether I am running on a big endian system. Is there any way to know inside without access to `DynFlags`? Is there even a portable way to read the first half-word from a word in memory? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15399#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler