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|
|Type of failure:||Compile-time crash||Difficulty:||Moderate (less than a day)|
|Test Case:||Blocked By:||#3687|
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.