Ticket #706 (closed bug: fixed)
GHC uses _stub.c files regardless of whether any 'foreign import' decls remain in a .hs file
| Reported by: | ncalexan@… | Owned by: | simonmar |
|---|---|---|---|
| Priority: | high | Milestone: | 7.4.1 |
| Component: | Compiler (FFI) | Version: | 6.4.1 |
| Keywords: | ffi, link | Cc: | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Compile-time crash | Difficulty: | Moderate (less than a day) |
| Test Case: | Blocked By: | #3687 | |
| Blocking: | Related Tickets: |
Description
It appears GHC links any _stub.o files it can find, which is not correct (although usually it only leads to duplicate symbols.) To duplicate, have two modules A and B, and a foreign import in A. A_stub.o will be built as usual. Copy A_stub.o to B_stub.o, relink and have duplicate symbols.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

