Permalink
Browse files

Enable -msse2 flag for i686 only (Raspberry Pi Fix)

  • Loading branch information...
Tranz5 committed Jul 11, 2014
1 parent 56f8ead commit e41a5741c8c09c387286b85fa9e4c3f0e30ea481
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/makefile.unix
View
@@ -7,6 +7,7 @@ USE_IPV6:=1
USE_LEVELDB:=1
LINK:=$(CXX)
+ARCH:=$(system lscpu | head -n 1 | awk '{print $2}')
DEFS=-DBOOST_SPIRIT_THREADSAFE
@@ -93,9 +94,13 @@ LIBS+= \
DEBUGFLAGS=-g
+ifeq (${ARCH}, i686)
+ EXT_OPTIONS=-msse2
+endif
+
# CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only
# adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work.
-xCXXFLAGS=-O2 -msse2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
+xCXXFLAGS=-O2 $(EXT_OPTIONS) -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
$(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
# LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only

0 comments on commit e41a574

Please sign in to comment.