1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

databases/mongodb[78]0: fix build with NOAVX enabled

Thanks to Yuri and Borja who helped creating patches and tested.

PR:	282471
This commit is contained in:
Ronald Klop 2024-11-07 16:48:44 +01:00
parent ff59e79f49
commit f806050016
No known key found for this signature in database
GPG Key ID: 551E8E6207A42166
4 changed files with 30 additions and 6 deletions

View File

@ -1,7 +1,7 @@
PORTNAME= mongodb
DISTVERSIONPREFIX= r
DISTVERSION= 7.0.14
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases net
PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}
@ -88,7 +88,7 @@ GROUPS= mongodb
OPTIONS_DEFINE= LTO NOAVX SASL
OPTIONS_DEFINE_aarch64= ARMV80A
OPTIONS_DEFAULT= SASL
OPTIONS_DEFAULT= NOAVX SASL
# MongoDB on non-LSE ARM cpu like Raspberry Pi can work but is unsupported upstream.
# Can give corruption on high concurrency.
@ -101,7 +101,8 @@ ARMV80A_EXTRA_PATCHES= ${FILESDIR}/extrapatch-SConstruct
LTO_MAKE_ARGS= --lto=on
NOAVX_MAKE_ARGS= --experimental-optimization="-sandybridge"
NOAVX_EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_third__party_mozjs_SConscript
NOAVX_EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_third__party_mozjs_SConscript \
${FILESDIR}/extrapatch-src_third__party_mozjs_extract_mozglue_misc_SIMD.cpp
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
SASL_MAKE_ARGS= --use-sasl-client

View File

@ -0,0 +1,11 @@
--- src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp.orig 2024-11-07 09:56:02 UTC
+++ src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp
@@ -448,7 +448,7 @@ const char* SIMD::memchr8SSE2(const char* ptr, char va
// assertion failure. Accordingly, we just don't allow that to happen. We
// are not particularly concerned about ensuring that newer 32 bit processors
// get access to the AVX2 functions exposed here.
-# if defined(MOZILLA_MAY_SUPPORT_AVX2) && defined(__x86_64__)
+# if 0 && defined(MOZILLA_MAY_SUPPORT_AVX2) && defined(__x86_64__)
bool SupportsAVX2() { return supports_avx2(); }

View File

@ -1,7 +1,7 @@
PORTNAME= mongodb
DISTVERSIONPREFIX= r
DISTVERSION= 8.0.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases net
PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}
@ -93,7 +93,7 @@ GROUPS= mongodb
OPTIONS_DEFINE= LTO NOAVX SASL
OPTIONS_DEFINE_aarch64= ARMV80A
OPTIONS_DEFAULT= SASL
OPTIONS_DEFAULT= NOAVX SASL
# MongoDB on non-LSE ARM cpu like Raspberry Pi can work but is unsupported upstream.
# Can give corruption on high concurrency.
@ -106,7 +106,8 @@ ARMV80A_EXTRA_PATCHES= ${FILESDIR}/extrapatch-SConstruct
LTO_MAKE_ARGS= --lto=on
NOAVX_MAKE_ARGS= --experimental-optimization="-sandybridge"
NOAVX_EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_third__party_mozjs_SConscript
NOAVX_EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_third__party_mozjs_SConscript \
${FILESDIR}/extrapatch-src_third__party_mozjs_extract_mozglue_misc_SIMD.cpp
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
SASL_MAKE_ARGS= --use-sasl-client

View File

@ -0,0 +1,11 @@
--- src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp.orig 2024-11-07 09:56:02 UTC
+++ src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp
@@ -448,7 +448,7 @@ const char* SIMD::memchr8SSE2(const char* ptr, char va
// assertion failure. Accordingly, we just don't allow that to happen. We
// are not particularly concerned about ensuring that newer 32 bit processors
// get access to the AVX2 functions exposed here.
-# if defined(MOZILLA_MAY_SUPPORT_AVX2) && defined(__x86_64__)
+# if 0 && defined(MOZILLA_MAY_SUPPORT_AVX2) && defined(__x86_64__)
bool SupportsAVX2() { return supports_avx2(); }