CodeGen.Platform.hs not including ghcautoconf.h as it should, breaks ARMv5 compiler
|Reported by:||StephenBlackheath||Owned by:|
|Keywords:||arm cross llvm||Cc:|
|Type of failure:||Building GHC failed||Difficulty:||Unknown|
|Test Case:||Blocked By:|
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.