Commit f9686dd4 authored by Simon Marlow's avatar Simon Marlow

ROLLBACK: picCCOpts: -dynamic should not entail -optc-fPIC

and add a comment to explain why it was wrong.  This fixes the dyn
test failures that sprang up recently.
parent cbc65cfa
......@@ -2205,7 +2205,12 @@ picCCOpts _dflags
| otherwise
= []
#else
| opt_PIC
-- we need -fPIC for C files when we are compiling with -dynamic,
-- otherwise things like stub.c files don't get compiled
-- correctly. They need to reference data in the Haskell
-- objects, but can't without -fPIC. See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/PositionIndependentCode
| opt_PIC || not opt_Static
= ["-fPIC", "-U __PIC__", "-D__PIC__"]
| otherwise
= []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment