[Hackage] #296: Cabal should tell hsc2hs to use gcc as cc, not ghc

Hackage trac at galois.com
Thu Jun 19 06:13:17 EDT 2008


#296: Cabal should tell hsc2hs to use gcc as cc, not ghc
----------------------------+-----------------------------------------------
  Reporter:  duncan         |        Owner:         
      Type:  enhancement    |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:  1.2.3.0
  Severity:  normal         |     Keywords:         
Difficulty:  normal         |   Ghcversion:  6.8.2  
  Platform:                 |  
----------------------------+-----------------------------------------------
 The version of hsc2hs that gets bundled with ghc uses ghc by default as
 the C compiler. The benefit is that we can pass `-package` flags through
 to ghc and have ghc look up the appropriate C includes and other cc
 options that are supposed to be used with that package.

 However it also causes no end of problems. For example, we need to know if
 the version of hsc2hs we're using actually uses ghc underneath or gcc,
 because if it's ghc then we have to doubly escape all the cc options that
 we want to pass through to gcc.

 It also means that when hsc2hs invents extra -F flags it fails because ghc
 does not understand that flag (see
 http://hackage.haskell.org/trac/ghc/ticket/2383).

 The right thing to do is to have Cabal look up the right flags to use from
 the package database and call hsc2hs with them, using gcc as cc. We do now
 have access to the package database so that bit is possible. We'll have to
 find the gcc program which we do not currently do as we use gcc to compile
 C code.

 This is closely related to #229.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/296>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list