Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/ibm-sw-tpm2: disable -Werror
@ 2026-11-24 17:24 Giulio Benetti
  2026-11-24 22:45 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Giulio Benetti @ 2026-11-24 17:24 UTC (permalink / raw)
  To: buildroot; +Cc: Philippe Reynes, Giulio Benetti

Upstream builds with -Werror and with BR2_OPTIMIZE_G gcc spots a false
positive -Wmaybe-uninitialized, so the build fails with:

Unmarshal.c:4248:43: error: 'startSize' may be used uninitialized [-Werror=maybe-uninitialized]

Since upstream appends CFLAGS after its own flags, let's pass
-Wno-error through CFLAGS to avoid this kind of build failure.

Fixes:
https://autobuild.buildroot.org/results/ff4/ff4d551f62bdfcb5b828f8b1d910e8cc348da36d/
https://autobuild.buildroot.org/results/777/777bb0433d1a5529235162f301be2c32e377e957/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/ibm-sw-tpm2/ibm-sw-tpm2.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/package/ibm-sw-tpm2/ibm-sw-tpm2.mk b/package/ibm-sw-tpm2/ibm-sw-tpm2.mk
index 1f23bf7d83..abf2bd24ad 100644
--- a/package/ibm-sw-tpm2/ibm-sw-tpm2.mk
+++ b/package/ibm-sw-tpm2/ibm-sw-tpm2.mk
@@ -11,12 +11,16 @@ IBM_SW_TPM2_LICENSE = BSD-3-Clause
 IBM_SW_TPM2_LICENSE_FILES = LICENSE
 IBM_SW_TPM2_DEPENDENCIES = openssl
 
+IBM_SW_TPM2_MAKE_OPTS = \
+	$(TARGET_CONFIGURE_OPTS) \
+	CFLAGS="$(TARGET_CFLAGS) -Wno-error"
+
 define IBM_SW_TPM2_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(TARGET_CONFIGURE_OPTS)
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(IBM_SW_TPM2_MAKE_OPTS)
 endef
 
 define IBM_SW_TPM2_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(TARGET_CONFIGURE_OPTS) install \
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(IBM_SW_TPM2_MAKE_OPTS) install \
 		DESTDIR=$(TARGET_DIR)
 endef
 
-- 
2.47.3

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

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

end of thread, other threads:[~2026-11-24 22:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 17:24 [Buildroot] [PATCH] package/ibm-sw-tpm2: disable -Werror Giulio Benetti
2026-11-24 22:45 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox