AW: GHC and Panther (Mac OS X 10.3)

Malcolm Wallace Malcolm.Wallace at
Thu Nov 20 14:26:00 EST 2003

Thomas Davie <tatd100 at> writes:

>                It finally broke when hmake tried to bootstrap it's self 
> and decided that the -p meant try to load the package gcc3, does anyone 
> have any idea how to get round that?
> >
> >     -pgmP "gcc3 -E -traditional"

My guess is that hmake is interpreting this as two separate arguments,
rather than a single option to be passed through to the compiler.
So you need somehow to hide these options from the hmake command-line,
using a different mechanism to pass them to the compiler.

 (1) You could create a shell alias for ghc to always add the necessary
     arguments e.g. (in bash)
          alias  ghc  ghc -pgmP "gcc3 -E -traditional"
     (but beware of different behaviours in non-interactive shells).

 (2) You could add the extra arguments into hmake's configuration.
     e.g. in lib/powerpc-Darwin/hmakerc change
          , extraCompilerFlags = []
          , extraCompilerFlags = ["-pgmP \"gcc3 -E -traditional\""]
     and make sure that the extra arguments also appear in the
     finally-installed hmakerc file.

 (3) You could add the options into the HFLAGS environment variable
     e.g. (in bash)
          HFLAGS="-pgmP \"gcc3 -E -traditional\"" export HFLAGS
     The HFLAGS variable is expanded into the compiler's commandline
     by hmake.


More information about the Haskell-Cafe mailing list