Commit 59dfaeef authored by Clemens Fruhwirth's avatar Clemens Fruhwirth
Browse files

Undefine __PIC__ before defining it to work around "multiple definitions of __PIC__" warnings

parent d1ed49a6
...@@ -566,7 +566,7 @@ defaultDynFlags = ...@@ -566,7 +566,7 @@ defaultDynFlags =
opt_L = [], opt_L = [],
opt_P = (if opt_PIC opt_P = (if opt_PIC
then ["-D__PIC__"] then ["-D__PIC__", "-U __PIC__"] -- this list is reversed
else []), else []),
opt_F = [], opt_F = [],
opt_c = [], opt_c = [],
...@@ -2162,18 +2162,18 @@ picCCOpts _dflags ...@@ -2162,18 +2162,18 @@ picCCOpts _dflags
-- in dynamic libraries. -- in dynamic libraries.
| opt_PIC | opt_PIC
= ["-fno-common", "-D__PIC__"] = ["-fno-common", "-U __PIC__","-D__PIC__"]
| otherwise | otherwise
= ["-mdynamic-no-pic"] = ["-mdynamic-no-pic"]
#elif mingw32_TARGET_OS #elif mingw32_TARGET_OS
-- no -fPIC for Windows -- no -fPIC for Windows
| opt_PIC | opt_PIC
= ["-D__PIC__"] = ["-U __PIC__","-D__PIC__"]
| otherwise | otherwise
= [] = []
#else #else
| opt_PIC | opt_PIC
= ["-fPIC", "-D__PIC__"] = ["-fPIC", "-U __PIC__", "-D__PIC__"]
| otherwise | otherwise
= [] = []
#endif #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