summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-09-03 22:48:46 -0700
committerKhem Raj <raj.khem@gmail.com>2024-09-03 22:49:50 -0700
commit2eb7336df2ef962f923b771716bde2945008fb06 (patch)
treebdd75a026d4f783a220df3be9e8f9893e77579c6
parentcfd5a02d269e2b0103bd9ca03574481134ff3b76 (diff)
downloadmeta-openembedded-2eb7336df2ef962f923b771716bde2945008fb06.tar.gz
mozjs-115: fix build with clang and libc++ 19
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch36
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch30
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb2
3 files changed, 68 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch
new file mode 100644
index 0000000000..c19a32690d
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/1849070.patch
@@ -0,0 +1,36 @@
1Bug 1849070 - Avoid using char_traits<unsigned char>. r=spidermonkey-reviewers,anba
2
3It is not guaranteed to exist by the standard, and is actively being
4removed from libc++ in LLVM 18.
5
6Differential Revision: https://phabricator.services.mozilla.com/D186421
7
8Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/68ff4d3f7338248b4d67cf03aade5a73f8d396b2]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11--- a/js/src/builtin/intl/Locale.cpp
12+++ b/js/src/builtin/intl/Locale.cpp
13@@ -802,8 +802,10 @@ static inline auto FindUnicodeExtensionT
14 UnicodeKey key) {
15 JS::AutoCheckCannotGC nogc;
16 return unicodeExtension->hasLatin1Chars()
17- ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc),
18- unicodeExtension->length(), key)
19+ ? FindUnicodeExtensionType(
20+ reinterpret_cast<const char*>(
21+ unicodeExtension->latin1Chars(nogc)),
22+ unicodeExtension->length(), key)
23 : FindUnicodeExtensionType(unicodeExtension->twoByteChars(nogc),
24 unicodeExtension->length(), key);
25 }
26@@ -920,7 +922,9 @@ static BaseNamePartsResult BaseNameParts
27 static inline auto BaseNameParts(JSLinearString* baseName) {
28 JS::AutoCheckCannotGC nogc;
29 return baseName->hasLatin1Chars()
30- ? BaseNameParts(baseName->latin1Chars(nogc), baseName->length())
31+ ? BaseNameParts(
32+ reinterpret_cast<const char*>(baseName->latin1Chars(nogc)),
33+ baseName->length())
34 : BaseNameParts(baseName->twoByteChars(nogc), baseName->length());
35 }
36
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch
new file mode 100644
index 0000000000..93e0f0f4f9
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/1894423.patch
@@ -0,0 +1,30 @@
1Bug 1894423 - Remove unused ExclusiveData move constructor. r=spidermonkey-reviewers,jonco
2
3Because the constructor is actually not used, the compiler used to not
4complain about it being broken. Recent changes on clang trunk made it
5catch this problem without the constructor being used.
6
7As Mutex doesn't have a move constructor, it's also not only a matter of
8adding the missing underscore to lock.
9
10As the constructor is never used, just remove it.
11
12Differential Revision: https://phabricator.services.mozilla.com/D209108
13
14Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/223087fdc29f]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16
17--- a/js/src/threading/ExclusiveData.h
18+++ b/js/src/threading/ExclusiveData.h
19@@ -109,11 +109,6 @@ class ExclusiveData {
20 explicit ExclusiveData(const MutexId& id, Args&&... args)
21 : lock_(id), value_(std::forward<Args>(args)...) {}
22
23- ExclusiveData(ExclusiveData&& rhs)
24- : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
25- MOZ_ASSERT(&rhs != this, "self-move disallowed!");
26- }
27-
28 ExclusiveData& operator=(ExclusiveData&& rhs) {
29 this->~ExclusiveData();
30 new (mozilla::KnownNotNull, this) ExclusiveData(std::move(rhs));
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb b/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb
index c0eb1291fe..4a0baf5fa6 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115_115.11.0.bb
@@ -16,6 +16,8 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire
16 file://musl-disable-stackwalk.patch \ 16 file://musl-disable-stackwalk.patch \
17 file://0001-add-arm-to-list-of-mozinline.patch \ 17 file://0001-add-arm-to-list-of-mozinline.patch \
18 file://armv5.patch \ 18 file://armv5.patch \
19 file://1849070.patch \
20 file://1894423.patch \
19 " 21 "
20SRC_URI[sha256sum] = "16be46f16a356a2b8bd3541805a24c8a2acf6f077cf8a65859689685c26025e0" 22SRC_URI[sha256sum] = "16be46f16a356a2b8bd3541805a24c8a2acf6f077cf8a65859689685c26025e0"
21 23