
#9056: --make paths are not deduplicated -------------------------------------+------------------------------------- Reporter: evincarofautumn | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Driver | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by thomie): I was working on a patch for this (attached, unfinished), but now don't think there's actually a bug here. I find the current error message quite clear, and think that it can be expected from a build system or the user not to supply the same filename twice. Please do reopen if you disagree, perhaps as a feature request. Fwiw: gcc doesn't seem to deduplicate input filenames either, giving a similar error message. {{{ $ cat test.c int main(void) { return 0; } $ gcc test.c test.c /tmp/ccL0QwIZ.o: In function `main': test.c:(.text+0x0): multiple definition of `main' /tmp/ccxMTZBK.o:test.c:(.text+0x0): first defined here collect2: error: ld returned 1 exit status }}} If we do want this: It is not as simple as just deduplicating filenames. For starters, comparing paths with (==) returns False for `./foo` and `foo`, so `System.FilePath.equalFilePaths` should be used. But what about relative vs absolute paths? What about `Main` and `Main.hs`, are they the same? What about `Main.lhs` and `Main.hs`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9056#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler