[project @ 2005-08-03 10:42:53 by simonmar]
authorsimonmar <unknown>
Wed, 3 Aug 2005 10:42:53 +0000 (10:42 +0000)
committersimonmar <unknown>
Wed, 3 Aug 2005 10:42:53 +0000 (10:42 +0000)
commit34495a28b82706890b0d3bf730f3cc79ae4c2a0c
tree157a8b84e83761a9a9b289e3c851cc7742fb2f77
parent5cc19c6af5f38f0d0945ad8e9b5e71cb568afa2f
[project @ 2005-08-03 10:42:53 by simonmar]
Fix the location of _stub.o files when compiling with -odir.  The
comment from the source:

-- The _stub.c file is derived from the haskell source file (but stored
-- in hscStubCOutName in the dflags for some reason, probably historical).
-- Consequently, we derive the _stub.o filename from the haskell object
-- filename.
--
-- This isn't necessarily the same as the object filename we
-- would get if we just compiled the _stub.c file using the pipeline.
-- For example:
--
--    ghc src/A.hs -odir obj
--
-- results in obj/A.o, and src/A_stub.c.  If we compile src/A_stub.c with
-- -odir obj, we would get obj/src/A_stub.o, which is wrong; we want
-- obj/A_stub.o.
ghc/compiler/main/DriverPipeline.hs