1 # HG changeset patch |
|
2 # User Joop Boonen <joop.boonen@opensuse.org> |
|
3 # Parent 5f38d3aa0414fe0ac7ff1f0b47da44069e7ccdda |
|
4 Add configure option to allow disabling of neon. |
|
5 |
|
6 diff --git a/configure.in b/configure.in |
|
7 --- a/configure.in |
|
8 +++ b/configure.in |
|
9 @@ -1726,41 +1726,47 @@ if test -n "$all_flags"; then |
|
10 ASFLAGS="$ASFLAGS $all_flags" |
|
11 if test -n "$thumb_flag"; then |
|
12 LDFLAGS="$LDFLAGS $thumb_flag" |
|
13 fi |
|
14 fi |
|
15 |
|
16 AC_SUBST(MOZ_THUMB2) |
|
17 |
|
18 -if test "$CPU_ARCH" = "arm"; then |
|
19 - AC_MSG_CHECKING(for ARM SIMD support in compiler) |
|
20 - # We try to link so that this also fails when |
|
21 - # building with LTO. |
|
22 - AC_TRY_LINK([], |
|
23 +MOZ_ARG_DISABLE_BOOL(neon, |
|
24 +[ --disable-neon Disable neon extensions], |
|
25 + NS_DISABLE_NEON=1, |
|
26 + NS_DISABLE_NEON= ) |
|
27 +if test "$NS_DISABLE_NEON" != "1"; then |
|
28 + if test "$CPU_ARCH" = "arm"; then |
|
29 + AC_MSG_CHECKING(for ARM SIMD support in compiler) |
|
30 + # We try to link so that this also fails when |
|
31 + # building with LTO. |
|
32 + AC_TRY_LINK([], |
|
33 [asm("uqadd8 r1, r1, r2");], |
|
34 result="yes", result="no") |
|
35 - AC_MSG_RESULT("$result") |
|
36 - if test "$result" = "yes"; then |
|
37 + AC_MSG_RESULT("$result") |
|
38 + if test "$result" = "yes"; then |
|
39 AC_DEFINE(HAVE_ARM_SIMD) |
|
40 HAVE_ARM_SIMD=1 |
|
41 - fi |
|
42 - |
|
43 - AC_MSG_CHECKING(for ARM NEON support in compiler) |
|
44 - # We try to link so that this also fails when |
|
45 - # building with LTO. |
|
46 - AC_TRY_LINK([], |
|
47 + fi |
|
48 + |
|
49 + AC_MSG_CHECKING(for ARM NEON support in compiler) |
|
50 + # We try to link so that this also fails when |
|
51 + # building with LTO. |
|
52 + AC_TRY_LINK([], |
|
53 [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
|
54 result="yes", result="no") |
|
55 - AC_MSG_RESULT("$result") |
|
56 - if test "$result" = "yes"; then |
|
57 + AC_MSG_RESULT("$result") |
|
58 + if test "$result" = "yes"; then |
|
59 AC_DEFINE(HAVE_ARM_NEON) |
|
60 HAVE_ARM_NEON=1 |
|
61 - fi |
|
62 -fi # CPU_ARCH = arm |
|
63 + fi |
|
64 + fi # CPU_ARCH = arm |
|
65 +fi |
|
66 |
|
67 AC_SUBST(HAVE_ARM_SIMD) |
|
68 AC_SUBST(HAVE_ARM_NEON) |
|
69 |
|
70 dnl ================================================================= |
|
71 dnl Set up and test static assertion macros used to avoid AC_TRY_RUN, |
|
72 dnl which is bad when cross compiling. |
|
73 dnl ================================================================= |
|
74 diff --git a/js/src/configure.in b/js/src/configure.in |
|
75 --- a/js/src/configure.in |
|
76 +++ b/js/src/configure.in |
|
77 @@ -1664,41 +1664,47 @@ if test -n "$all_flags"; then |
|
78 ASFLAGS="$ASFLAGS $all_flags" |
|
79 if test -n "$thumb_flag"; then |
|
80 LDFLAGS="$LDFLAGS $thumb_flag" |
|
81 fi |
|
82 fi |
|
83 |
|
84 AC_SUBST(MOZ_THUMB2) |
|
85 |
|
86 -if test "$CPU_ARCH" = "arm"; then |
|
87 - AC_MSG_CHECKING(for ARM SIMD support in compiler) |
|
88 - # We try to link so that this also fails when |
|
89 - # building with LTO. |
|
90 - AC_TRY_LINK([], |
|
91 +MOZ_ARG_DISABLE_BOOL(neon, |
|
92 +[ --disable-neon Disable neon extensions], |
|
93 + NS_DISABLE_NEON=1, |
|
94 + NS_DISABLE_NEON= ) |
|
95 +if test "$NS_DISABLE_NEON" != "1"; then |
|
96 + if test "$CPU_ARCH" = "arm"; then |
|
97 + AC_MSG_CHECKING(for ARM SIMD support in compiler) |
|
98 + # We try to link so that this also fails when |
|
99 + # building with LTO. |
|
100 + AC_TRY_LINK([], |
|
101 [asm("uqadd8 r1, r1, r2");], |
|
102 result="yes", result="no") |
|
103 - AC_MSG_RESULT("$result") |
|
104 - if test "$result" = "yes"; then |
|
105 + AC_MSG_RESULT("$result") |
|
106 + if test "$result" = "yes"; then |
|
107 AC_DEFINE(HAVE_ARM_SIMD) |
|
108 HAVE_ARM_SIMD=1 |
|
109 - fi |
|
110 - |
|
111 - AC_MSG_CHECKING(for ARM NEON support in compiler) |
|
112 - # We try to link so that this also fails when |
|
113 - # building with LTO. |
|
114 - AC_TRY_LINK([], |
|
115 + fi |
|
116 + |
|
117 + AC_MSG_CHECKING(for ARM NEON support in compiler) |
|
118 + # We try to link so that this also fails when |
|
119 + # building with LTO. |
|
120 + AC_TRY_LINK([], |
|
121 [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
|
122 result="yes", result="no") |
|
123 - AC_MSG_RESULT("$result") |
|
124 - if test "$result" = "yes"; then |
|
125 + AC_MSG_RESULT("$result") |
|
126 + if test "$result" = "yes"; then |
|
127 AC_DEFINE(HAVE_ARM_NEON) |
|
128 HAVE_ARM_NEON=1 |
|
129 - fi |
|
130 -fi # CPU_ARCH = arm |
|
131 + fi |
|
132 + fi # CPU_ARCH = arm |
|
133 +fi |
|
134 |
|
135 AC_SUBST(HAVE_ARM_SIMD) |
|
136 AC_SUBST(HAVE_ARM_NEON) |
|
137 |
|
138 dnl ================================================================= |
|
139 dnl Set up and test static assertion macros used to avoid AC_TRY_RUN, |
|
140 dnl which is bad when cross compiling. |
|
141 dnl ================================================================= |
|