Skip to content

CodeGen.Platform.hs not including ghcautoconf.h as it should, breaks ARMv5 compiler

MachRegs.h requires ghcautoconf.h to be included before it, because, in the case of ARM processors, it needs to know what ARM variant is being used.

This patch fixes that in includes/CodeGen.Platform.hs, otherwise there is a mismatch between the compiler and llvm.

Perhaps it needs to be made more robust by instead including ghcautoconf.h from MachRegs.h? Otherwise someone else could easily break it. I originally didn't do this, because it wasn't done anywhere else.

Suggested fix attached.

Trac metadata
Trac field Value
Version 7.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information