Enable C++11 mode and re-enable C++ exception handling.
This commit is contained in:
parent
ec3eae8df5
commit
97e1bd2661
6
Makefile
6
Makefile
@ -24,6 +24,7 @@ default : all
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
UNIX_ADAPTER_EXE ?= console.exe
|
||||
MINGW_ENABLE_CXX11_FLAG ?= -std=c++11
|
||||
|
||||
# Include config.mk but complain if it hasn't been created yet.
|
||||
ifeq "$(wildcard config.mk)" ""
|
||||
@ -45,9 +46,8 @@ UNIX_CXXFLAGS += \
|
||||
|
||||
MINGW_CXXFLAGS += \
|
||||
$(COMMON_CXXFLAGS) \
|
||||
-fno-exceptions \
|
||||
-fno-rtti \
|
||||
-O2
|
||||
-O2 \
|
||||
$(MINGW_ENABLE_CXX11_FLAG)
|
||||
|
||||
MINGW_LDFLAGS += -static -static-libgcc -static-libstdc++
|
||||
UNIX_LDFLAGS += $(UNIX_LDFLAGS_STATIC)
|
||||
|
6
configure
vendored
6
configure
vendored
@ -148,6 +148,12 @@ echo MINGW_CXX=$MINGW_CXX >> config.mk
|
||||
|
||||
if test $IS_MSYS1 = 1; then
|
||||
echo UNIX_CXXFLAGS += -DWINPTY_TARGET_MSYS1 >> config.mk
|
||||
# The MSYS1 MinGW compiler has a bug that prevents inclusion of algorithm
|
||||
# and math.h in normal C++11 mode. The workaround is to enable the gnu++11
|
||||
# mode instead. The bug was fixed on 2015-07-31, but as of 2016-02-26, the
|
||||
# fix apparently hasn't been released. See
|
||||
# http://ehc.ac/p/mingw/bugs/2250/.
|
||||
echo MINGW_ENABLE_CXX11_FLAG = -std=gnu++11 >> config.mk
|
||||
fi
|
||||
|
||||
# Figure out how to embed build info (e.g. git commit) into the binary.
|
||||
|
Loading…
Reference in New Issue
Block a user