From 936f68668c191ca6f904dd868fe364aeba1d531f Mon Sep 17 00:00:00 2001 From: Marko Durkovic Date: Tue, 9 Dec 2014 12:20:27 +0100 Subject: [PATCH] Set custom compiler flags on Cygwin --- mk/lib.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mk/lib.mk b/mk/lib.mk index 56e162d50..f7c8c6b3a 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