From 8cb015b780b8923e7ab6a3ee89c576e9cd6b0518 Mon Sep 17 00:00:00 2001 From: gutteridge Date: Wed, 25 Nov 2020 00:40:16 +0000 Subject: 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. --- lang/mozjs78/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lang/mozjs78/Makefile') diff --git a/lang/mozjs78/Makefile b/lang/mozjs78/Makefile index c29d4aa80b1..a2c4d527bfb 100644 --- a/lang/mozjs78/Makefile +++ b/lang/mozjs78/Makefile @@ -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 -- cgit v1.2.3