about summary refs log tree commit diff
path: root/mk
diff options
context:
space:
mode:
authorMarko Durkovic <marko@miding.de>2014-12-09T11·20+0100
committerMarko Durkovic <marko@miding.de>2014-12-09T12·00+0100
commit936f68668c191ca6f904dd868fe364aeba1d531f (patch)
tree81f7ca293877c7359b19557caee3f0952566bcdf /mk
parent629e8da3aa6da507bc360385f5f341471ef57a89 (diff)
Set custom compiler flags on Cygwin
Diffstat (limited to 'mk')
-rw-r--r--mk/lib.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/lib.mk b/mk/lib.mk
index 56e162d5007c..f7c8c6b3aa84 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -29,8 +29,13 @@ mandir ?= $(prefix)/share/man
 BUILD_SHARED_LIBS ?= 1
 
 ifeq ($(BUILD_SHARED_LIBS), 1)
-  GLOBAL_CFLAGS += -fPIC
-  GLOBAL_CXXFLAGS += -fPIC
+  ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
+    GLOBAL_CFLAGS += -U__STRICT_ANSI__
+    GLOBAL_CXXFLAGS += -U__STRICT_ANSI__
+  else
+    GLOBAL_CFLAGS += -fPIC
+    GLOBAL_CXXFLAGS += -fPIC
+  endif
   ifneq ($(OS), Darwin)
    ifneq ($(OS), SunOS)
     GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries