1 |
commit: 03ca1a66484c7b13c55d43c40fbee116d030087a |
2 |
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 02:00:55 2017 +0000 |
4 |
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 02:01:23 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03ca1a66 |
7 |
|
8 |
dev-lang/spidermonkey: add release for v45 |
9 |
|
10 |
Package-Manager: portage-2.3.3 |
11 |
|
12 |
dev-lang/spidermonkey/Manifest | 1 + |
13 |
.../files/ff45/7000_drop-Wl-build-id_v4.patch | 17 ++ |
14 |
.../files/ff45/7003_freebsd_jscpucfg.patch | 22 ++ |
15 |
.../files/ff45/8001_hppa_js_configure.patch | 21 ++ |
16 |
.../ff45/8007_nonejit_ppc64_fix_bug1253216.patch | 46 ++++ |
17 |
.../8008_nonejit_x86_fix_based_on_bug1253216.patch | 11 + |
18 |
.../spidermonkey/files/ff45/8014_ia64_js.patch | 248 +++++++++++++++++++++ |
19 |
dev-lang/spidermonkey/files/mozjs45-1266366.patch | 29 +++ |
20 |
dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild | 145 ++++++++++++ |
21 |
9 files changed, 540 insertions(+) |
22 |
|
23 |
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest |
24 |
index d6a76976d6..e6125e93b1 100644 |
25 |
--- a/dev-lang/spidermonkey/Manifest |
26 |
+++ b/dev-lang/spidermonkey/Manifest |
27 |
@@ -2,4 +2,5 @@ DIST js-1.7.0.tar.gz 1165607 SHA256 44363f0f3895800ee6010763eae90c0d15ed28e07d78 |
28 |
DIST js185-1.0.0.tar.gz 6164605 SHA256 5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687 SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718 WHIRLPOOL 58b372713275874d3ae3c6b58c12c56bf8d17d024d591e321538bcdd8e615332e41655954368ce86b90e970209e3fd650c39d931000880f5ec22cb044b5d7a4e |
29 |
DIST mozjs-24.2.0.tar.bz2 15624530 SHA256 e62f3f331ddd90df1e238c09d61a505c516fe9fd8c5c95336611d191d18437d8 SHA512 49805e256f6fa797505c01b7596d5bb941ed7a2454862c52ed42ad48b5ae4540b777e77ed8da1b98c89f8622ed2c76052187983687008a4ff53594addb328df4 WHIRLPOOL ea74d19c79b1a0fe407e2803900c49c23e8b76444fb4e20995072c3c59427e8df1895df04f2f4de779a1c58cd1166dd97aeaf7564350832011efe89dbcf9583e |
30 |
DIST mozjs-38.2.1.rc0.tar.bz2 25012381 SHA256 01994c758174bc173bcf4960f05ecb4da21014f09641a63b2952bbf9eeaa8b5c SHA512 60262c7619cc418569aec81775a671105acbc5bf372273828868f2fbbbc4ea33f78380f7455710816bfcdae828fb4115a08234d599cb30d0db859fcba17f019d WHIRLPOOL b1661859dc41a61317a48a8ee34cab53a369f37067c6565db2c890c596411e51981e0e64f81c5f5bd2bc2ff943493d972b00a5984b99de6e07ce16c07f784cb7 |
31 |
+DIST mozjs-45.0.2.tar.bz2 97508152 SHA256 570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee SHA512 84a3cf12e2603e00bcfe518a1a5000f53b21758c1c6b32a0410e63ab7db8d4452028195b0ba3e56144054b06e90f8e5195b4db94dba711f7c75d11da99c6c61d WHIRLPOOL dba2f7d4778f47f6476c3dd2e658a5b39ff9e571d4e71fe2508d58910a0989c24f892cbc7cc64aa7c94692cf947eb1a545fd0752bb5d8aace12c2dc96404c114 |
32 |
DIST mozjs17.0.0.tar.gz 6778934 SHA256 321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba SHA512 39b68aeb9f712f146778d8b68ee795709a1372c8ab893a222af4eb34882427d6f5cf877e743d6cb2f1b4348c194d8f3774f00cb775b03515b34b49560b748be4 WHIRLPOOL 4df7b51577787194065162b09d2c3dda849c13fa901305f9925d4ca5d38bb7f8e2daa943099e003fb9d11f9264ae2d77ccf04e5eea11e3ddcb624b504b99d52f |
33 |
|
34 |
diff --git a/dev-lang/spidermonkey/files/ff45/7000_drop-Wl-build-id_v4.patch b/dev-lang/spidermonkey/files/ff45/7000_drop-Wl-build-id_v4.patch |
35 |
new file mode 100644 |
36 |
index 0000000000..8a1e1dd998 |
37 |
--- /dev/null |
38 |
+++ b/dev-lang/spidermonkey/files/ff45/7000_drop-Wl-build-id_v4.patch |
39 |
@@ -0,0 +1,17 @@ |
40 |
+--- a/js/src/configure.in 2014-06-05 21:15:27.000000000 -0400 |
41 |
++++ b/js/src/configure.in 2014-06-13 11:01:51.130703283 -0400 |
42 |
+@@ -1156,14 +1156,6 @@ |
43 |
+ AC_MSG_RESULT([no]) |
44 |
+ LDFLAGS=$_SAVE_LDFLAGS) |
45 |
+ |
46 |
+- AC_MSG_CHECKING([for --build-id option to ld]) |
47 |
+- _SAVE_LDFLAGS=$LDFLAGS |
48 |
+- LDFLAGS="$LDFLAGS -Wl,--build-id" |
49 |
+- AC_TRY_LINK(,,AC_MSG_RESULT([yes]) |
50 |
+- [NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id"], |
51 |
+- AC_MSG_RESULT([no]) |
52 |
+- LDFLAGS=$_SAVE_LDFLAGS) |
53 |
+- |
54 |
+ # Turn on gcc/clang warnings: |
55 |
+ # https://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Warning-Options.html |
56 |
+ # |
57 |
|
58 |
diff --git a/dev-lang/spidermonkey/files/ff45/7003_freebsd_jscpucfg.patch b/dev-lang/spidermonkey/files/ff45/7003_freebsd_jscpucfg.patch |
59 |
new file mode 100644 |
60 |
index 0000000000..467bf44414 |
61 |
--- /dev/null |
62 |
+++ b/dev-lang/spidermonkey/files/ff45/7003_freebsd_jscpucfg.patch |
63 |
@@ -0,0 +1,22 @@ |
64 |
+--- a/js/src/jscpucfg.h 2012-01-18 17:38:54.409461514 +0100 |
65 |
++++ b/js/src/jscpucfg.h 2012-01-18 17:38:59.522462164 +0100 |
66 |
+@@ -77,6 +77,19 @@ |
67 |
+ #define IS_BIG_ENDIAN 1 |
68 |
+ #endif |
69 |
+ |
70 |
++#elif defined(__FreeBSD__) |
71 |
++#include <sys/endian.h> |
72 |
++ |
73 |
++#if defined(BYTE_ORDER) |
74 |
++#if BYTE_ORDER == LITTLE_ENDIAN |
75 |
++#define IS_LITTLE_ENDIAN 1 |
76 |
++#undef IS_BIG_ENDIAN |
77 |
++#elif BYTE_ORDER == BIG_ENDIAN |
78 |
++#undef IS_LITTLE_ENDIAN |
79 |
++#define IS_BIG_ENDIAN 1 |
80 |
++#endif |
81 |
++#endif |
82 |
++ |
83 |
+ #elif defined(JS_HAVE_ENDIAN_H) |
84 |
+ #include <endian.h> |
85 |
+ |
86 |
|
87 |
diff --git a/dev-lang/spidermonkey/files/ff45/8001_hppa_js_configure.patch b/dev-lang/spidermonkey/files/ff45/8001_hppa_js_configure.patch |
88 |
new file mode 100644 |
89 |
index 0000000000..a33ab3cd61 |
90 |
--- /dev/null |
91 |
+++ b/dev-lang/spidermonkey/files/ff45/8001_hppa_js_configure.patch |
92 |
@@ -0,0 +1,21 @@ |
93 |
+--- a/js/src/configure.in |
94 |
++++ b/js/src/configure.in |
95 |
+@@ -958,7 +958,7 @@ |
96 |
+ CPU_ARCH=s390x |
97 |
+ ;; |
98 |
+ |
99 |
+-hppa* | parisc) |
100 |
++hppa* | parisc*) |
101 |
+ CPU_ARCH=hppa |
102 |
+ ;; |
103 |
+ |
104 |
+@@ -2009,6 +2009,9 @@ |
105 |
+ AC_DEFINE(JS_CPU_MIPS) |
106 |
+ AC_DEFINE(JS_NUNBOX32) |
107 |
+ ;; |
108 |
++hppa*) |
109 |
++ AC_DEFINE(JS_NUNBOX32) |
110 |
++ ;; |
111 |
+ esac |
112 |
+ |
113 |
+ MOZ_ARG_DISABLE_BOOL(ion, |
114 |
|
115 |
diff --git a/dev-lang/spidermonkey/files/ff45/8007_nonejit_ppc64_fix_bug1253216.patch b/dev-lang/spidermonkey/files/ff45/8007_nonejit_ppc64_fix_bug1253216.patch |
116 |
new file mode 100644 |
117 |
index 0000000000..26e9373ddd |
118 |
--- /dev/null |
119 |
+++ b/dev-lang/spidermonkey/files/ff45/8007_nonejit_ppc64_fix_bug1253216.patch |
120 |
@@ -0,0 +1,46 @@ |
121 |
+ |
122 |
+# HG changeset patch |
123 |
+# User Lars T Hansen <lhansen@×××××××.com> |
124 |
+# Date 1457091735 -3600 |
125 |
+# Node ID 69f237c2cf9131e97372debee01931dbacd064e5 |
126 |
+# Parent 3aa4483740828617001060fe7386051020521e90 |
127 |
+Bug 1253216 - clean up the atomic ops ifdef nest. r=jorendorff |
128 |
+ |
129 |
+diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h |
130 |
+--- a/js/src/jit/AtomicOperations.h |
131 |
++++ b/js/src/jit/AtomicOperations.h |
132 |
+@@ -318,21 +318,29 @@ AtomicOperations::isLockfree(int32_t siz |
133 |
+ } // namespace js |
134 |
+ |
135 |
+ #if defined(JS_CODEGEN_ARM) |
136 |
+ # include "jit/arm/AtomicOperations-arm.h" |
137 |
+ #elif defined(JS_CODEGEN_ARM64) |
138 |
+ # include "jit/arm64/AtomicOperations-arm64.h" |
139 |
+ #elif defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64) |
140 |
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h" |
141 |
+-#elif defined(__ppc64__) || defined(__PPC64_) \ |
142 |
+- || defined(__ppc64le__) || defined(__PPC64LE__) \ |
143 |
+- || defined(__ppc__) || defined(__PPC__) |
144 |
++#elif defined(__ppc__) || defined(__PPC__) |
145 |
+ # include "jit/none/AtomicOperations-ppc.h" |
146 |
+ #elif defined(JS_CODEGEN_NONE) |
147 |
+-# include "jit/none/AtomicOperations-none.h" |
148 |
++ // You can disable the JIT with --disable-ion but you must still |
149 |
++ // provide the atomic operations that will be used by the JS engine. |
150 |
++ // When the JIT is disabled the operations are simply safe-for-races |
151 |
++ // C++ realizations of atomics. These operations cannot be written |
152 |
++ // in portable C++, hence the default here is to crash. See the |
153 |
++ // top of the file for more guidance. |
154 |
++# if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__) |
155 |
++# include "jit/none/AtomicOperations-ppc.h" |
156 |
++# else |
157 |
++# include "jit/none/AtomicOperations-none.h" // These MOZ_CRASH() always |
158 |
++# endif |
159 |
+ #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) |
160 |
+ # include "jit/x86-shared/AtomicOperations-x86-shared.h" |
161 |
+ #else |
162 |
+ # error "Atomic operations must be defined for this platform" |
163 |
+ #endif |
164 |
+ |
165 |
+ #endif // jit_AtomicOperations_h |
166 |
+ |
167 |
|
168 |
diff --git a/dev-lang/spidermonkey/files/ff45/8008_nonejit_x86_fix_based_on_bug1253216.patch b/dev-lang/spidermonkey/files/ff45/8008_nonejit_x86_fix_based_on_bug1253216.patch |
169 |
new file mode 100644 |
170 |
index 0000000000..86b2713020 |
171 |
--- /dev/null |
172 |
+++ b/dev-lang/spidermonkey/files/ff45/8008_nonejit_x86_fix_based_on_bug1253216.patch |
173 |
@@ -0,0 +1,11 @@ |
174 |
+--- a/js/src/jit/AtomicOperations.h 2016-03-12 13:42:27.914524205 -0500 |
175 |
++++ b/js/src/jit/AtomicOperations.h 2016-03-12 13:42:15.644573630 -0500 |
176 |
+@@ -311,6 +311,8 @@ |
177 |
+ // top of the file for more guidance. |
178 |
+ # if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__) |
179 |
+ # include "jit/none/AtomicOperations-ppc.h" |
180 |
++# elif defined(__i386__) || defined(__x86_64__) |
181 |
++# include "jit/x86-shared/AtomicOperations-x86-shared.h" |
182 |
+ # else |
183 |
+ # include "jit/none/AtomicOperations-none.h" // These MOZ_CRASH() always |
184 |
+ # endif |
185 |
|
186 |
diff --git a/dev-lang/spidermonkey/files/ff45/8014_ia64_js.patch b/dev-lang/spidermonkey/files/ff45/8014_ia64_js.patch |
187 |
new file mode 100644 |
188 |
index 0000000000..73075919a8 |
189 |
--- /dev/null |
190 |
+++ b/dev-lang/spidermonkey/files/ff45/8014_ia64_js.patch |
191 |
@@ -0,0 +1,248 @@ |
192 |
+--- a/js/src/jit/AtomicOperations.h 2016-11-08 21:27:30.000000000 +0100 |
193 |
++++ b/js/src/jit/AtomicOperations.h 2016-11-08 22:17:59.280251831 +0100 |
194 |
+@@ -311,6 +311,8 @@ |
195 |
+ // top of the file for more guidance. |
196 |
+ # if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__) |
197 |
+ # include "jit/none/AtomicOperations-ppc.h" |
198 |
++# elif defined(__ia64__) |
199 |
++# include "jit/none/AtomicOperations-ia64.h" |
200 |
+ # elif defined(__i386__) || defined(__x86_64__) |
201 |
+ # include "jit/x86-shared/AtomicOperations-x86-shared.h" |
202 |
+ # else |
203 |
+--- /dev/null |
204 |
++++ b/js/src/jit/none/AtomicOperations-ia64.h 2016-11-08 22:09:41.378809457 +0100 |
205 |
+@@ -0,0 +1,234 @@ |
206 |
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
207 |
++ * vim: set ts=8 sts=4 et sw=4 tw=99: |
208 |
++ * This Source Code Form is subject to the terms of the Mozilla Public |
209 |
++ * License, v. 2.0. If a copy of the MPL was not distributed with this |
210 |
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
211 |
++ |
212 |
++/* For documentation, see jit/AtomicOperations.h */ |
213 |
++ |
214 |
++#ifndef jit_ia64_AtomicOperations_ia64_h |
215 |
++#define jit_ia64_AtomicOperations_ia64_h |
216 |
++ |
217 |
++#include "mozilla/Assertions.h" |
218 |
++#include "mozilla/Types.h" |
219 |
++ |
220 |
++#if defined(__GNUC__) |
221 |
++ |
222 |
++// The default implementation tactic for gcc is to use the newer |
223 |
++// __atomic intrinsics added for use in C++11 <atomic>. Where that |
224 |
++// isn't available, we use GCC's older __sync functions instead. |
225 |
++// |
226 |
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward |
227 |
++// compatible option for older compilers: enable this to use GCC's old |
228 |
++// __sync functions instead of the newer __atomic functions. This |
229 |
++// will be required for GCC 4.6.x and earlier, should we need to use |
230 |
++// those versions. |
231 |
++ |
232 |
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
233 |
++ |
234 |
++inline bool |
235 |
++js::jit::AtomicOperations::isLockfree8() |
236 |
++{ |
237 |
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
238 |
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0)); |
239 |
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0)); |
240 |
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0)); |
241 |
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0)); |
242 |
++ return true; |
243 |
++# else |
244 |
++ return false; |
245 |
++# endif |
246 |
++} |
247 |
++ |
248 |
++inline void |
249 |
++js::jit::AtomicOperations::fenceSeqCst() |
250 |
++{ |
251 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
252 |
++ __sync_synchronize(); |
253 |
++# else |
254 |
++ __atomic_thread_fence(__ATOMIC_SEQ_CST); |
255 |
++# endif |
256 |
++} |
257 |
++ |
258 |
++template<typename T> |
259 |
++inline T |
260 |
++js::jit::AtomicOperations::loadSeqCst(T* addr) |
261 |
++{ |
262 |
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); |
263 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
264 |
++ __sync_synchronize(); |
265 |
++ T v = *addr; |
266 |
++ __sync_synchronize(); |
267 |
++# else |
268 |
++ T v; |
269 |
++ __atomic_load(addr, &v, __ATOMIC_SEQ_CST); |
270 |
++# endif |
271 |
++ return v; |
272 |
++} |
273 |
++ |
274 |
++template<typename T> |
275 |
++inline void |
276 |
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val) |
277 |
++{ |
278 |
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); |
279 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
280 |
++ __sync_synchronize(); |
281 |
++ *addr = val; |
282 |
++ __sync_synchronize(); |
283 |
++# else |
284 |
++ __atomic_store(addr, &val, __ATOMIC_SEQ_CST); |
285 |
++# endif |
286 |
++} |
287 |
++ |
288 |
++template<typename T> |
289 |
++inline T |
290 |
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval) |
291 |
++{ |
292 |
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); |
293 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
294 |
++ return __sync_val_compare_and_swap(addr, oldval, newval); |
295 |
++# else |
296 |
++ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); |
297 |
++ return oldval; |
298 |
++# endif |
299 |
++} |
300 |
++ |
301 |
++template<typename T> |
302 |
++inline T |
303 |
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val) |
304 |
++{ |
305 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
306 |
++ return __sync_fetch_and_add(addr, val); |
307 |
++# else |
308 |
++ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST); |
309 |
++# endif |
310 |
++} |
311 |
++ |
312 |
++template<typename T> |
313 |
++inline T |
314 |
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val) |
315 |
++{ |
316 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
317 |
++ return __sync_fetch_and_sub(addr, val); |
318 |
++# else |
319 |
++ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST); |
320 |
++# endif |
321 |
++} |
322 |
++ |
323 |
++template<typename T> |
324 |
++inline T |
325 |
++js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val) |
326 |
++{ |
327 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
328 |
++ return __sync_fetch_and_and(addr, val); |
329 |
++# else |
330 |
++ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST); |
331 |
++# endif |
332 |
++} |
333 |
++ |
334 |
++template<typename T> |
335 |
++inline T |
336 |
++js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val) |
337 |
++{ |
338 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
339 |
++ return __sync_fetch_and_or(addr, val); |
340 |
++# else |
341 |
++ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST); |
342 |
++# endif |
343 |
++} |
344 |
++ |
345 |
++template<typename T> |
346 |
++inline T |
347 |
++js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val) |
348 |
++{ |
349 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
350 |
++ return __sync_fetch_and_xor(addr, val); |
351 |
++# else |
352 |
++ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST); |
353 |
++# endif |
354 |
++} |
355 |
++ |
356 |
++template<typename T> |
357 |
++inline T |
358 |
++js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val) |
359 |
++{ |
360 |
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8()); |
361 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
362 |
++ T v; |
363 |
++ __sync_synchronize(); |
364 |
++ do { |
365 |
++ v = *addr; |
366 |
++ } while (__sync_val_compare_and_swap(addr, v, val) != v); |
367 |
++ return v; |
368 |
++# else |
369 |
++ T v; |
370 |
++ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST); |
371 |
++ return v; |
372 |
++# endif |
373 |
++} |
374 |
++ |
375 |
++template<typename T> |
376 |
++inline T |
377 |
++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) |
378 |
++{ |
379 |
++ return *addr; // FIXME (1208663): not yet safe |
380 |
++} |
381 |
++ |
382 |
++template<typename T> |
383 |
++inline void |
384 |
++js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val) |
385 |
++{ |
386 |
++ *addr = val; // FIXME (1208663): not yet safe |
387 |
++} |
388 |
++ |
389 |
++inline void |
390 |
++js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes) |
391 |
++{ |
392 |
++ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe |
393 |
++} |
394 |
++ |
395 |
++inline void |
396 |
++js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes) |
397 |
++{ |
398 |
++ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe |
399 |
++} |
400 |
++ |
401 |
++template<size_t nbytes> |
402 |
++inline void |
403 |
++js::jit::RegionLock::acquire(void* addr) |
404 |
++{ |
405 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
406 |
++ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1)) |
407 |
++ ; |
408 |
++# else |
409 |
++ uint32_t zero = 0; |
410 |
++ uint32_t one = 1; |
411 |
++ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) { |
412 |
++ zero = 0; |
413 |
++ continue; |
414 |
++ } |
415 |
++# endif |
416 |
++} |
417 |
++ |
418 |
++template<size_t nbytes> |
419 |
++inline void |
420 |
++js::jit::RegionLock::release(void* addr) |
421 |
++{ |
422 |
++ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock"); |
423 |
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
424 |
++ __sync_sub_and_fetch(&spinlock, 1); |
425 |
++# else |
426 |
++ uint32_t zero = 0; |
427 |
++ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST); |
428 |
++# endif |
429 |
++} |
430 |
++ |
431 |
++# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS |
432 |
++ |
433 |
++#elif defined(ENABLE_SHARED_ARRAY_BUFFER) |
434 |
++ |
435 |
++# error "Either disable JS shared memory, use GCC, or add code here" |
436 |
++ |
437 |
++#endif |
438 |
++ |
439 |
++#endif // jit_ia64_AtomicOperations_ia64_h |
440 |
|
441 |
diff --git a/dev-lang/spidermonkey/files/mozjs45-1266366.patch b/dev-lang/spidermonkey/files/mozjs45-1266366.patch |
442 |
new file mode 100644 |
443 |
index 0000000000..590f745d14 |
444 |
--- /dev/null |
445 |
+++ b/dev-lang/spidermonkey/files/mozjs45-1266366.patch |
446 |
@@ -0,0 +1,29 @@ |
447 |
+# HG changeset patch |
448 |
+# User Nicolas B. Pierron <nicolas.b.pierron@×××××××.com> |
449 |
+ |
450 |
+Bug 1266366 - Add branch64 functions to the none-backend MacroAssembler. r= |
451 |
+ |
452 |
+diff --git a/js/src/jit/none/MacroAssembler-none.h b/js/src/jit/none/MacroAssembler-none.h |
453 |
+index 512ae81..4441d8d 100644 |
454 |
+--- a/js/src/jit/none/MacroAssembler-none.h |
455 |
++++ b/js/src/jit/none/MacroAssembler-none.h |
456 |
+@@ -254,16 +254,18 @@ class MacroAssemblerNone : public Assembler |
457 |
+ template <typename T, typename S> void branchSub32(Condition, T, S, Label*) { MOZ_CRASH(); } |
458 |
+ template <typename T, typename S> void branchPtr(Condition, T, S, Label*) { MOZ_CRASH(); } |
459 |
+ template <typename T, typename S> void branchTestPtr(Condition, T, S, Label*) { MOZ_CRASH(); } |
460 |
+ template <typename T, typename S> void branchDouble(DoubleCondition, T, S, Label*) { MOZ_CRASH(); } |
461 |
+ template <typename T, typename S> void branchFloat(DoubleCondition, T, S, Label*) { MOZ_CRASH(); } |
462 |
+ template <typename T, typename S> void branchPrivatePtr(Condition, T, S, Label*) { MOZ_CRASH(); } |
463 |
+ template <typename T, typename S> void decBranchPtr(Condition, T, S, Label*) { MOZ_CRASH(); } |
464 |
+ template <typename T, typename S> void branchTest64(Condition, T, T, S, Label*) { MOZ_CRASH(); } |
465 |
++ template <typename T, typename S> void branch64(Condition, T, S, Label*) { MOZ_CRASH(); } |
466 |
++ template <typename T, typename S> void branch64(Condition, T, T, S, Label*) { MOZ_CRASH(); } |
467 |
+ template <typename T, typename S> void mov(T, S) { MOZ_CRASH(); } |
468 |
+ template <typename T, typename S> void movq(T, S) { MOZ_CRASH(); } |
469 |
+ template <typename T, typename S> void movePtr(T, S) { MOZ_CRASH(); } |
470 |
+ template <typename T, typename S> void move32(T, S) { MOZ_CRASH(); } |
471 |
+ template <typename T, typename S> void moveFloat32(T, S) { MOZ_CRASH(); } |
472 |
+ template <typename T, typename S> void moveDouble(T, S) { MOZ_CRASH(); } |
473 |
+ template <typename T, typename S> void move64(T, S) { MOZ_CRASH(); } |
474 |
+ template <typename T> CodeOffset movWithPatch(T, Register) { MOZ_CRASH(); } |
475 |
+ |
476 |
|
477 |
diff --git a/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild b/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild |
478 |
new file mode 100644 |
479 |
index 0000000000..faaa657570 |
480 |
--- /dev/null |
481 |
+++ b/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild |
482 |
@@ -0,0 +1,145 @@ |
483 |
+# Copyright 1999-2017 Gentoo Foundation |
484 |
+# Distributed under the terms of the GNU General Public License v2 |
485 |
+# $Id$ |
486 |
+ |
487 |
+EAPI=6 |
488 |
+WANT_AUTOCONF="2.1" |
489 |
+PYTHON_COMPAT=( python2_7 ) |
490 |
+PYTHON_REQ_USE="threads" |
491 |
+inherit autotools toolchain-funcs multilib python-any-r1 versionator pax-utils mozcoreconf-v4 |
492 |
+ |
493 |
+MY_PN="mozjs" |
494 |
+MY_P="${MY_PN}-${PV/_/.}" |
495 |
+DESCRIPTION="Stand-alone JavaScript C library" |
496 |
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" |
497 |
+SRC_URI="https://people.mozilla.org/~sfink/${MY_P}.tar.bz2" |
498 |
+ |
499 |
+LICENSE="NPL-1.1" |
500 |
+SLOT="45" |
501 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
502 |
+IUSE="debug +jit minimal static-libs +system-icu test" |
503 |
+ |
504 |
+RESTRICT="ia64? ( test )" |
505 |
+ |
506 |
+S="${WORKDIR}/${MY_P%.rc*}" |
507 |
+#S="${WORKDIR}/mozjs-38.0.0" |
508 |
+BUILDDIR="${S}/js/src" |
509 |
+ |
510 |
+RDEPEND=">=dev-libs/nspr-4.10.10 |
511 |
+ virtual/libffi |
512 |
+ sys-libs/readline:0= |
513 |
+ >=sys-libs/zlib-1.2.3 |
514 |
+ system-icu? ( >=dev-libs/icu-51.1:= )" |
515 |
+DEPEND="${RDEPEND} |
516 |
+ ${PYTHON_DEPS} |
517 |
+ app-arch/zip |
518 |
+ virtual/pkgconfig" |
519 |
+ |
520 |
+pkg_setup(){ |
521 |
+ if [[ ${MERGE_TYPE} != "binary" ]]; then |
522 |
+ moz_pkgsetup |
523 |
+ fi |
524 |
+} |
525 |
+ |
526 |
+src_prepare() { |
527 |
+ eapply "${FILESDIR}"/${PN}-38-jsapi-tests.patch |
528 |
+ eapply "${FILESDIR}"/mozjs45-1266366.patch |
529 |
+ eapply "${FILESDIR}"/ff45 |
530 |
+ |
531 |
+ eapply_user |
532 |
+ |
533 |
+ if [[ ${CHOST} == *-freebsd* ]]; then |
534 |
+ # Don't try to be smart, this does not work in cross-compile anyway |
535 |
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die |
536 |
+ fi |
537 |
+ |
538 |
+ cd "${BUILDDIR}" || die |
539 |
+ eautoconf |
540 |
+} |
541 |
+ |
542 |
+src_configure() { |
543 |
+ export SHELL=/bin/sh |
544 |
+ cd "${BUILDDIR}" || die |
545 |
+ |
546 |
+ econf \ |
547 |
+ --enable-jemalloc \ |
548 |
+ --enable-readline \ |
549 |
+ --enable-threadsafe \ |
550 |
+ --with-system-nspr \ |
551 |
+ --enable-system-ffi \ |
552 |
+ --disable-optimize \ |
553 |
+ --with-intl-api \ |
554 |
+ $(use_with system-icu) \ |
555 |
+ $(use_enable debug) \ |
556 |
+ $(use_enable jit yarr-jit) \ |
557 |
+ $(use_enable jit ion) \ |
558 |
+ $(use_enable static-libs static) \ |
559 |
+ $(use_enable test tests) |
560 |
+} |
561 |
+ |
562 |
+cross_make() { |
563 |
+ emake \ |
564 |
+ CFLAGS="${BUILD_CFLAGS}" \ |
565 |
+ CXXFLAGS="${BUILD_CXXFLAGS}" \ |
566 |
+ AR="${BUILD_AR}" \ |
567 |
+ CC="${BUILD_CC}" \ |
568 |
+ CXX="${BUILD_CXX}" \ |
569 |
+ RANLIB="${BUILD_RANLIB}" \ |
570 |
+ "$@" |
571 |
+} |
572 |
+src_compile() { |
573 |
+ cd "${BUILDDIR}" || die |
574 |
+ if tc-is-cross-compiler; then |
575 |
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB} |
576 |
+ cross_make \ |
577 |
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \ |
578 |
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \ |
579 |
+ MOZ_PGO_OPTIMIZE_FLAGS="" \ |
580 |
+ host_jsoplengen host_jskwgen |
581 |
+ cross_make \ |
582 |
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \ |
583 |
+ -C config nsinstall |
584 |
+ mv {,native-}host_jskwgen || die |
585 |
+ mv {,native-}host_jsoplengen || die |
586 |
+ mv config/{,native-}nsinstall || die |
587 |
+ sed -i \ |
588 |
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \ |
589 |
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \ |
590 |
+ Makefile || die |
591 |
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die |
592 |
+ rm -f config/host_nsinstall.o \ |
593 |
+ config/host_pathsub.o \ |
594 |
+ host_jskwgen.o \ |
595 |
+ host_jsoplengen.o || die |
596 |
+ fi |
597 |
+ |
598 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ |
599 |
+ emake \ |
600 |
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \ |
601 |
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \ |
602 |
+ MOZ_PGO_OPTIMIZE_FLAGS="" |
603 |
+} |
604 |
+ |
605 |
+src_test() { |
606 |
+ cd "${BUILDDIR}/js/src/jsapi-tests" || die |
607 |
+ ./jsapi-tests || die |
608 |
+} |
609 |
+ |
610 |
+src_install() { |
611 |
+ cd "${BUILDDIR}" || die |
612 |
+ emake DESTDIR="${D}" install |
613 |
+ |
614 |
+ if ! use minimal; then |
615 |
+ if use jit; then |
616 |
+ pax-mark m "${ED}/usr/bin/js${SLOT}" |
617 |
+ fi |
618 |
+ else |
619 |
+ rm -f "${ED}/usr/bin/js${SLOT}" |
620 |
+ fi |
621 |
+ |
622 |
+ if ! use static-libs; then |
623 |
+ # We can't actually disable building of static libraries |
624 |
+ # They're used by the tests and in a few other places |
625 |
+ find "${D}" -iname '*.a' -delete || die |
626 |
+ fi |
627 |
+} |