Integrating tools with Cabal

Roman Cheplyaka roma at
Fri Nov 9 21:34:44 CET 2012

* Mikhail Glushenkov <the.dead.shall.rise at> [2012-11-09 19:36:58+0100]
> Hi,
> On Fri, Nov 9, 2012 at 6:25 PM, Roman Cheplyaka <roma at> wrote:
> >
> >   searching for ld in path.
> >   found ld at /usr/bin/ld
> >   ("/home/feuerbach/bin/gen-iface",["-c","/tmp/17368.c","-o","/tmp/17368.o"])
> >   ("/usr/bin/ld",["-x","-r","/tmp/17368.o","-o","/tmp/17369.o"])
> >   /usr/bin/ld returned ExitFailure 1 with error message:
> >   /tmp/17368.o: file not recognized: File truncated
> >   Setup: /tmp/17369.o: does not exist
> I looked into this - this is caused by configureLd' in
> Distribution.Simple.GHC. This function tries to determine whether ld
> supports the -x flag by compiling a short C program ("int foo() {}")
> with ghc (apparently ghc supports .c files as input).
> Since ghc just invokes gcc when given .c files, and you're trying to
> mimic ghc, I think it makes sense to support this behaviour. If you
> think that this is ugly, you can put all such hacky code into a
> separate driver program, and leave your analyser unmodified.

At this point I'd rather work on a separate module in spirit of
Distribution.Simple.*HC and hope that Cabal devs wouldn't mind to accept

This will be essentially Cabal support for haskell-suite[1].


Of course, fixing #57 would be ideal, but given the complexity of
existing modules I guess we're going to live with this for quite some


More information about the cabal-devel mailing list