pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/mozjs78



Module Name:    pkgsrc
Committed By:   nia
Date:           Sat Dec  5 12:03:26 UTC 2020

Modified Files:
        pkgsrc/lang/mozjs78: Makefile distinfo
Added Files:
        pkgsrc/lang/mozjs78/patches: patch-build_moz.configure_rust.configure
            patch-build_moz.configure_toolchain.configure
            patch-js_moz.configure patch-js_src_jit_AtomicOperations.h
            patch-js_src_jit_ProcessExecutableMemory.cpp
            patch-js_src_jsfriendapi.h patch-js_src_vm_ArrayBufferObject.cpp
            patch-js_src_vm_JSONPrinter.cpp patch-js_src_vm_JSONPrinter.h
            patch-mfbt_tests_TestVariant.cpp
Removed Files:
        pkgsrc/lang/mozjs78/patches:
            patch-.._.._build_moz.configure_rust.configure
            patch-.._.._build_moz.configure_toolchain.configure
            patch-.._.._mfbt_tests_TestVariant.cpp patch-jit_AtomicOperations.h
            patch-jit_ProcessExecutableMemory.cpp patch-jsfriendapi.h
            patch-vm_ArrayBufferObject.cpp patch-vm_JSONPrinter.cpp
            patch-vm_JSONPrinter.h

Log Message:
mozjs78: Fix configure where the readline library isn't builtin.

This commit also moves the location of WRKSRC so that no patches are
applied to files in parent directories of WRKSRC.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/mozjs78/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/mozjs78/distinfo
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/lang/mozjs78/patches/patch-.._.._build_moz.configure_rust.configure \
    pkgsrc/lang/mozjs78/patches/patch-.._.._build_moz.configure_toolchain.configure \
    pkgsrc/lang/mozjs78/patches/patch-.._.._mfbt_tests_TestVariant.cpp \
    pkgsrc/lang/mozjs78/patches/patch-jit_AtomicOperations.h \
    pkgsrc/lang/mozjs78/patches/patch-jit_ProcessExecutableMemory.cpp \
    pkgsrc/lang/mozjs78/patches/patch-jsfriendapi.h \
    pkgsrc/lang/mozjs78/patches/patch-vm_ArrayBufferObject.cpp \
    pkgsrc/lang/mozjs78/patches/patch-vm_JSONPrinter.cpp \
    pkgsrc/lang/mozjs78/patches/patch-vm_JSONPrinter.h
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_rust.configure \
    pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_toolchain.configure \
    pkgsrc/lang/mozjs78/patches/patch-js_moz.configure \
    pkgsrc/lang/mozjs78/patches/patch-js_src_jit_AtomicOperations.h \
    pkgsrc/lang/mozjs78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp \
    pkgsrc/lang/mozjs78/patches/patch-js_src_jsfriendapi.h \
    pkgsrc/lang/mozjs78/patches/patch-js_src_vm_ArrayBufferObject.cpp \
    pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.cpp \
    pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.h \
    pkgsrc/lang/mozjs78/patches/patch-mfbt_tests_TestVariant.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/mozjs78/Makefile
