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:   gutteridge
Date:           Wed Nov 25 00:40:17 UTC 2020

Modified Files:
        pkgsrc/lang/mozjs78: Makefile distinfo
Added Files:
        pkgsrc/lang/mozjs78/patches: patch-.._.._mfbt_tests_TestVariant.cpp

Log Message:
mozjs78: fix builds on some 32-bit architectures

As with earlier versions, this expects 64-bit atomic operations.
Separately, there's an issue with an assertion in test code that makes
an assumption about the size of an index variable vs. size_t that
doesn't hold.

Test suite comparisons between resultant amd64 and i386 builds on
recent NetBSD releases reveal a similar number of failures (18 vs. 20),
mostly to do with date parsing, though i386 also fails with two IEEE
754 double precision tests.

I did look at carrying mozjs60 patches for NetBSD/powerpc forward, but
I don't have a viable test environment at the moment, and code
inspection suggests that may not be straightforward.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/mozjs78/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/mozjs78/distinfo
cvs rdiff -u -r0 -r1.1 \
    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.4 pkgsrc/lang/mozjs78/Makefile:1.5
--- pkgsrc/lang/mozjs78/Makefile:1.4    Sat Nov 21 02:42:03 2020
+++ pkgsrc/lang/mozjs78/Makefile        Wed Nov 25 00:40:16 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2020/11/21 02:42:03 gutteridge Exp $
+# $NetBSD: Makefile,v 1.5 2020/11/25 00:40:16 gutteridge Exp $
 
 DISTNAME=      mozjs78_78.4.0.orig
 PKGNAME=       ${DISTNAME:S/_/-/:S/.orig//}
@@ -35,6 +35,11 @@ CONFIGURE_ARGS+=     --with-intl-api
 CONFIGURE_ARGS+=       --target=${MACHINE_GNU_PLATFORM}
 CONFIGURE_ARGS+=       --host=${MACHINE_GNU_PLATFORM}
 
+.if ${MACHINE_ARCH} == "i386"
+# 64 bit atomics
+CXXFLAGS+=             -march=i586
+.endif
+
 PKGCONFIG_OVERRIDE+=   build/js.pc.in
 PKGCONFIG_OVERRIDE+=   ctypes/libffi/libffi.pc.in
 

Index: pkgsrc/lang/mozjs78/distinfo
diff -u pkgsrc/lang/mozjs78/distinfo:1.1 pkgsrc/lang/mozjs78/distinfo:1.2
--- pkgsrc/lang/mozjs78/distinfo:1.1    Tue Nov 10 11:27:10 2020
+++ pkgsrc/lang/mozjs78/distinfo        Wed Nov 25 00:40:16 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2020/11/10 11:27:10 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/11/25 00:40:16 gutteridge Exp $
 
 SHA1 (mozjs78_78.4.0.orig.tar.xz) = b2c1c241f70310d545f8a3c05b9c8c11676e56a8
 RMD160 (mozjs78_78.4.0.orig.tar.xz) = cef93b6116eff9f04beeaf3dda0a42cd811d0b18
@@ -6,6 +6,7 @@ SHA512 (mozjs78_78.4.0.orig.tar.xz) = 05
 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-configure.in) = e8dab4a549e5cdf2e97d65b258970f9f6cc9c72c
 SHA1 (patch-jit_ProcessExecutableMemory.cpp) = d65001c07cc9393db2dce6ff291e94d5dd76b86e
 SHA1 (patch-jsfriendapi.h) = c6eea8b37d44a4b0f9ca0a325e482d01ef2c6e0f

Added files:

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   Wed Nov 25 00:40:17 2020
+++ pkgsrc/lang/mozjs78/patches/patch-.._.._mfbt_tests_TestVariant.cpp  Wed Nov 25 00:40:16 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-.._.._mfbt_tests_TestVariant.cpp,v 1.1 2020/11/25 00:40:16 gutteridge 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