#7591 closed bug (fixed)

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

Reported by: StephenBlackheath Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: arm cross llvm Cc:
Operating System: Unknown/Multiple Architecture: arm
Type of failure: Building GHC failed Difficulty: Unknown
Test Case: Blocked By:
Blocking: #7623 Related Tickets:

Description

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.

Attachments (1)

0001-MachRegs.h-requires-ghcautoconf.h-to-be-included-bef.patch (872 bytes) - added by StephenBlackheath 15 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 months ago by dterei

  • Blocking 7623 added

comment:2 Changed 15 months ago by igloo

  • Difficulty set to Unknown
  • Status changed from new to patch

comment:3 Changed 15 months ago by docks.cattlemen.stephen@…

commit 8bb9548a991142137d13a8d77fb6f46ed2f49f4d

Author: Stephen Blackheath <docks.cattlemen.stephen@blacksapphire.com>
Date:   Wed Jan 16 14:28:42 2013 +1300

    MachRegs.h requires ghcautoconf.h to be included before it (#7591)
    
    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.

 includes/CodeGen.Platform.hs |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

comment:4 Changed 15 months ago by simonmar

  • Resolution set to fixed
  • Status changed from patch to closed

Thanks for the patch!

Note: See TracTickets for help on using tickets.