[oe] [PATCH][pyro][meta-oe 1/3] fluentbit: backport one patch from 0.12.0 to fix aarch64 build

Martin Jansa martin.jansa at gmail.com
Tue Jun 12 18:14:24 UTC 2018


* rocko and newer already have a version newer than 0.12.0
  so this change isn't needed there and 0.7.2 in morty doesn't
  need it as well.

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../fluentbit/fluentbit/aarch64.patch         | 64 +++++++++++++++++++
 .../fluentbit/fluentbit_0.11.3.bb             |  3 +-
 2 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/aarch64.patch

diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/aarch64.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/aarch64.patch
new file mode 100644
index 0000000000..071dff1285
--- /dev/null
+++ b/meta-oe/recipes-extended/fluentbit/fluentbit/aarch64.patch
@@ -0,0 +1,64 @@
+From a9af19d2679442b679536b51276334149b0b6655 Mon Sep 17 00:00:00 2001
+From: Eduardo Silva <eduardo at treasure-data.com>
+Date: Wed, 19 Apr 2017 12:35:53 -0600
+Subject: [PATCH] lib: flb_libco: merged changes for aarch64 support (#228)
+
+This patch merge the following changes:
+
+ - 534e405 armv8: on arm64 (aarch64) use sjlj backend
+ - fdcb558 sjlj: include missing settings and adapt API
+ - 9dab058 settings: tweak for Windows build
+
+These changes needs further testing on a armv8 platform.
+
+Upstream-Status: Backport [from 0.12.0 https://github.com/fluent/fluent-bit/commit/a9af19d2679442b679536b51276334149b0b6655]
+
+Signed-off-by: Eduardo Silva <eduardo at treasure-data.com>
+---
+ lib/flb_libco/libco.c | 2 ++
+ lib/flb_libco/sjlj.c  | 5 ++++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/lib/flb_libco/libco.c b/lib/flb_libco/libco.c
+index 13eb2379..2db92e95 100755
+--- a/lib/flb_libco/libco.c
++++ b/lib/flb_libco/libco.c
+@@ -14,6 +14,8 @@
+     #include "amd64.c"
+   #elif defined(__arm__)
+     #include "arm.c"
++  #elif defined(__aarch64__)
++    #include "sjlj.c"
+   #elif defined(_ARCH_PPC)
+     #include "ppc.c"
+   #elif defined(_WIN32)
+diff --git a/lib/flb_libco/sjlj.c b/lib/flb_libco/sjlj.c
+index dfa0aa45..36d110b7 100755
+--- a/lib/flb_libco/sjlj.c
++++ b/lib/flb_libco/sjlj.c
+@@ -15,6 +15,7 @@
+ #include <stdlib.h>
+ #include <signal.h>
+ #include <setjmp.h>
++#include "settings.h"
+ 
+ #ifdef __cplusplus
+ extern "C" {
+@@ -41,7 +42,8 @@ cothread_t co_active() {
+   return (cothread_t)co_running;
+ }
+ 
+-cothread_t co_create(unsigned int size, void (*coentry)(void)) {
++cothread_t co_create(unsigned int size, void (*coentry)(void),
++                     size_t *out_size) {
+   if(!co_running) co_running = &co_primary;
+ 
+   cothread_struct *thread = (cothread_struct*)malloc(sizeof(cothread_struct));
+@@ -78,6 +80,7 @@ cothread_t co_create(unsigned int size, void (*coentry)(void)) {
+     }
+   }
+ 
++  *out_size = size;
+   return (cothread_t)thread;
+ }
+ 
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit_0.11.3.bb b/meta-oe/recipes-extended/fluentbit/fluentbit_0.11.3.bb
index 8d756e6a40..a9433c284a 100644
--- a/meta-oe/recipes-extended/fluentbit/fluentbit_0.11.3.bb
+++ b/meta-oe/recipes-extended/fluentbit/fluentbit_0.11.3.bb
@@ -5,7 +5,8 @@ BUGTRACKER = "https://github.com/fluent/fluent-bit/issues"
 SRC_URI = "http://fluentbit.io/releases/0.11/fluent-bit-${PV}.tar.gz \
            file://0001-CMakeLists.txt-Add-AUTOCONF_HOST_OPT-to-help-cross-c.patch \
            file://0002-msgpack-Add-comment-for-intended-fallthrough.patch \
-           "
+           file://aarch64.patch \
+"
 SRC_URI[md5sum] = "9383262339412782b80cc49e7ad15609"
 SRC_URI[sha256sum] = "eb8a85c656fa60682b0bf8dd1ad58d848cd251dab4f35a6777acd552c65b0511"
 
-- 
2.17.1




More information about the Openembedded-devel mailing list