-pgm option syntax

Simon Marlow simonmar at microsoft.com
Wed Feb 20 09:05:57 EST 2002


> Not sure whether this is a documentation bug or not, but I
> got tripped over by the syntax of the -pgm options this
> week.
> 
> In the user-guide
> http://haskell.org/ghc/docs/latest/set/flag-reference.html#AEN5804
> there clearly seem to be spaces between -pgmX and cmd,
> however looking at the code in
> ghc/compiler/main/{DriverFlags.hs,SysTools.lhs} it is
> clearly not the intention that such a space be present.
> 
> I guess the easily solution is to change the documentation
> to "-pgmXcmd", though personally I think it would be
> friendlier if the spaced version was also allowed.
> 
> With the current behaviour I was getting a mysterious error
> like
> 
>         sh: exec: illegal option: -x
> 
> when using "ghc -pgmc /usr/bin/gcc296 -fvia-C ....".
> Probably ghc was trying to include the gcc binary as an
> object in the compilation!

Thanks.  It used to be the case that the space was optional, but it looks like this got broken recently.  I've fixed it in my tree.

Cheers,
	Simon



More information about the Glasgow-haskell-bugs mailing list