From 39b06558772bfed444a51b904ce47641bf200452 Mon Sep 17 00:00:00 2001 From: ericwa Date: Wed, 29 Sep 2010 04:17:50 +0000 Subject: [PATCH] libobjc2: another makefile hack to get mingw to declare strdup --- GNUmakefile | 4 +++- toydispatch/GNUmakefile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index bb90699..b4c7baa 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -86,9 +86,11 @@ ifneq ($(findstring gcc, $(CC)),) libobjc_CFLAGS += -fgnu89-inline endif -# Hack to get the __sync_* GCC builtins to work on Windows ifeq ($(GNUSTEP_TARGET_OS), mingw32) +# Hack to get the __sync_* GCC builtins to work on Windows libobjc_CFLAGS += -march=i586 +# Hack to get mingw to provide declaration for strdup (since it is non-standard) +libobjc_CPPFLAGS += -U__STRICT_ANSI__ endif include $(GNUSTEP_MAKEFILES)/aggregate.make diff --git a/toydispatch/GNUmakefile b/toydispatch/GNUmakefile index 39af68e..331491a 100644 --- a/toydispatch/GNUmakefile +++ b/toydispatch/GNUmakefile @@ -15,9 +15,11 @@ toydispatch_LIBRARIES_DEPEND_UPON += -lpthread toydispatch_CFLAGS += -Werror -std=c99 -# Hack to get the __sync_* GCC builtins to work on Windows ifeq ($(GNUSTEP_TARGET_OS), mingw32) +# Hack to get the __sync_* GCC builtins to work on Windows toydispatch_CFLAGS += -march=i586 +# Hack to get mingw to provide declaration for strdup (since it is non-standard) +toydispatch_CPPFLAGS += -U__STRICT_ANSI__ endif include $(GNUSTEP_MAKEFILES)/library.make