Skip to content

Definition of endianess removed

Summary

Commit ee8118ca removes the inclusion of file ghcconfig.h in file compiler/HsVersions.hs. However, file ghcconfig.h includes ghcautoconf.h where the macro WORDS_BIGENDIAN beside others is defined. As a result all checks of the form

#if defined(WORDS_BIGENDIAN)

silently fail even for big endian machines which results in broken binaries.

Macro WORDS_BIGENDIAN is used in the following files which must be taken care of:

  • compiler/llvmGen/Llvm/Types.hs (fixed in !2228 (closed))
  • libraries/ghc-heap/GHC/Exts/Heap.hs (includes ghcconfig.h which itself includes ghcautoconf.h)
  • libraries/Cabal/Cabal/Distribution/Fields/Lexer.hs (includes ghcconfig.h which itself includes ghcautoconf.h)
  • libraries/bytestring/Data/ByteString/Builder/Prim/Binary.hs (includes MachDeps.h which itself includes ghcautoconf.h)
  • libraries/ghci/GHCi/ResolvedBCO.hs (includes MachDeps.h which itself includes ghcautoconf.h)
  • libraries/base/GHC/ByteOrder.hs (fixed in !2302 (closed))
  • libraries/base/GHC/IO/Encoding/CodePage/API.hs (fixed in !2302 (closed))
  • libraries/base/GHC/IO/Encoding/Iconv.hs (includes MachDeps.h which itself includes ghcautoconf.h)
  • testsuite/tests/primops/should_run/T4442.hs (includes MachDeps.h which itself includes ghcautoconf.h)
  • testsuite/tests/codeGen/should_run/T7600.hs (fixed in !2302 (closed))
  • testsuite/tests/codeGen/should_run/cgrun044.hs (includes ghcconfig.h which itself includes ghcautoconf.h)
Edited by Stefan Schulze Frielinghaus
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information