18 -if test "$CPU_ARCH" = "arm"; then |
18 -if test "$CPU_ARCH" = "arm"; then |
19 - AC_MSG_CHECKING(for ARM SIMD support in compiler) |
19 - AC_MSG_CHECKING(for ARM SIMD support in compiler) |
20 - # We try to link so that this also fails when |
20 - # We try to link so that this also fails when |
21 - # building with LTO. |
21 - # building with LTO. |
22 - AC_TRY_LINK([], |
22 - AC_TRY_LINK([], |
23 - [asm("uqadd8 r1, r1, r2");], |
|
24 - result="yes", result="no") |
|
25 - AC_MSG_RESULT("$result") |
|
26 - if test "$result" = "yes"; then |
|
27 - AC_DEFINE(HAVE_ARM_SIMD) |
|
28 - HAVE_ARM_SIMD=1 |
|
29 - fi |
|
30 - |
|
31 - AC_MSG_CHECKING(for ARM NEON support in compiler) |
|
32 - # We try to link so that this also fails when |
|
33 - # building with LTO. |
|
34 - AC_TRY_LINK([], |
|
35 - [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
|
36 - result="yes", result="no") |
|
37 - AC_MSG_RESULT("$result") |
|
38 - if test "$result" = "yes"; then |
|
39 - AC_DEFINE(HAVE_ARM_NEON) |
|
40 - HAVE_ARM_NEON=1 |
|
41 - fi |
|
42 -fi # CPU_ARCH = arm |
|
43 +MOZ_ARG_DISABLE_BOOL(neon, |
23 +MOZ_ARG_DISABLE_BOOL(neon, |
44 +[ --disable-neon Disable neon extensions], |
24 +[ --disable-neon Disable neon extensions], |
45 + NS_DISABLE_NEON=1, |
25 + NS_DISABLE_NEON=1, |
46 + NS_DISABLE_NEON= ) |
26 + NS_DISABLE_NEON= ) |
47 +if test "$NS_DISABLE_NEON" != "1"; then |
27 +if test "$NS_DISABLE_NEON" != "1"; then |
48 + if test "$CPU_ARCH" = "arm"; then |
28 + if test "$CPU_ARCH" = "arm"; then |
49 + AC_MSG_CHECKING(for ARM SIMD support in compiler) |
29 + AC_MSG_CHECKING(for ARM SIMD support in compiler) |
50 + # We try to link so that this also fails when |
30 + # We try to link so that this also fails when |
51 + # building with LTO. |
31 + # building with LTO. |
52 + AC_TRY_LINK([], |
32 + AC_TRY_LINK([], |
53 + [asm("uqadd8 r1, r1, r2");], |
33 [asm("uqadd8 r1, r1, r2");], |
54 + result="yes", result="no") |
34 result="yes", result="no") |
|
35 - AC_MSG_RESULT("$result") |
|
36 - if test "$result" = "yes"; then |
55 + AC_MSG_RESULT("$result") |
37 + AC_MSG_RESULT("$result") |
56 + if test "$result" = "yes"; then |
38 + if test "$result" = "yes"; then |
57 + AC_DEFINE(HAVE_ARM_SIMD) |
39 AC_DEFINE(HAVE_ARM_SIMD) |
58 + HAVE_ARM_SIMD=1 |
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([], |
59 + fi |
47 + fi |
60 + |
48 + |
61 + AC_MSG_CHECKING(for ARM NEON support in compiler) |
49 + AC_MSG_CHECKING(for ARM NEON support in compiler) |
62 + # We try to link so that this also fails when |
50 + # We try to link so that this also fails when |
63 + # building with LTO. |
51 + # building with LTO. |
64 + AC_TRY_LINK([], |
52 + AC_TRY_LINK([], |
65 + [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
53 [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
66 + result="yes", result="no") |
54 result="yes", result="no") |
|
55 - AC_MSG_RESULT("$result") |
|
56 - if test "$result" = "yes"; then |
67 + AC_MSG_RESULT("$result") |
57 + AC_MSG_RESULT("$result") |
68 + if test "$result" = "yes"; then |
58 + if test "$result" = "yes"; then |
69 + AC_DEFINE(HAVE_ARM_NEON) |
59 AC_DEFINE(HAVE_ARM_NEON) |
70 + HAVE_ARM_NEON=1 |
60 HAVE_ARM_NEON=1 |
|
61 - fi |
|
62 -fi # CPU_ARCH = arm |
71 + fi |
63 + fi |
72 + fi # CPU_ARCH = arm |
64 + fi # CPU_ARCH = arm |
73 +fi |
65 +fi |
74 |
66 |
75 AC_SUBST(HAVE_ARM_SIMD) |
67 AC_SUBST(HAVE_ARM_SIMD) |
76 AC_SUBST(HAVE_ARM_NEON) |
68 AC_SUBST(HAVE_ARM_NEON) |
77 |
69 |
78 dnl ======================================================== |
70 dnl ================================================================= |
79 dnl Android libstdc++, placed here so it can use MOZ_ARCH |
71 dnl Set up and test static assertion macros used to avoid AC_TRY_RUN, |
80 dnl computed above. |
72 dnl which is bad when cross compiling. |
81 dnl ======================================================== |
73 dnl ================================================================= |
82 diff --git a/js/src/configure.in b/js/src/configure.in |
74 diff --git a/js/src/configure.in b/js/src/configure.in |
83 --- a/js/src/configure.in |
75 --- a/js/src/configure.in |
84 +++ b/js/src/configure.in |
76 +++ b/js/src/configure.in |
85 @@ -1604,41 +1604,47 @@ if test -n "$all_flags"; then |
77 @@ -1664,41 +1664,47 @@ if test -n "$all_flags"; then |
86 ASFLAGS="$ASFLAGS $all_flags" |
78 ASFLAGS="$ASFLAGS $all_flags" |
87 if test -n "$thumb_flag"; then |
79 if test -n "$thumb_flag"; then |
88 LDFLAGS="$LDFLAGS $thumb_flag" |
80 LDFLAGS="$LDFLAGS $thumb_flag" |
89 fi |
81 fi |
90 fi |
82 fi |
94 -if test "$CPU_ARCH" = "arm"; then |
86 -if test "$CPU_ARCH" = "arm"; then |
95 - AC_MSG_CHECKING(for ARM SIMD support in compiler) |
87 - AC_MSG_CHECKING(for ARM SIMD support in compiler) |
96 - # We try to link so that this also fails when |
88 - # We try to link so that this also fails when |
97 - # building with LTO. |
89 - # building with LTO. |
98 - AC_TRY_LINK([], |
90 - AC_TRY_LINK([], |
99 - [asm("uqadd8 r1, r1, r2");], |
|
100 - result="yes", result="no") |
|
101 - AC_MSG_RESULT("$result") |
|
102 - if test "$result" = "yes"; then |
|
103 - AC_DEFINE(HAVE_ARM_SIMD) |
|
104 - HAVE_ARM_SIMD=1 |
|
105 - fi |
|
106 - |
|
107 - AC_MSG_CHECKING(for ARM NEON support in compiler) |
|
108 - # We try to link so that this also fails when |
|
109 - # building with LTO. |
|
110 - AC_TRY_LINK([], |
|
111 - [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
|
112 - result="yes", result="no") |
|
113 - AC_MSG_RESULT("$result") |
|
114 - if test "$result" = "yes"; then |
|
115 - AC_DEFINE(HAVE_ARM_NEON) |
|
116 - HAVE_ARM_NEON=1 |
|
117 - fi |
|
118 -fi # CPU_ARCH = arm |
|
119 +MOZ_ARG_DISABLE_BOOL(neon, |
91 +MOZ_ARG_DISABLE_BOOL(neon, |
120 +[ --disable-neon Disable neon extensions], |
92 +[ --disable-neon Disable neon extensions], |
121 + NS_DISABLE_NEON=1, |
93 + NS_DISABLE_NEON=1, |
122 + NS_DISABLE_NEON= ) |
94 + NS_DISABLE_NEON= ) |
123 +if test "$NS_DISABLE_NEON" != "1"; then |
95 +if test "$NS_DISABLE_NEON" != "1"; then |
124 + if test "$CPU_ARCH" = "arm"; then |
96 + if test "$CPU_ARCH" = "arm"; then |
125 + AC_MSG_CHECKING(for ARM SIMD support in compiler) |
97 + AC_MSG_CHECKING(for ARM SIMD support in compiler) |
126 + # We try to link so that this also fails when |
98 + # We try to link so that this also fails when |
127 + # building with LTO. |
99 + # building with LTO. |
128 + AC_TRY_LINK([], |
100 + AC_TRY_LINK([], |
129 + [asm("uqadd8 r1, r1, r2");], |
101 [asm("uqadd8 r1, r1, r2");], |
130 + result="yes", result="no") |
102 result="yes", result="no") |
|
103 - AC_MSG_RESULT("$result") |
|
104 - if test "$result" = "yes"; then |
131 + AC_MSG_RESULT("$result") |
105 + AC_MSG_RESULT("$result") |
132 + if test "$result" = "yes"; then |
106 + if test "$result" = "yes"; then |
133 + AC_DEFINE(HAVE_ARM_SIMD) |
107 AC_DEFINE(HAVE_ARM_SIMD) |
134 + HAVE_ARM_SIMD=1 |
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([], |
135 + fi |
115 + fi |
136 + |
116 + |
137 + AC_MSG_CHECKING(for ARM NEON support in compiler) |
117 + AC_MSG_CHECKING(for ARM NEON support in compiler) |
138 + # We try to link so that this also fails when |
118 + # We try to link so that this also fails when |
139 + # building with LTO. |
119 + # building with LTO. |
140 + AC_TRY_LINK([], |
120 + AC_TRY_LINK([], |
141 + [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
121 [asm(".fpu neon\n vadd.i8 d0, d0, d0");], |
142 + result="yes", result="no") |
122 result="yes", result="no") |
|
123 - AC_MSG_RESULT("$result") |
|
124 - if test "$result" = "yes"; then |
143 + AC_MSG_RESULT("$result") |
125 + AC_MSG_RESULT("$result") |
144 + if test "$result" = "yes"; then |
126 + if test "$result" = "yes"; then |
145 + AC_DEFINE(HAVE_ARM_NEON) |
127 AC_DEFINE(HAVE_ARM_NEON) |
146 + HAVE_ARM_NEON=1 |
128 HAVE_ARM_NEON=1 |
|
129 - fi |
|
130 -fi # CPU_ARCH = arm |
147 + fi |
131 + fi |
148 + fi # CPU_ARCH = arm |
132 + fi # CPU_ARCH = arm |
149 +fi |
133 +fi |
150 |
134 |
151 AC_SUBST(HAVE_ARM_SIMD) |
135 AC_SUBST(HAVE_ARM_SIMD) |
152 AC_SUBST(HAVE_ARM_NEON) |
136 AC_SUBST(HAVE_ARM_NEON) |
153 |
137 |
154 dnl ======================================================== |
138 dnl ================================================================= |
155 dnl Android libstdc++, placed here so it can use MOZ_ARCH |
139 dnl Set up and test static assertion macros used to avoid AC_TRY_RUN, |
156 dnl computed above. |
140 dnl which is bad when cross compiling. |
157 dnl ======================================================== |
141 dnl ================================================================= |