All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] fluent-bit: needs C++
@ 2023-01-28 17:47 Thomas Devoogdt
  2023-01-28 17:47 ` [Buildroot] [PATCH] fluent-bit: fix -latomic on various platforms Thomas Devoogdt
  2023-01-28 17:47 ` [Buildroot] [PATCH] fluent-bit: needs arch support for wasm Thomas Devoogdt
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Devoogdt @ 2023-01-28 17:47 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

From: Thomas Devoogdt <thomas.devoogdt@gmail.com>

Fixes:
 - http://autobuild.buildroot.net/results/007/007c7c69e54b8ff663891da4535e2e95d40c42a2/build-end.log
 - http://autobuild.buildroot.net/results/ede/ede6f9fb67c0c26ff02e71a3d20e3d4344ea59f0/build-end.log

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@gmail.com>
---
 package/fluent-bit/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
index 11ceb55d4f..bd89c05faa 100644
--- a/package/fluent-bit/Config.in
+++ b/package/fluent-bit/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_FLUENT_BIT
 	bool "fluent-bit"
+	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LIBYAML
@@ -8,5 +9,5 @@ config BR2_PACKAGE_FLUENT_BIT
 
 	  https://github.com/fluent/fluent-bit
 
-comment "fluent-bit needs a glibc toolchain"
-	depends on !BR2_TOOLCHAIN_USES_GLIBC
+comment "fluent-bit needs a glibc toolchain w/ C++"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP
-- 
2.39.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] fluent-bit: fix -latomic on various platforms
  2023-01-28 17:47 [Buildroot] [PATCH] fluent-bit: needs C++ Thomas Devoogdt
@ 2023-01-28 17:47 ` Thomas Devoogdt
  2023-01-28 17:47 ` [Buildroot] [PATCH] fluent-bit: needs arch support for wasm Thomas Devoogdt
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Devoogdt @ 2023-01-28 17:47 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

From: Thomas Devoogdt <thomas.devoogdt@gmail.com>

/home/thomas/br-test-pkg/bootlin-nios2-glibc/host/opt/ext-toolchain/bin/../lib/gcc/nios2-buildroot-linux-gnu/10.3.0/../../../../nios2-buildroot-linux-gnu/bin/ld: /tmp/fluent-bit.6F9rEA.ltrans28.ltrans.o: undefined reference to symbol '__atomic_compare_exchange_8@@LIBATOMIC_1.0'
/home/thomas/br-test-pkg/bootlin-nios2-glibc/host/opt/ext-toolchain/bin/../lib/gcc/nios2-buildroot-linux-gnu/10.3.0/../../../../nios2-buildroot-linux-gnu/bin/ld: /home/thomas/br-test-pkg/bootlin-nios2-glibc/host/nios2-buildroot-linux-gnu/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@gmail.com>
---
 package/fluent-bit/fluent-bit.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index f7727834dd..c84042a0fa 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -41,6 +41,12 @@ FLUENT_BIT_CONF_OPTS += \
 	-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -U_FILE_OFFSET_BITS" \
 	-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -U_FILE_OFFSET_BITS"
 
+# Uses __atomic_compare_exchange_8
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+FLUENT_BIT_CONF_OPTS += \
+	-DCMAKE_EXE_LINKER_FLAGS=-latomic
+endif
+
 define FLUENT_BIT_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/fluent-bit/S99fluent-bit \
 		$(TARGET_DIR)/etc/init.d/S99fluent-bit
-- 
2.39.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] fluent-bit: needs arch support for wasm
  2023-01-28 17:47 [Buildroot] [PATCH] fluent-bit: needs C++ Thomas Devoogdt
  2023-01-28 17:47 ` [Buildroot] [PATCH] fluent-bit: fix -latomic on various platforms Thomas Devoogdt
@ 2023-01-28 17:47 ` Thomas Devoogdt
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Devoogdt @ 2023-01-28 17:47 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

From: Thomas Devoogdt <thomas.devoogdt@gmail.com>

See:
https://github.com/fluent/fluent-bit/tree/master/lib/wasm-micro-runtime-WAMR-1.1.1#supported-architectures-and-platforms

MIPS & RISCV32 are mentioned in the supported list,
but that seems to be wrong, so excluded those.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@gmail.com>
---
 package/fluent-bit/Config.in     | 11 +++++++++++
 package/fluent-bit/fluent-bit.mk |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
index bd89c05faa..0ed69e09ce 100644
--- a/package/fluent-bit/Config.in
+++ b/package/fluent-bit/Config.in
@@ -11,3 +11,14 @@ config BR2_PACKAGE_FLUENT_BIT
 
 comment "fluent-bit needs a glibc toolchain w/ C++"
 	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP
+
+if BR2_PACKAGE_FLUENT_BIT
+
+config BR2_PACKAGE_FLUENT_BIT_WASM
+	bool "Build with WASM runtime support"
+	default y
+	# see lib/wasm-micro-runtime-WAMR-1.1.1/README.md#supported-architectures-and-platforms
+	depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || BR2_aarch64 || BR2_aarch64_be || \
+		(BR2_riscv && BR2_RISCV_64) || BR2_xtensa || BR2_arc
+
+endif
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index c84042a0fa..6e9a33e02e 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -17,6 +17,12 @@ FLUENT_BIT_CONF_OPTS += \
 	-DFLB_CHUNK_TRACE=No \
 	-DFLB_BACKTRACE=No
 
+ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
+FLUENT_BIT_CONF_OPTS += -DFLB_WASM=Yes
+else
+FLUENT_BIT_CONF_OPTS += -DFLB_WASM=No
+endif
+
 ifeq ($(BR2_PACKAGE_LUAJIT),y)
 FLUENT_BIT_CONF_OPTS += -DFLB_LUAJIT=Yes
 FLUENT_BIT_DEPENDENCIES += luajit
-- 
2.39.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-28 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28 17:47 [Buildroot] [PATCH] fluent-bit: needs C++ Thomas Devoogdt
2023-01-28 17:47 ` [Buildroot] [PATCH] fluent-bit: fix -latomic on various platforms Thomas Devoogdt
2023-01-28 17:47 ` [Buildroot] [PATCH] fluent-bit: needs arch support for wasm Thomas Devoogdt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.