Skip to contentSkip to conversation

mongodb: Fix build on ppc64le

PATCH New Khem Raj 1 participant 1 message Mar 13, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 mongodb: Fix build on ppc64le

---
 .../mongodb/mongodb/ppc64_ARCH_BITS.patch      | 18 ++++++++++++++++++
 .../recipes-dbs/mongodb/mongodb_git.bb         |  1 +
 2 files changed, 19 insertions(+)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/ppc64_ARCH_BITS.patch
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/ppc64_ARCH_BITS.patch new file +18 -0
new file mode 100644
index 0000000000..471d5629a1
@@ -0,0 +1,18 @@
+Subject: [PATCH] stacktrace: Define ARCH_BITS for ppc64
+
+src/mongo/util/stacktrace_somap.cpp:89:2: error: #error Unknown target architecture.
+stacktrace_somap.cpp:92:33: error: 'ELFCLASSARCH_BITS' was not declared in this scope
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/src/mongo/util/stacktrace_somap.cpp
++++ b/src/mongo/util/stacktrace_somap.cpp
+@@ -81,7 +81,7 @@ void addUnameToSoMap(BSONObjBuilder* soM
+ 
+ #if defined(__ELF_NATIVE_CLASS)  // determine ARCH_BITS
+ #define ARCH_BITS __ELF_NATIVE_CLASS
+-#elif defined(__x86_64__) || defined(__aarch64__)
++#elif defined(__x86_64__) || defined(__aarch64__)  || defined(__powerpc64__)
+ #define ARCH_BITS 64
+ #elif defined(__i386__) || defined(__arm__)
+ #define ARCH_BITS 32
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +1 -0
index 3214918db8..b78255a049 100644
@@ -29,6 +29,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4 \
            file://0001-stacktrace-Define-ARCH_BITS-for-x86.patch \
            file://0001-include-needed-c-header.patch \
            file://disable_runtime_check.patch \
+           file://ppc64_ARCH_BITS.patch \
            "
 SRC_URI_append_libc-musl ="\
            file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
Signature · 1 line
2.30.2