Integrating tools with Cabal
Mikhail Glushenkov
the.dead.shall.rise at gmail.com
Fri Nov 9 19:36:58 CET 2012
Hi,
On Fri, Nov 9, 2012 at 6:25 PM, Roman Cheplyaka <roma at ro-che.info> 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.
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
More information about the cabal-devel
mailing list