Package: liberasurecode / 1.4.0-1~bpo8+1

disable-sse.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Description: Disable SSE flags
 In Debian, we don't know which type of CPU the package will be run on, and if
 it has support for SSE or not. Therefore, we have to disable SSE completely.
 .
 Note that it should be possible to have a specific build of the lib with SSE
 support within a specific directory, but I haven't investigated how to do that
 yet. Patches to do exactly that would be welcome!
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2016-06-01

--- a/configure.ac
+++ b/configure.ac
@@ -79,8 +79,6 @@
 
 AC_CONFIG_HEADER(include/config_liberasurecode.h)
 
-AX_EXT()
-
 ################################################################################
 #                             System Headers
 ################################################################################
@@ -150,70 +148,6 @@
 AC_SUBST(ac_aux_dir)
 AC_SUBST(OBJECTS)
 
-dnl Do CPUID and associated compiler flag checks
-
-SUPPORTED_FLAGS=""
-$CC - -E -mmmx </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="-mmmx"
-  AC_MSG_RESULT([$CC supports -mmmx])
-fi
-$CC - -E -msse </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse"
-  AC_MSG_RESULT([$CC supports -msse])
-fi
-$CC - -E -msse2 </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse2"
-  AC_MSG_RESULT([$CC supports -msse2])
-fi
-$CC - -E -msse3 </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse3"
-  AC_MSG_RESULT([$CC supports -msse3])
-fi
-$CC - -E -mssse3 </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mssse3"
-  AC_MSG_RESULT([$CC supports -mssse3])
-fi
-$CC - -E -msse4.1 </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.1"
-  AC_MSG_RESULT([$CC supports -msse4.1])
-fi
-$CC - -E -msse4.2 </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.2"
-  AC_MSG_RESULT([$CC supports -msse4.2])
-fi
-$CC - -E -mavx </dev/null >/dev/null 2>&1
-if [[ $? == "0" ]]; then
-  SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mavx"
-  AC_MSG_RESULT([$CC supports -mavx])
-fi
-
-# Detect the SIMD features supported by both the compiler and the CPU
-SIMD_FLAGS=""
-cat "$srcdir/get_flags_from_cpuid.c" \
-    | sed "s/FLAGSFROMAUTOCONF/${SUPPORTED_FLAGS}/" \
-    | $CC -x c -g - -o get_flags_from_cpuid
-if [[ -e ./get_flags_from_cpuid ]]; then
-  chmod 755 get_flags_from_cpuid; ./get_flags_from_cpuid; rm ./get_flags_from_cpuid
-  if [[ -e compiler_flags ]]; then
-    SIMD_FLAGS=`cat compiler_flags`
-    rm -f compiler_flags
-  else
-    AC_MSG_WARN([Could not run the CPUID detection program])
-  fi
-else
-  AC_MSG_WARN([Could not compile the CPUID detection program])
-fi
-
-AC_MSG_RESULT([Generating with SIMD flags: $SIMD_FLAGS])
-CFLAGS="$CFLAGS $SIMD_FLAGS"
-
 # Certain code may be dependent on 32 vs. 64-bit arch, so add a 
 # flag for 64-bit
 AC_CHECK_SIZEOF([long])