summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgCon.lhs
diff options
context:
space:
mode:
authorBen.Lippmeier@anu.edu.au <unknown>2009-11-17 04:37:16 +0000
committerBen.Lippmeier@anu.edu.au <unknown>2009-11-17 04:37:16 +0000
commitf64aaa7b4230cec62f0679ddf998fe79e0a42820 (patch)
tree594fc7a6d1b797d2016016954d72bc64f03ca371 /compiler/codeGen/CgCon.lhs
parentf5f023361796c9553933eccf82e0c066e5e30814 (diff)
downloadhaskell-f64aaa7b4230cec62f0679ddf998fe79e0a42820.tar.gz
Use opt_PIC not #defined __PIC__ in compiler source.
Diffstat (limited to 'compiler/codeGen/CgCon.lhs')
-rw-r--r--compiler/codeGen/CgCon.lhs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/codeGen/CgCon.lhs b/compiler/codeGen/CgCon.lhs
index 36c851d5ba..0981811ee7 100644
--- a/compiler/codeGen/CgCon.lhs
+++ b/compiler/codeGen/CgCon.lhs
@@ -171,9 +171,11 @@ because they don't support cross package data references well.
\begin{code}
-#if !(defined(__PIC__) && defined(mingw32_HOST_OS))
buildDynCon binder _ con [arg_amode]
| maybeIntLikeCon con
+#if defined(mingw32_TARGET_OS)
+ , not opt_PIC
+#endif
, (_, CmmLit (CmmInt val _)) <- arg_amode
, let val_int = (fromIntegral val) :: Int
, val_int <= mAX_INTLIKE && val_int >= mIN_INTLIKE
@@ -185,6 +187,9 @@ buildDynCon binder _ con [arg_amode]
buildDynCon binder _ con [arg_amode]
| maybeCharLikeCon con
+#if defined(mingw32_TARGET_OS)
+ , not opt_PIC
+#endif
, (_, CmmLit (CmmInt val _)) <- arg_amode
, let val_int = (fromIntegral val) :: Int
, val_int <= mAX_CHARLIKE && val_int >= mIN_CHARLIKE
@@ -193,7 +198,6 @@ buildDynCon binder _ con [arg_amode]
-- CHARLIKE closures consist of a header and one word payload
charlike_amode = CmmLit (cmmLabelOffW charlike_lbl offsetW)
; returnFC (taggedStableIdInfo binder charlike_amode (mkConLFInfo con) con) }
-#endif
\end{code}