From 71668086d0505844961d8f85a80f698b46e9a8f9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 13 Mar 2021 10:05:41 -0800 Subject: mongodb: Fix cross build on ppc64le Signed-off-by: Khem Raj --- .../mongodb/mongodb/disable_runtime_check.patch | 17 +++++++++++++++++ .../meta-python/recipes-dbs/mongodb/mongodb_git.bb | 8 +++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/disable_runtime_check.patch (limited to 'meta-oe/dynamic-layers') diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/disable_runtime_check.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/disable_runtime_check.patch new file mode 100644 index 0000000000..78ebba8fb7 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/disable_runtime_check.patch @@ -0,0 +1,17 @@ +Lets use cached result for this otherwise runtime test, on qemuppc64 +when this test is run using gcc11, it returns 1, since we dont worry +about older compilers here, we can cache the result and use it here + +Upstream-Status: Inappropriate [Cross-compile specific] +Signed-off-by: Khem Raj +--- a/SConstruct ++++ b/SConstruct +@@ -3904,7 +3904,7 @@ def doConfigure(myenv): + + conf.AddTest('CheckAltivecVbpermqOutput', CheckAltivecVbpermqOutput) + +- outputIndex = next((idx for idx in [0,1] if conf.CheckAltivecVbpermqOutput(idx)), None) ++ outputIndex = 1 + if outputIndex is not None: + conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex) + else: diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 2edd345590..3214918db8 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb @@ -28,6 +28,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4 \ file://0001-Fix-compilation-with-fno-common.patch \ file://0001-stacktrace-Define-ARCH_BITS-for-x86.patch \ file://0001-include-needed-c-header.patch \ + file://disable_runtime_check.patch \ " SRC_URI_append_libc-musl ="\ file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ @@ -56,12 +57,15 @@ PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools," PACKAGECONFIG[shell] = ",--js-engine=none,," PACKAGECONFIG[system-pcre] = "--use-system-pcre,,libpcre," +MONGO_ARCH ?= "${HOST_ARCH}" +MONGO_ARCH_powerpc64le = "ppc64le" + EXTRA_OESCONS = "PREFIX=${prefix} \ DESTDIR=${D} \ LIBPATH=${STAGING_LIBDIR} \ LINKFLAGS='${LDFLAGS}' \ CXXFLAGS='${CXXFLAGS}' \ - TARGET_ARCH=${TARGET_ARCH} \ + TARGET_ARCH=${MONGO_ARCH} \ MONGO_VERSION=${PV} \ OBJCOPY=${OBJCOPY} \ --ssl \ @@ -116,5 +120,3 @@ scons_do_install() { CONFFILES_${PN} = "${sysconfdir}/mongod.conf" SYSTEMD_SERVICE_${PN} = "mongod.service" - - -- cgit 1.2.3-korg