forked from torizon/meta-toradex-torizon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request torizon#177 from EdTheBearded/tor-3476
[Scarthgap] Torizon maintenance
- Loading branch information
Showing
19 changed files
with
541 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
106 changes: 106 additions & 0 deletions
106
...-extended/fluentbit/files/0001-lib-Do-not-use-private-makefile-targets-in-CMakelist.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
From 940a4e270bb8879a78c0eac4daf997cb77e25b4b Mon Sep 17 00:00:00 2001 | ||
From: Niko Mauno <[email protected]> | ||
Date: Sun, 29 Sep 2024 12:00:00 +0000 | ||
Subject: [PATCH] lib: Do not use private makefile targets in CMakelists.txt | ||
|
||
By extending the scope of changes introduced in commit | ||
fc325524d50fe179b76f127243ab9e03ddbdaaa4 | ||
("build: CMakeLists.txt Do not use private makefile targets (#5819)") | ||
we mitigate the following error produced by BitBake in Yocto | ||
|
||
ERROR: fluentbit-3.1.9-r0 do_package_qa: QA Issue: File /usr/bin/fluent-bit in package fluentbit contains reference to TMPDIR [buildpaths] | ||
ERROR: fluentbit-3.1.9-r0 do_package_qa: Fatal QA errors were found, failing task. | ||
|
||
stemming from | ||
|
||
$ strings packages-split/fluentbit/usr/bin/fluent-bit | ||
... | ||
$(subst /yocto/upstream/build/tmp/work/cortexa57-poky-linux/fluentbit/3.1.9/git/,,$(abspath $<)) | ||
... | ||
|
||
Signed-off-by: Niko Mauno <[email protected]> | ||
|
||
Upstream-Status: Submitted [https://github.com/fluent/fluent-bit/pull/9450] | ||
--- | ||
lib/cfl/CMakeLists.txt | 8 ++------ | ||
lib/cmetrics/CMakeLists.txt | 8 ++------ | ||
lib/ctraces/CMakeLists.txt | 8 ++------ | ||
lib/monkey/CMakeLists.txt | 4 ---- | ||
4 files changed, 6 insertions(+), 22 deletions(-) | ||
|
||
diff --git a/lib/cfl/CMakeLists.txt b/lib/cfl/CMakeLists.txt | ||
index 2193cb29c..e2a5cba37 100644 | ||
--- a/lib/cfl/CMakeLists.txt | ||
+++ b/lib/cfl/CMakeLists.txt | ||
@@ -40,12 +40,8 @@ if(NOT MSVC) | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
endif() | ||
|
||
-# Define __FILENAME__ consistently across Operating Systems | ||
-if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'") | ||
-else() | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
-endif() | ||
+# Define __FILENAME__ | ||
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
|
||
|
||
|
||
diff --git a/lib/cmetrics/CMakeLists.txt b/lib/cmetrics/CMakeLists.txt | ||
index 4f2989106..9c40dadf4 100644 | ||
--- a/lib/cmetrics/CMakeLists.txt | ||
+++ b/lib/cmetrics/CMakeLists.txt | ||
@@ -60,12 +60,8 @@ if(NOT MSVC) | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | ||
endif() | ||
|
||
-# Define __CMT_FILENAME__ consistently across Operating Systems | ||
-if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'") | ||
-else() | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") | ||
-endif() | ||
+# Define __CMT_FILENAME__ | ||
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__") | ||
|
||
# Configuration options | ||
option(CMT_DEV "Enable development mode" No) | ||
diff --git a/lib/ctraces/CMakeLists.txt b/lib/ctraces/CMakeLists.txt | ||
index e92834e06..5cebb3b73 100644 | ||
--- a/lib/ctraces/CMakeLists.txt | ||
+++ b/lib/ctraces/CMakeLists.txt | ||
@@ -30,12 +30,8 @@ set(CTR_VERSION_MINOR 5) | ||
set(CTR_VERSION_PATCH 6) | ||
set(CTR_VERSION_STR "${CTR_VERSION_MAJOR}.${CTR_VERSION_MINOR}.${CTR_VERSION_PATCH}") | ||
|
||
-# Define __FILENAME__ consistently across Operating Systems | ||
-if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'") | ||
-else() | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
-endif() | ||
+# Define __FILENAME__ | ||
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
|
||
# Configuration options | ||
option(CTR_DEV "Enable development mode" No) | ||
diff --git a/lib/monkey/CMakeLists.txt b/lib/monkey/CMakeLists.txt | ||
index 95d8cc1e6..8c66887da 100644 | ||
--- a/lib/monkey/CMakeLists.txt | ||
+++ b/lib/monkey/CMakeLists.txt | ||
@@ -15,10 +15,8 @@ include(GNUInstallDirs) | ||
# Set default compiler options | ||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra") | ||
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath \$$<))\"'") | ||
-else() | ||
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
endif() | ||
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") | ||
|
||
# Monkey Version | ||
set(MK_VERSION_MAJOR 1) | ||
-- | ||
2.39.2 | ||
|
28 changes: 28 additions & 0 deletions
28
...-extended/fluentbit/files/0002-flb_info.h.in-Do-not-hardcode-compilation-directorie.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 71dab751a27a2e582b711de22873065dd28f4b65 Mon Sep 17 00:00:00 2001 | ||
From: Paulo Neves <[email protected]> | ||
Date: Thu, 28 Jul 2022 11:42:31 +0200 | ||
Subject: [PATCH] flb_info.h.in: Do not hardcode compilation directories | ||
|
||
Including the source dir in the header makes the header not | ||
reproducible and contaminates it with host builder paths. Instead | ||
make it take CMAKE_DEBUG_SRCDIR that can be set to a known | ||
reproducible value | ||
--- | ||
Upstream-Status: Pending | ||
|
||
include/fluent-bit/flb_info.h.in | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/include/fluent-bit/flb_info.h.in b/include/fluent-bit/flb_info.h.in | ||
index a89485c..2579afc 100644 | ||
--- a/include/fluent-bit/flb_info.h.in | ||
+++ b/include/fluent-bit/flb_info.h.in | ||
@@ -23,7 +23,7 @@ | ||
#define STR_HELPER(s) #s | ||
#define STR(s) STR_HELPER(s) | ||
|
||
-#define FLB_SOURCE_DIR "@CMAKE_SOURCE_DIR@" | ||
+#define FLB_SOURCE_DIR "@CMAKE_DEBUG_SRCDIR@" | ||
|
||
/* General flags set by CMakeLists.txt */ | ||
@FLB_BUILD_FLAGS@ |
41 changes: 41 additions & 0 deletions
41
recipes-extended/fluentbit/files/0003-CMakeLists.txt-Revise-init-manager-deduction.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
From c9969cc46e5e4d58db28c89b22bebe42d9f96962 Mon Sep 17 00:00:00 2001 | ||
From: Niko Mauno <[email protected]> | ||
Date: Mon, 21 Oct 2024 16:02:46 +0000 | ||
Subject: [PATCH] CMakeLists.txt: Revise init manager deduction | ||
|
||
The init manager deduction is not cross-compile friendly, so replace | ||
the host specific condition checks with placeholders that can be | ||
replaced in Yocto recipe. | ||
|
||
Signed-off-by: Niko Mauno <[email protected]> | ||
|
||
Upstream-Status: Inappropriate [configuration] | ||
--- | ||
src/CMakeLists.txt | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 084f2c57d..f0f35f00b 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -532,7 +532,7 @@ if(FLB_BINARY) | ||
set(SYSTEMD_UNITDIR /lib/systemd/system) | ||
endif() | ||
|
||
- if(SYSTEMD_UNITDIR) | ||
+ if(@INIT_MANAGER_IS_SYSTEMD@) | ||
set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service") | ||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/init/systemd.in" | ||
@@ -540,7 +540,7 @@ if(FLB_BINARY) | ||
) | ||
install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION ${SYSTEMD_UNITDIR}) | ||
install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary) | ||
- elseif(IS_DIRECTORY /usr/share/upstart) | ||
+ elseif(@INIT_MANAGER_IS_UPSTART@) | ||
set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf") | ||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/init/upstart.in" | ||
-- | ||
2.39.2 | ||
|
29 changes: 29 additions & 0 deletions
29
recipes-extended/fluentbit/files/0004-chunkio-Link-with-fts-library-with-musl.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From 63dbbad5978e5f5b0e7d42614999cb6b4ebcce10 Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <[email protected]> | ||
Date: Wed, 10 Aug 2022 01:27:16 -0700 | ||
Subject: [PATCH] chunkio: Link with fts library with musl | ||
|
||
Fixes | ||
cio_utils.c:(.text+0x64): undefined reference to `fts_read' | ||
|
||
Signed-off-by: Khem Raj <[email protected]> | ||
--- | ||
Upstream-Status: Pending | ||
|
||
lib/chunkio/src/CMakeLists.txt | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/lib/chunkio/src/CMakeLists.txt b/lib/chunkio/src/CMakeLists.txt | ||
index a4fc2d3..4244eb8 100644 | ||
--- a/lib/chunkio/src/CMakeLists.txt | ||
+++ b/lib/chunkio/src/CMakeLists.txt | ||
@@ -13,6 +13,7 @@ set(src | ||
) | ||
|
||
set(libs cio-crc32) | ||
+set(libs ${libs} fts) | ||
|
||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
set(src | ||
-- | ||
2.37.1 |
42 changes: 42 additions & 0 deletions
42
recipes-extended/fluentbit/files/0004-wasm-avoid-cmake-try_run-when-cross-compiling.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
From 5b6d274664f92a6c6083f4d27a1b1604a326f22c Mon Sep 17 00:00:00 2001 | ||
From: Patrick Wicki <[email protected]> | ||
Date: Sat, 5 Oct 2024 21:36:12 +0200 | ||
Subject: [PATCH] wasm: avoid cmake try_run when cross-compiling for x86 | ||
|
||
This fixes building the wasm micro runtime used when enabling wasm | ||
support in fluentbit. | ||
cmake try_run does not work when cross-compiling because the test program | ||
cannot be executed: | ||
|
||
| CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: | ||
| TEST_WRGSBASE_RESULT (advanced) | ||
| For details see .../fluentbit/3.1.9/build/TryRunResults.cmake | ||
| Write linear memory base addr to x86 GS register disabled | ||
| -- Configuring incomplete, errors occurred! | ||
|
||
Since we cannot run the test program, assume that the instruction is not | ||
available and disable the option. | ||
|
||
This patch is no longer needed once fluentbit updates WAMR, as it's been | ||
fixed in https://github.com/bytecodealliance/wasm-micro-runtime/pull/3066. | ||
|
||
Upstream-Status: Pending [https://github.com/fluent/fluent-bit/pull/8744] | ||
|
||
Signed-off-by: Patrick Wicki <[email protected]> | ||
--- | ||
.../build-scripts/config_common.cmake | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/lib/wasm-micro-runtime-WAMR-1.3.0/build-scripts/config_common.cmake b/lib/wasm-micro-runtime-WAMR-1.3.0/build-scripts/config_common.cmake | ||
index e73ebc85f..c2504e007 100644 | ||
--- a/lib/wasm-micro-runtime-WAMR-1.3.0/build-scripts/config_common.cmake | ||
+++ b/lib/wasm-micro-runtime-WAMR-1.3.0/build-scripts/config_common.cmake | ||
@@ -408,7 +408,7 @@ if (WAMR_BUILD_STATIC_PGO EQUAL 1) | ||
add_definitions (-DWASM_ENABLE_STATIC_PGO=1) | ||
message (" AOT static PGO enabled") | ||
endif () | ||
-if (WAMR_DISABLE_WRITE_GS_BASE EQUAL 1) | ||
+if (WAMR_DISABLE_WRITE_GS_BASE EQUAL 1 OR CMAKE_CROSSCOMPILING) | ||
add_definitions (-DWASM_DISABLE_WRITE_GS_BASE=1) | ||
message (" Write linear memory base addr to x86 GS register disabled") | ||
elseif (WAMR_BUILD_TARGET STREQUAL "X86_64" |
28 changes: 28 additions & 0 deletions
28
recipes-extended/fluentbit/files/0005-Use-posix-strerror_r-with-musl.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From f645128082117a0152a95b3dccd869a184b7513f Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <[email protected]> | ||
Date: Wed, 10 Aug 2022 01:23:48 -0700 | ||
Subject: [PATCH] Use posix strerror_r with musl | ||
|
||
Default with glibc is GNU extention of strerror_r | ||
where as musl uses posix variant, call that out | ||
|
||
Upstream-Status: Inappropriate [Need wider porting beyond linux/musl/glibc] | ||
Signed-off-by: Khem Raj <[email protected]> | ||
|
||
Resolved conflicts while upgrading recipe from v1.9.9 to v3.1.9. | ||
|
||
Signed-off-by: Niko Mauno <[email protected]> | ||
|
||
diff --git a/src/flb_network.c b/src/flb_network.c | ||
index d183209fd..41e0281b5 100644 | ||
--- a/src/flb_network.c | ||
+++ b/src/flb_network.c | ||
@@ -553,7 +553,7 @@ static int net_connect_async(int fd, | ||
/* Connection is broken, not much to do here */ | ||
#if ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ | ||
(defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0L >= 600L)) && \ | ||
- (!defined(_GNU_SOURCE)) | ||
+ (!defined(_GNU_SOURCE)) || (!defined(__GLIBC__)) | ||
ret = strerror_r(error, so_error_buf, sizeof(so_error_buf)); | ||
if (ret == 0) { | ||
str = so_error_buf; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.