Commit 40d05957 authored by Stephen Blackheath's avatar Stephen Blackheath

Force -fPIC when linking against dynamic libraries on Mac OS/X.

Otherwise you get
/tmp/ghc7602_0/ghc7602_0.s:207:0:
   non-relocatable subtraction expression, "___stginit_Lib_dyn" minus "L1x2;4"
/tmp/ghc7602_0/ghc7602_0.s:207:0:
   symbol: "___stginit_Lib_dyn" can't be undefined in a subtraction expression
parent da01c314
......@@ -271,6 +271,8 @@ opt_UF_DearOp = ( 4 :: Int)
opt_PIC :: Bool
#if darwin_TARGET_OS && x86_64_TARGET_ARCH
opt_PIC = True
#elif darwin_TARGET_OS
opt_PIC = lookUp (fsLit "-fPIC") || not opt_Static
#else
opt_PIC = lookUp (fsLit "-fPIC")
#endif
......
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