Skip to content

Commit

Permalink
Update MXE ICE workaround to blacklist anything targetting x86_64-w64…
Browse files Browse the repository at this point in the history
…-mingw32.static

As seen in CleverRaven#19339
  • Loading branch information
mutability committed Nov 24, 2016
1 parent 8315c38 commit 6c5cd05
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ ifneq ($(findstring BSD,$(OS)),)
BSD = 1
endif

# Compiler version & target machine - used later for MXE ICE workaround
ifdef CROSS
CXXVERSION := $(shell $(CROSS)$(CXX) --version | grep -i gcc | sed 's/^.* //g')
CXXMACHINE := $(shell $(CROSS)$(CXX) -dumpmachine)
endif

# Expand at reference time to avoid recursive reference
OS_COMPILER := $(CXX)
# Appears that the default value of $LD is unsuitable on most systems
Expand All @@ -158,11 +164,6 @@ STRIP = $(CROSS)strip
RC = $(CROSS)windres
AR = $(CROSS)ar

# Capture CXXVERSION if using MXE - used later for ICE workaround
ifdef CROSS
CXXVERSION := $(shell ${OS_COMPILER} --version | grep -i gcc | sed 's/^.* //g')
endif

# We don't need scientific precision for our math functions, this lets them run much faster.
CXXFLAGS += -ffast-math
LDFLAGS += $(PROFILE)
Expand All @@ -177,7 +178,8 @@ ifdef RELEASE
endif
else
# MXE ICE Workaround
ifeq (${CXXVERSION}, 4.9.3)
# known bad on 4.9.3 and 4.9.4, if it gets fixed this could include a version test too
ifeq ($(CXXMACHINE), x86_64-w64-mingw32.static)
OPTLEVEL = -O3
else
OPTLEVEL = -Os
Expand Down

0 comments on commit 6c5cd05

Please sign in to comment.