Work around -std=c++11 MinGW compiler problem
This bug was already fixed 5 months ago, but AFAICT MinGW.org hasn't released it yet. MinGW-w64 is unaffected, as is the MinGW compiler packaged with Cygwin.
This commit is contained in:
parent
6b31bd9d8c
commit
fe60984ce4
5
Makefile
5
Makefile
@ -29,6 +29,9 @@ UNIX_ADAPTER_EXE ?= console.exe
|
||||
ifeq "$(wildcard config.mk)" ""
|
||||
$(error config.mk does not exist. Please run ./configure)
|
||||
endif
|
||||
|
||||
MINGW_OPTIMIZATION_FLAGS ?= -O2
|
||||
|
||||
include config.mk
|
||||
|
||||
COMMON_CXXFLAGS += \
|
||||
@ -45,7 +48,7 @@ UNIX_CXXFLAGS += \
|
||||
|
||||
MINGW_CXXFLAGS += \
|
||||
$(COMMON_CXXFLAGS) \
|
||||
-O2 \
|
||||
$(MINGW_OPTIMIZATION_FLAGS) \
|
||||
-std=c++11
|
||||
|
||||
MINGW_LDFLAGS += -static -static-libgcc -static-libstdc++
|
||||
|
5
configure
vendored
5
configure
vendored
@ -148,6 +148,11 @@ 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 C++11 mode. The workaround is to disable optimizations.
|
||||
# It was fixed on 2015-07-31, but as of 2016-01-05, the fix hasn't been
|
||||
# released. See http://ehc.ac/p/mingw/bugs/2250/.
|
||||
echo MINGW_OPTIMIZATION_FLAGS = >> 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