Skip to content

Commit

Permalink
Raise an error when calling make with MARCHes known to fail
Browse files Browse the repository at this point in the history
Pre-SSE2 CPUs are not supported as some tests fail (#7185).
Better warn as soon as possible.
  • Loading branch information
nalimilan committed Jun 10, 2015
1 parent 608fc91 commit 082a0e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,11 @@ XC_HOST := $(ARCH)$(shell echo $(BUILD_MACHINE) | sed "s/[^-]*\(.*\)$$/\1/")
MARCH = $(ARCH)
endif

# Detect common pre-SSE2 MARCH values known not to work
ifneq ($(findstring $(MARCH),i386 i486 i586 i686 pentium pentium2 pentium3),)
$(error Pre-SSE2 builds are not supported. To create a generic binary, pass MARCH=pentium4)
endif

ifneq ($(MARCH),)
CC += -march=$(MARCH)
CXX += -march=$(MARCH)
Expand Down

0 comments on commit 082a0e9

Please sign in to comment.