-pgm option syntax
Jens Petersen
juhp at 01.246.ne.jp
Tue Feb 19 22:51:33 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!
It would be good if ghc would at like give a better error
message when an empty cmd is passed to -pgmX.
Jens
More information about the Glasgow-haskell-bugs
mailing list