aboutsummaryrefslogtreecommitdiffstats
path: root/main/libcrystalhd/gcc-opts-fix.patch
blob: c89c43d7fd748c3608b936d616fcdaa60a020f7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Patch to fix build failures on non x86 machines.
Origin: Debian

--- a/linux_lib/libcrystalhd/Makefile
+++ b/linux_lib/libcrystalhd/Makefile
@@ -24,7 +24,10 @@
 # -D_USE_SHMEM_
 
 CPPFLAGS += ${INCLUDES}
-CPPFLAGS += -O2 -Wall -fPIC -shared -fstrict-aliasing -msse2
+CPPFLAGS += -O2 -Wall -fPIC -shared -fstrict-aliasing
+MACHINE_OPTS = $(shell gcc -xc -c /dev/null -msse2 -o /dev/null \
+                 >/dev/null 2>&1 && echo -msse2)
+CPPFLAGS += $(MACHINE_OPTS)
 LDFLAGS = -Wl,-soname,${BCLIB_SL} -pthread
 
 SRCFILES = 	libcrystalhd_if.cpp \