only turn off some string check functions with _FORTIFY_SOURCE=0 for OSX when USE_SYS_DYN_MEM=yes

This commit is contained in:
Nguyen Anh Quynh 2014-03-07 22:06:51 +08:00
parent b6ece8d861
commit c77cf3a18f
1 changed files with 4 additions and 6 deletions

View File

@ -16,12 +16,6 @@ RANLIB = $(CROSS)ranlib
STRIP = $(CROSS)strip
endif
ifeq ($(CAPSTONE_DIET),yes)
# remove string check & stack protector functions
CFLAGS += -D_FORTIFY_SOURCE=0
CFLAGS += -fno-stack-protector
endif
CFLAGS += -fPIC -O3 -Wall -Iinclude
ifeq ($(USE_SYS_DYN_MEM),yes)
@ -151,6 +145,10 @@ PKGCFCGDIR = $(LIBDIR)/pkgconfig
ifeq ($(UNAME_S),Darwin)
EXT = dylib
AR_EXT = a
ifneq ($(USE_SYS_DYN_MEM),yes)
# remove string check because OSX kernel complains about missing symbols
CFLAGS += -D_FORTIFY_SOURCE=0
endif
# By default, suppose that Brew is installed & use Brew path for pkgconfig file
PKGCFCGDIR = /usr/local/lib/pkgconfig
# is Macport installed instead?