about summary refs log tree commit diff
path: root/mk/lib.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/lib.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 ba1fb3a2a989..4ad5c636c8d4 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -52,8 +52,13 @@ endif
 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