Skip to contentSkip to conversation

mongodb: Fix build on aarch64

PATCH New Khem Raj 1 participant 1 message Sep 22, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 mongodb: Fix build on aarch64

Inherit dos2unix since some files patched are in dos format

---
Changes in V2: Inherit dos2unix

 ...FPMathLib20U1-Check-for-__DEFINED_wchar_t.patch | 36 ++++++++++++++++
 .../mongodb/mongodb/arm64-support.patch            | 43 +++++++++++++++++++
 .../mongodb/disable-hw-crc32-on-arm64-s390x.patch  | 50 ++++++++++++++++++++++
 meta-oe/recipes-support/mongodb/mongodb_git.bb     |  5 ++-
 4 files changed, 133 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
 create mode 100644 meta-oe/recipes-support/mongodb/mongodb/arm64-support.patch
 create mode 100644 meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
meta-oe/recipes-support/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch new file +36 -0
new file mode 100644
index 000000000..5da34480e
@@ -0,0 +1,36 @@
+From fbfceebce2121831904f2f7115252dd03b413a6d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 19 Sep 2017 18:52:53 -0700
+Subject: [PATCH] IntelRDFPMathLib20U1: Check for __DEFINED_wchar_t
+
+This is defined by musl if wchar_t is already defined
+
+avoids errors like
+
+src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h:46:15: error: typedef redefinition with different types
+      ('int' vs 'unsigned int')
+typedef int   wchar_t;
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+index 2b3f76db86..cc80305775 100755
+--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
++++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+@@ -42,7 +42,7 @@
+ #include <ctype.h>
+ 
+ // Fix system header issue on Sun solaris and define required type by ourselves
+-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__)
++#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t)
+ typedef int   wchar_t;
+ #endif
+ 
+-- 
+2.14.1
+
meta-oe/recipes-support/mongodb/mongodb/arm64-support.patch new file +43 -0

43 lines not on this page · raw message

meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch new file +50 -0

50 lines not on this page · raw message

meta-oe/recipes-support/mongodb/mongodb_git.bb +4 -1
index 547f60850..d44d8d3c7 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788
 
 DEPENDS = "openssl libpcre libpcap zlib python boost"
 
-inherit scons
+inherit scons dos2unix
 
 PV = "3.4.6+git${SRCPV}"
 SRCREV = "c55eb86ef46ee7aede3b1e2a5d184a7df4bfb5b5"
@@ -18,6 +18,9 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \
            file://0001-Use-strerror_r-only-on-glibc-systems.patch \
            file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
            file://0003-Conditionalize-glibc-specific-strerror_r.patch \
+           file://arm64-support.patch \
+           file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
+           file://disable-hw-crc32-on-arm64-s390x.patch \
            "
 SRC_URI_append_libc-musl ="\
            file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
Signature · 1 line
2.14.1