Skip to content

Commit

Permalink
add patch from ondrej-zary : GermanAizek#16 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentpichon committed Sep 12, 2024
1 parent 5ad60e6 commit 27a2114
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
17 changes: 17 additions & 0 deletions debian12-mongod.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM debian:bookworm

RUN apt update -y && \
apt install -y libcurl4 && \
apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY bin/mongod /usr/local/bin/

RUN mkdir -p /data/db && \
chmod -R 750 /data && \
chown -R 999:999 /data

USER 999

EXPOSE 27017/tcp
CMD [ "/usr/local/bin/mongod" ]
25 changes: 25 additions & 0 deletions mozjs-noavx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- a/src/third_party/mozjs/SConscript
+++ b/src/third_party/mozjs/SConscript
@@ -145,8 +145,7 @@ sources = [
]

if env['TARGET_ARCH'] == 'x86_64' and not env.TargetOSIs('windows'):
- env.Append(CCFLAGS=['-mavx2'])
- sources.extend(["extract/mozglue/misc/SIMD_avx2.cpp", "extract/mozglue/misc/SSE.cpp"])
+ sources.extend(["extract/mozglue/misc/SSE.cpp"])

if env.TargetOSIs('windows'):
sources.extend([
diff --git a/src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp b/src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp
index 3893de57b32..4ea0a657fbb 100644
--- a/src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp
+++ b/src/third_party/mozjs/extract/mozglue/misc/SIMD.cpp
@@ -448,7 +448,7 @@ const char* SIMD::memchr8SSE2(const char* ptr, char value, size_t length) {
// 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

bool SupportsAVX2() { return supports_avx2(); }

0 comments on commit 27a2114

Please sign in to comment.