projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
763daed
)
Add __PIC__ define for -fPIC compiled C code
author
Clemens Fruhwirth
<clemens@endorphin.org>
Tue, 7 Aug 2007 16:06:16 +0000
(16:06 +0000)
committer
Clemens Fruhwirth
<clemens@endorphin.org>
Tue, 7 Aug 2007 16:06:16 +0000
(16:06 +0000)
compiler/main/DynFlags.hs
patch
|
blob
|
history
diff --git
a/compiler/main/DynFlags.hs
b/compiler/main/DynFlags.hs
index
ce58c90
..
8880550
100644
(file)
--- a/
compiler/main/DynFlags.hs
+++ b/
compiler/main/DynFlags.hs
@@
-470,7
+470,9
@@
defaultDynFlags =
hpcDir = ".hpc",
opt_L = [],
- opt_P = [],
+ opt_P = (if opt_PIC
+ then ["-D__PIC__"]
+ else []),
opt_F = [],
opt_c = [],
opt_a = [],
@@
-1628,15
+1630,18
@@
picCCOpts dflags
-- in dynamic libraries.
| opt_PIC
- = ["-fno-common"]
+ = ["-fno-common", "-D__PIC__"]
| otherwise
= ["-mdynamic-no-pic"]
#elif mingw32_TARGET_OS
-- no -fPIC for Windows
+ | opt_PIC
+ = ["-D__PIC__"]
+ | otherwise
= []
#else
| opt_PIC
- = ["-fPIC"]
+ = ["-fPIC", "-D__PIC__"]
| otherwise
= []
#endif