Opened 9 months ago

Closed 9 months ago

#8393 closed bug (fixed)

hsc2hs copies #define/#undef directives to generated .hs file when cross-compiling

Reported by: rwbarton Owned by: rwbarton
Priority: normal Milestone:
Component: hsc2hs Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by hvr)

See summary. This causes a cross-compilation of ghc to fail while building GHC/Stack.hsc from libraries/base, because base.cabal no longer specifies extensions: CPP as of [dfb52c3d5/base].

Attachments (1)

0001-Don-t-emit-define-undef-directives-in-generated-.hs-.patch (1.2 KB) - added by rwbarton 9 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 months ago by rwbarton

  • Status changed from new to patch

comment:2 Changed 9 months ago by hvr

  • Description modified (diff)

comment:3 Changed 9 months ago by Austin Seipp <austin@…>

In 47bd048f243fd010e9d8e05039405263ef30ff54/testsuite:

Mark those tests which depend on libraries not built when cross-compiling

Issue #8393

Signed-off-by: Austin Seipp <>

comment:4 Changed 9 months ago by Austin Seipp <austin@…>

In 47189a3c391c9d3d75d530de2ca7a645b67d78b1/testsuite:

Skip integerGmpInternals in ghci (no unboxed tuples)

Issue #8393

Signed-off-by: Austin Seipp <>

comment:5 Changed 9 months ago by Austin Seipp <austin@…>

In 881038a70cfd1e5dbd50050465c5af5b7fd8c969/testsuite:

Add 32-bit output for T7919

Issue #8393

Signed-off-by: Austin Seipp <>

comment:6 Changed 9 months ago by thoughtpolice

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

Merged, although I totally botched the commit references...

commit 4a0f67704d89712f8493a0c7eccffa9243d6ef09
Author: Reid Barton <>
Date:   Tue Oct 1 13:02:26 2013 -0400

    Don't emit #define/#undef in generated .hs files
    ... just like they aren't emitted in the ordinary case; see outTokenHs
    in C.hs.
    Closes #8393.
    Signed-off-by: Austin Seipp <>

Note: See TracTickets for help on using tickets.