diff -u pkgsrc/lang/mozjs78/Makefile:1.9 pkgsrc/lang/mozjs78/Makefile:1.10
--- pkgsrc/lang/mozjs78/Makefile:1.9    Sun Nov 29 00:28:39 2020
+++ pkgsrc/lang/mozjs78/Makefile        Sat Dec  5 12:03:25 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2020/11/29 00:28:39 gutteridge Exp $
+# $NetBSD: Makefile,v 1.10 2020/12/05 12:03:25 nia Exp $
 
 DISTNAME=      mozjs78_78.4.0.orig
 PKGNAME=       ${DISTNAME:S/_/-/:S/.orig//}
@@ -11,15 +11,17 @@ HOMEPAGE=   https://packages.debian.org/bu
 COMMENT=       SpiderMonkey JavaScript library (78.x branch)
 LICENSE=       mpl-1.1
 
-WRKSRC=                ${WRKDIR}/firefox-${PKGVERSION_NOREV}/js/src
+WRKSRC=                ${WRKDIR}/firefox-${PKGVERSION_NOREV}
 USE_TOOLS+=    autoconf213 gmake perl pkg-config
 USE_LANGUAGES= c c++
 
 # "ERROR: Only GCC 7.1 or newer is supported"
 GCC_REQD+=     7
 
+CONFIGURE_DIRS=        js/src/build
+BUILD_DIRS=    js/src/build
+
 HAS_CONFIGURE=         yes
-CONFIGURE_DIRS=                build
 CONFIGURE_SCRIPT=      ../configure
 CONFIGURE_ARGS+=       --prefix=${PREFIX}
 CONFIGURE_ARGS+=       --disable-debug
@@ -47,17 +49,24 @@ CXXFLAGS+=          -march=i586
 .include "../../devel/libatomic/buildlink3.mk"
 .endif
 
-PKGCONFIG_OVERRIDE+=   build/js.pc.in
-PKGCONFIG_OVERRIDE+=   ctypes/libffi/libffi.pc.in
+SUBST_CLASSES+=                conf
+SUBST_STAGE.conf=      pre-configure
+SUBST_MESSAGE.conf=    Set variables in configuration file.
+SUBST_FILES.conf+=     js/moz.configure
+SUBST_VARS.conf=       PREFIX
+
+PKGCONFIG_OVERRIDE+=   js/src/build/js.pc.in
+PKGCONFIG_OVERRIDE+=   js/src/ctypes/libffi/libffi.pc.in
 
 PYTHON_VERSIONS_INCOMPATIBLE=  27
 PYTHON_FOR_BUILD_ONLY=         tool
 TOOL_DEPENDS+=                 ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
 
 pre-configure:
-       cd ${WRKSRC} && autoconf-2.13 old-configure.in > old-configure \
-               && autoconf-2.13
-       mkdir ${WRKSRC}/build && touch ${WRKSRC}/build/old-configure.vars
+       cd ${WRKSRC}/js/src && \
+           autoconf-2.13 old-configure.in > old-configure && autoconf-2.13
+       ${MKDIR} ${WRKSRC}/js/src/build && \
+           ${TOUCH} ${WRKSRC}/js/src/build/old-configure.vars
 
 post-install:
        cd ${DESTDIR}${PREFIX}/lib && \

Index: pkgsrc/lang/mozjs78/distinfo
diff -u pkgsrc/lang/mozjs78/distinfo:1.4 pkgsrc/lang/mozjs78/distinfo:1.5
--- pkgsrc/lang/mozjs78/distinfo:1.4    Sat Nov 28 11:02:15 2020
+++ pkgsrc/lang/mozjs78/distinfo        Sat Dec  5 12:03:25 2020
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.4 2020/11/28 11:02:15 nia Exp $
+$NetBSD: distinfo,v 1.5 2020/12/05 12:03:25 nia Exp $
 
 SHA1 (mozjs78_78.4.0.orig.tar.xz) = b2c1c241f70310d545f8a3c05b9c8c11676e56a8
 RMD160 (mozjs78_78.4.0.orig.tar.xz) = cef93b6116eff9f04beeaf3dda0a42cd811d0b18
 SHA512 (mozjs78_78.4.0.orig.tar.xz) = 05a0dd27cd8f330c69bf798f9025dd560e76a1a14628af4caeeae4f7573aef9371e19edb8a8e4cd28e92e189eb3a159b4ffedb1b1bd4b806e065de433cca6ffd
 Size (mozjs78_78.4.0.orig.tar.xz) = 58319040 bytes
-SHA1 (patch-.._.._build_moz.configure_rust.configure) = a40ef515b34781d703e9222e4c88746544556287
-SHA1 (patch-.._.._build_moz.configure_toolchain.configure) = 055312319a6a4e2916263baf318585b943c1ca20
-SHA1 (patch-.._.._mfbt_tests_TestVariant.cpp) = e2b1aa54059a8a64ecef2bcf2807f5d8d85a89d2
-SHA1 (patch-jit_AtomicOperations.h) = 5e3d51f209f94e9c1b33abe965cdf4289aab65d5
-SHA1 (patch-jit_ProcessExecutableMemory.cpp) = d65001c07cc9393db2dce6ff291e94d5dd76b86e
-SHA1 (patch-jsfriendapi.h) = c6eea8b37d44a4b0f9ca0a325e482d01ef2c6e0f
-SHA1 (patch-vm_ArrayBufferObject.cpp) = 931695e3e02ec1d6ed0f722be1059c48878cd117
-SHA1 (patch-vm_JSONPrinter.cpp) = c2483309516249d23d448e48bc91e20a0b150fba
-SHA1 (patch-vm_JSONPrinter.h) = fd720eba1d4593f70d932029f64284e17396d075
+SHA1 (patch-build_moz.configure_rust.configure) = 5124e8edc6b7ae319ed68d5d25a1e036b79f8a71
+SHA1 (patch-build_moz.configure_toolchain.configure) = 930ed1aec1da8c10c80d8f31dfc5acbf2db31c5f
+SHA1 (patch-js_moz.configure) = f3d762b293761e359ac7c389059aa228949a6f0b
+SHA1 (patch-js_src_jit_AtomicOperations.h) = 19eba50673f8138bbb09c0eaca63923cadbadd26
+SHA1 (patch-js_src_jit_ProcessExecutableMemory.cpp) = 84d629df0e7963755aa38ff9a1e29d60ed3adb4c
+SHA1 (patch-js_src_jsfriendapi.h) = f342a88182c1be0d3c0027c91ae94e1d4eac2542
+SHA1 (patch-js_src_vm_ArrayBufferObject.cpp) = 155f042eee3a8ff903622860e0a99af1ed776ad5
+SHA1 (patch-js_src_vm_JSONPrinter.cpp) = ff89dfe4e73223dda3d5d33e90e8c7bb3ffa3e0e
+SHA1 (patch-js_src_vm_JSONPrinter.h) = b9f67b29b16d7163aecc0ce9b6939c1308878a44
+SHA1 (patch-mfbt_tests_TestVariant.cpp) = 586fb67335b497ccadd3960025c44f8630f5476a

Added files:

Index: pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_rust.configure
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_rust.configure:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_rust.configure        Sat Dec  5 12:03:26 2020
@@ -0,0 +1,17 @@
+$NetBSD: patch-build_moz.configure_rust.configure,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+* Do not match rumprun toolchain for NetBSD,
+  narrowed should be one not two.
+
+--- build/moz.configure/rust.configure.orig    2020-11-04 10:51:54.000000000 +0000
++++ build/moz.configure/rust.configure
+@@ -337,7 +337,8 @@ def rust_triple_alias(host_or_target, ho
+             narrowed = [
+                 c for c in candidates
+                 if c.target.raw_os == host_or_target.raw_os and
+-                   c.target.raw_cpu == host_or_target.raw_cpu
++                   c.target.raw_cpu == host_or_target.raw_cpu and
++                   not c.rust_target.endswith("-rumprun-netbsd")
+             ]
+             if len(narrowed) == 1:
+                 return narrowed[0].rust_target
Index: pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_toolchain.configure
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_toolchain.configure:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-build_moz.configure_toolchain.configure   Sat Dec  5 12:03:26 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_moz.configure_toolchain.configure,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+Builds fine on MacOS with newer toolchain
+
+--- build/moz.configure/toolchain.configure.orig       2020-11-04 10:51:54.000000000 +0000
++++ build/moz.configure/toolchain.configure
+@@ -141,7 +141,7 @@ with only_when(host_is_osx | target_is_o
+     @imports(_from='biplist', _import='readPlist')
+     def macos_sdk(sdk, host):
+         sdk_min_version = Version('10.11')
+-        sdk_max_version = Version('10.15.4')
++        sdk_max_version = Version('10.15.6')
+ 
+         if sdk:
+             sdk = sdk[0]
Index: pkgsrc/lang/mozjs78/patches/patch-js_moz.configure
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-js_moz.configure:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-js_moz.configure  Sat Dec  5 12:03:26 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-js_moz.configure,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+Check ${PREFIX} to allow use of non-builtin readlink libraries.
+
+--- js/moz.configure.orig      2020-11-04 10:51:54.000000000 +0000
++++ js/moz.configure
+@@ -696,7 +696,7 @@ def editline(js_shell, is_windows, compi
+ js_option('--enable-readline', help='Link js shell to system readline library',
+           when=editline)
+ 
+-has_readline = check_symbol('readline', flags=['-lreadline'], when='--enable-readline',
++has_readline = check_symbol('readline', flags=['-lreadline', '-L@PREFIX@/lib'], when='--enable-readline',
+                             onerror=lambda: die('No system readline library found'))
+ 
+ set_config('EDITLINE_LIBS', ['-lreadline'], when=has_readline)
Index: pkgsrc/lang/mozjs78/patches/patch-js_src_jit_AtomicOperations.h
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-js_src_jit_AtomicOperations.h:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-js_src_jit_AtomicOperations.h     Sat Dec  5 12:03:26 2020
@@ -0,0 +1,16 @@
+$NetBSD: patch-js_src_jit_AtomicOperations.h,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+C++ on NetBSD/powerpc doesn't predefine __ppc__, only __powerpc__.  Compensate.
+
+--- js/src/jit/AtomicOperations.h.orig 2020-11-04 10:51:58.000000000 +0000
++++ js/src/jit/AtomicOperations.h
+@@ -391,7 +391,8 @@ inline bool AtomicOperations::isLockfree
+ #elif defined(__ppc__) || defined(__PPC__) || defined(__sparc__) ||     \
+     defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
+     defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) ||  \
+-    defined(__sh__) || defined(__s390__) || defined(__s390x__)
++    defined(__sh__) || defined(__s390__) || defined(__s390x__) ||       \
++    defined(__powerpc__)
+ #  include "jit/shared/AtomicOperations-feeling-lucky.h"
+ #else
+ #  error "No AtomicOperations support provided for this platform"
Index: pkgsrc/lang/mozjs78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp    Sat Dec  5 12:03:26 2020
@@ -0,0 +1,38 @@
+$NetBSD: patch-js_src_jit_ProcessExecutableMemory.cpp,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+PaX MPROTECT safety for NetBSD.
+
+--- js/src/jit/ProcessExecutableMemory.cpp.orig        2020-11-04 10:51:58.000000000 +0000
++++ js/src/jit/ProcessExecutableMemory.cpp
+@@ -362,9 +362,16 @@ static void* ReserveProcessExecutableMem
+   // Note that randomAddr is just a hint: if the address is not available
+   // mmap will pick a different address.
+   void* randomAddr = ComputeRandomAllocationAddress();
++#ifdef PROT_MPROTECT
++  void* p = MozTaggedAnonymousMmap(randomAddr, bytes,
++                                   PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ), 
++                                   MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1,
++                                   0, "js-executable-memory");
++#else
+   void* p = MozTaggedAnonymousMmap(randomAddr, bytes, PROT_NONE,
+                                    MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1,
+                                    0, "js-executable-memory");
++#endif
+   if (p == MAP_FAILED) {
+     return nullptr;
+   }
+@@ -409,8 +416,12 @@ static unsigned ProtectionSettingToFlags
+ 
+ static MOZ_MUST_USE bool CommitPages(void* addr, size_t bytes,
+                                      ProtectionSetting protection) {
+-  void* p = MozTaggedAnonymousMmap(
+-      addr, bytes, ProtectionSettingToFlags(protection),
++  void* p = MozTaggedAnonymousMmap(addr, bytes,
++#ifdef PROT_MPROTECT
++      ProtectionSettingToFlags(protection) | PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ),
++#else
++      ProtectionSettingToFlags(protection),
++#endif
+       MAP_FIXED | MAP_PRIVATE | MAP_ANON, -1, 0, "js-executable-memory");
+   if (p == MAP_FAILED) {
+     return false;
Index: pkgsrc/lang/mozjs78/patches/patch-js_src_jsfriendapi.h
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-js_src_jsfriendapi.h:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-js_src_jsfriendapi.h      Sat Dec  5 12:03:26 2020
@@ -0,0 +1,14 @@
+$NetBSD: patch-js_src_jsfriendapi.h,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+Fix va_list error
+
+--- js/src/jsfriendapi.h.orig  2020-11-04 10:51:54.000000000 +0000
++++ js/src/jsfriendapi.h
+@@ -14,6 +14,7 @@
+ #include "mozilla/PodOperations.h"
+ #include "mozilla/UniquePtr.h"
+ 
++#include <stdarg.h>
+ #include "jspubtd.h"
+ 
+ #include "js/CallArgs.h"
Index: pkgsrc/lang/mozjs78/patches/patch-js_src_vm_ArrayBufferObject.cpp
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-js_src_vm_ArrayBufferObject.cpp:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-js_src_vm_ArrayBufferObject.cpp   Sat Dec  5 12:03:26 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-js_src_vm_ArrayBufferObject.cpp,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+PaX MPROTECT safety for NetBSD
+
+--- js/src/vm/ArrayBufferObject.cpp.orig       2020-11-04 10:52:03.000000000 +0000
++++ js/src/vm/ArrayBufferObject.cpp
+@@ -164,9 +164,17 @@ void* js::MapBufferMemory(size_t mappedS
+     return nullptr;
+   }
+ #else   // XP_WIN
++
++#ifdef PROT_MPROTECT
++  void* data =
++      MozTaggedAnonymousMmap(nullptr, mappedSize, 
++                             PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ),
++                             MAP_PRIVATE | MAP_ANON, -1, 0, "wasm-reserved");
++#else
+   void* data =
+       MozTaggedAnonymousMmap(nullptr, mappedSize, PROT_NONE,
+                              MAP_PRIVATE | MAP_ANON, -1, 0, "wasm-reserved");
++#endif
+   if (data == MAP_FAILED) {
+     return nullptr;
+   }
Index: pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.cpp
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.cpp:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.cpp Sat Dec  5 12:03:26 2020
@@ -0,0 +1,17 @@
+$NetBSD: patch-js_src_vm_JSONPrinter.cpp,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+For NetBSD/arm, size_t is unsigned long, which is neither
+uint32_t (= unsigned int) nor uint64_t (= unsigned long long).
+
+--- js/src/vm/JSONPrinter.cpp.orig     2020-11-04 10:52:03.000000000 +0000
++++ js/src/vm/JSONPrinter.cpp
+@@ -146,7 +146,8 @@ void JSONPrinter::property(const char* n
+   out_.printf("%" PRIu64, value);
+ }
+ 
+-#if defined(XP_DARWIN) || defined(__OpenBSD__)
++#if defined(XP_DARWIN) || defined(__OpenBSD__) || \
++    (defined(__NetBSD__) && defined(__arm__))
+ void JSONPrinter::property(const char* name, size_t value) {
+   propertyName(name);
+   out_.printf("%zu", value);
Index: pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.h
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.h:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.h   Sat Dec  5 12:03:26 2020
@@ -0,0 +1,17 @@
+$NetBSD: patch-js_src_vm_JSONPrinter.h,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+For NetBSD/arm, size_t is unsigned long, which is neither
+uint32_t (= unsigned int) nor uint64_t (= unsigned long long).
+
+--- js/src/vm/JSONPrinter.h.orig       2020-11-04 10:52:03.000000000 +0000
++++ js/src/vm/JSONPrinter.h
+@@ -51,7 +51,8 @@ class JSONPrinter {
+   void property(const char* name, uint32_t value);
+   void property(const char* name, int64_t value);
+   void property(const char* name, uint64_t value);
+-#if defined(XP_DARWIN) || defined(__OpenBSD__)
++#if defined(XP_DARWIN) || defined(__OpenBSD__) || \
++    (defined(__NetBSD__) && defined(__arm__))
+   // On OSX and OpenBSD, size_t is long unsigned, uint32_t is unsigned, and
+   // uint64_t is long long unsigned. Everywhere else, size_t matches either
+   // uint32_t or uint64_t.
Index: pkgsrc/lang/mozjs78/patches/patch-mfbt_tests_TestVariant.cpp
diff -u /dev/null pkgsrc/lang/mozjs78/patches/patch-mfbt_tests_TestVariant.cpp:1.1
--- /dev/null   Sat Dec  5 12:03:26 2020
+++ pkgsrc/lang/mozjs78/patches/patch-mfbt_tests_TestVariant.cpp        Sat Dec  5 12:03:26 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-mfbt_tests_TestVariant.cpp,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+Disable assertion that fails on 32-bit architectures.
+
+--- mfbt/tests/TestVariant.cpp.orig    2020-11-04 10:52:03.000000000 +0000
++++ mfbt/tests/TestVariant.cpp
+@@ -567,7 +567,7 @@ static void testMatchingLambdaWithIndex(
+   // would be no way to distinguish how each lambda is actually invoked because
+   // there is only one choice of call operator in each overload set.
+   auto desc = [](auto aIndex, auto& a) {
+-    static_assert(sizeof(aIndex) < sizeof(size_t), "Expected small index type");
++    //static_assert(sizeof(aIndex) < sizeof(size_t), "Expected small index type");
+     switch (sizeof(a)) {
+       case 1:
+         MOZ_RELEASE_ASSERT(aIndex == 0);



Home | Main Index | Thread Index | Old Index