gcc options and mingw: move a gcc options detection from a makefile to the configure

+ define XCC and XAR if mingw32 defined
    + use XCC and XAR in lib/Makefile if defined
    Try "./configure --enable-mingw32; make". This must work
This commit is contained in:
seyko
2015-03-04 11:47:52 +03:00
parent 76af948623
commit 48d12e42ad
3 changed files with 20 additions and 18 deletions

View File

@ -8,19 +8,7 @@ VPATH = $(top_srcdir)
CPPFLAGS += -I$(TOP) # for config.h
ifeq (-$(findstring gcc,$(CC))-,-gcc-)
ifeq (-$(findstring $(GCC_MAJOR),01)-,--)
CFLAGS+=-fno-strict-aliasing
ifeq (-$(findstring $(GCC_MAJOR),23)-,--)
CFLAGS+=-Wno-pointer-sign -Wno-sign-compare
ifeq (-$(GCC_MAJOR)-$(findstring $(GCC_MINOR),56789)-,-4--)
CFLAGS+=-D_FORTIFY_SOURCE=0
else
CFLAGS+=-Wno-unused-result
endif
endif
endif
else # not GCC
ifneq (-$(findstring gcc,$(CC))-,-gcc-)
ifeq (-$(findstring clang,$(CC))-,-clang-)
# make clang accept gnuisms in libtcc1.c
CFLAGS+=-fheinous-gnu-extensions