~ubuntu-branches/ubuntu/saucy/pixman/saucy-security

« back to all changes in this revision

Viewing changes to debian/patches/100-pixman-arm-simd-fix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker
  • Date: 2010-03-09 15:07:53 UTC
  • Revision ID: james.westby@ubuntu.com-20100309150753-fmxr8v2zh1vhyo0y
Tags: 0.16.4-1ubuntu1
Add 100-pixman-arm-simd-fix.patch: Fixes ARM SIMD support detection
failing at compile time when -mthumb is a toolchain default. 
(LP: #535183)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff --git a/configure.ac b/configure.ac
 
2
index 304a1df..eda315f 100644
 
3
--- a/configure.ac
 
4
+++ b/configure.ac
 
5
@@ -357,18 +357,28 @@ AM_CONDITIONAL(USE_VMX, test $have_vmx_intrinsics = yes)
 
6
 
 
7
 dnl ===========================================================================
 
8
 dnl Check for ARM SIMD instructions
 
9
-ARM_SIMD_CFLAGS="-mcpu=arm1136j-s"
 
10
+ARM_SIMD_CFLAGS=""
 
11
 
 
12
 have_arm_simd=no
 
13
 AC_MSG_CHECKING(whether to use ARM SIMD assembler)
 
14
-xserver_save_CFLAGS=$CFLAGS
 
15
-CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS"
 
16
+# check with default CFLAGS in case the toolchain turns on a sufficiently recent -mcpu=
 
17
 AC_COMPILE_IFELSE([
 
18
 int main () {
 
19
     asm("uqadd8 r1, r1, r2");
 
20
     return 0;
 
21
-}], have_arm_simd=yes)
 
22
-CFLAGS=$xserver_save_CFLAGS
 
23
+}], have_arm_simd=yes,
 
24
+    # check again with an explicit -mcpu= in case the toolchain defaults to an
 
25
+    # older one; note that uqadd8 isn't available in Thumb mode on arm1136j-s
 
26
+    # so we force ARM mode
 
27
+    ARM_SIMD_CFLAGS="-mcpu=arm1136j-s -marm"
 
28
+    xserver_save_CFLAGS=$CFLAGS
 
29
+    CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS"
 
30
+    AC_COMPILE_IFELSE([
 
31
+    int main () {
 
32
+        asm("uqadd8 r1, r1, r2");
 
33
+        return 0;
 
34
+    }], have_arm_simd=yes)
 
35
+    CFLAGS=$xserver_save_CFLAGS)
 
36
 
 
37
 AC_ARG_ENABLE(arm-simd,
 
38
    [AC_HELP_STRING([--disable-arm-simd],