diff options
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit')
5 files changed, 110 insertions, 44 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-fluent-bit-shared-Link-with-lpthread.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-fluent-bit-shared-Link-with-lpthread.patch deleted file mode 100644 index e9eed24b..00000000 --- a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-fluent-bit-shared-Link-with-lpthread.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 62fa9bceb15a9d160dd5d624a6d46907c1019c5c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 8 Sep 2017 17:02:55 -0700 -Subject: [PATCH] fluent-bit-shared: Link with -lpthread - -This fixes a reference to pthread_atfork in libfluent-bit.so -otherwise we get undefined reference to the symbols in binaries -which are linked with libfluent-bit.so - -Fixes errors like -arm-bec-linux-gnueabi-ld: ../../bin/hello_world: hidden symbol `pthread_atfork' in /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/fluentbit/0.12.1-r0/recipe-sysroot/usr/lib/libpthread_nonshared.a(pthread_atfork.oS) is referenced by DSO - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - src/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 425a246..1264e59 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -168,7 +168,7 @@ set(FLB_DEPS - # Shared Library - if(NOT FLB_WITHOUT_SHARED_LIB) - add_library(fluent-bit-shared SHARED ${src}) -- target_link_libraries(fluent-bit-shared ${FLB_DEPS}) -+ target_link_libraries(fluent-bit-shared ${FLB_DEPS} -lpthread) - set_target_properties(fluent-bit-shared - PROPERTIES OUTPUT_NAME fluent-bit) - --- -2.14.1 - diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch new file mode 100644 index 00000000..1f36c657 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch @@ -0,0 +1,38 @@ +From be4032079c931704f52e29f5da5c01cde24ac842 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 16 Jan 2020 10:44:58 -0800 +Subject: [PATCH] ppc: Fix signature for co_create API + +Upstream-Status: Submitted [https://github.com/fluent/fluent-bit/pull/1886] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/flb_libco/ppc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/flb_libco/ppc.c b/lib/flb_libco/ppc.c +index e6536d56..533256b3 100644 +--- a/lib/flb_libco/ppc.c ++++ b/lib/flb_libco/ppc.c +@@ -279,7 +279,9 @@ static uint32_t* co_create_(unsigned size, uintptr_t entry) { + return t; + } + +-cothread_t co_create(unsigned int size, void (*entry_)(void)) { ++cothread_t co_create(unsigned int size, void (*entry_)(void), ++ size_t *out_size) { ++ + uintptr_t entry = (uintptr_t)entry_; + uint32_t* t = 0; + +@@ -325,7 +327,7 @@ cothread_t co_create(unsigned int size, void (*entry_)(void)) { + t[10] = (uint32_t)(sp >> shift >> shift); + t[11] = (uint32_t)sp; + } +- ++ *out_size = size; + return t; + } + +-- +2.25.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch new file mode 100644 index 00000000..8ffc3be3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/builtin-nan.patch @@ -0,0 +1,27 @@ +help complier to use intrinsics, clang in few cases e.g. aarch64 can not +and then requires linking with libm, its the only function needed from libm then +its good to avoid needing it. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/include/fluent-bit/stream_processor/flb_sp_timeseries.h ++++ b/include/fluent-bit/stream_processor/flb_sp_timeseries.h +@@ -207,7 +207,7 @@ void cb_forecast_calc(struct timeseries + result = b0 + b1 * (val->f64 + *forecast->latest_x); + break; + default: +- result = nan(""); ++ result = __builtin_nan(""); + break; + } + +@@ -283,7 +283,7 @@ void cb_forecast_r_calc(struct timeserie + result = ((val->i64 - b0) / b1) - *forecast->latest_x; + break; + default: +- result = nan(""); ++ result = __builtin_nan(""); + break; + } + diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch new file mode 100644 index 00000000..a1857899 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/cross-build-init-system-detection.patch @@ -0,0 +1,38 @@ +Define CMake variables to indicate init system for target +incase of cross compile, detecting systemd support based on +host directory structure is not right thing to do + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.kheem@gmail.com> + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -317,7 +317,7 @@ if(FLB_BINARY) + install(TARGETS fluent-bit-bin RUNTIME DESTINATION ${FLB_INSTALL_BINDIR}) + + # Detect init system, install upstart, systemd or init.d script +- if(IS_DIRECTORY /lib/systemd/system) ++ if(IS_DIRECTORY /lib/systemd/system OR FLB_SYSTEMD) + set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") + configure_file( + "${PROJECT_SOURCE_DIR}/init/systemd.in" +@@ -325,7 +325,7 @@ if(FLB_BINARY) + ) + install(FILES ${FLB_SYSTEMD_SCRIPT} DESTINATION /lib/systemd/system) + install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR}) +- elseif(IS_DIRECTORY /usr/share/upstart) ++ elseif(IS_DIRECTORY /usr/share/upstart OR FLB_UPSTART) + set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") + configure_file( + "${PROJECT_SOURCE_DIR}/init/upstart.in" +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,6 +70,8 @@ option(FLB_RECORD_ACCESSOR "Enable re + option(FLB_SYSTEM_STRPTIME "Use strptime in system libc" Yes) + option(FLB_STATIC_CONF "Build binary using static configuration") + option(FLB_STREAM_PROCESSOR "Enable Stream Processor" Yes) ++option(FLB_SYSTEMD "Enable systemd init system" No) ++option(FLB_UPSTART "Enable upstart init system" No) + option(FLB_CORO_STACK_SIZE "Set coroutine stack size") + + # Metrics: Experimental Feature, disabled by default on 0.12 series diff --git a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch index abaf92c0..67b3397a 100644 --- a/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch +++ b/external/meta-openembedded/meta-oe/recipes-extended/fluentbit/fluentbit/jemalloc.patch @@ -3,16 +3,14 @@ Add --with-jemalloc-prefix=je_ so it compiles on musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending -Index: fluent-bit-0.12.1/CMakeLists.txt -=================================================================== ---- fluent-bit-0.12.1.orig/CMakeLists.txt -+++ fluent-bit-0.12.1/CMakeLists.txt -@@ -325,7 +325,7 @@ if(FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -523,7 +523,7 @@ if(FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} # Link to Jemalloc as an external dependency ExternalProject_Add(jemalloc - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc -- CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc/configure ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> -+ CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc/configure --with-jemalloc-prefix=je_ ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1 +- CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> ++ CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} --with-jemalloc-prefix=je_ --with-lg-quantum=3 --enable-cc-silence --prefix=<INSTALL_DIR> CFLAGS=-std=gnu99\ -Wall\ -pipe\ -g3\ -O3\ -funroll-loops - BUILD_COMMAND ${MAKE} + BUILD_COMMAND $(MAKE) INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/ |