Skip to contentSkip to conversation

package/fluent-bit: fix issue with uClibc-ng toolchains

PATCH In review Waldemar Brodkorb 2 participants 2 messages Aug 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/fluent-bit: fix issue with uClibc-ng toolchains

When SSP in the toolchain is disabled, the compilation will fail. So handle the situation for SSP enabled and disabled toolchains.

Fixes:
- http://autobuild.buildroot.net/results/c9e/c9ed27a51a68429b2ed2d8eebb1afc919ecbead1/

---
 package/fluent-bit/fluent-bit.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/fluent-bit/fluent-bit.mk +8 -0
index 5463682e45..a744a61c9b 100644
@@ -20,6 +20,14 @@ FLUENT_BIT_CONF_OPTS += \
 	-DFLB_PREFER_SYSTEM_LIBS=Yes \
 	-DFLB_BACKTRACE=No
 
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
+FLUENT_BIT_CONF_OPTS += -DFLB_SECURITY=Yes
+else
+FLUENT_BIT_CONF_OPTS += -DFLB_SECURITY=No
+endif
+endif
+
 ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
 FLUENT_BIT_WAMR_ARCH = $(call qstrip,$(BR2_PACKAGE_FLUENT_BIT_WASM_ARCH))
 
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Waldemar,

package/fluent-bit/fluent-bit.mk FLUENT_BIT_CONF_OPTS += \ · line 24

Quoted 2 lines · On Mon, 5 Aug 2024 08:11:40 +0200 Waldemar Brodkorb <[email protected]> wrote:
package/fluent-bit/fluent-bit.mk +2 -0
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)

BR2_TOOLCHAIN_BUILDROOT_USE_SSP only makes sense for internal toolchains, so that wouldn't do what's expected for external toolchains. Also putting this inside a uClibc conditional doesn't make sense, the SSP option is independent from the C library.

But overall, you should just unconditionally pass -DFLB_SECURITY=No, and let Buildroot decide which security hardening features to enable.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot