diff mbox series

[2/2] arm/trusted-services: use zero padding for unions

Message ID 20250612130541.88191-2-jon.mason@arm.com
State New
Headers show
Series [1/2] CI/fvp-base-ts: append the testcases | expand

Commit Message

Jon Mason June 12, 2025, 1:05 p.m. UTC
GCC15 changed the behavior with how unions are initalized, which is
causing an issue with mbedtls in TS.  Change the behavior to the
previous way of doing things until the fix has been released.

Signed-off-by: Jon Mason <jon.mason@arm.com>
---
 meta-arm/recipes-security/trusted-services/ts-sp-common.inc | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/meta-arm/recipes-security/trusted-services/ts-sp-common.inc b/meta-arm/recipes-security/trusted-services/ts-sp-common.inc
index eb89127b766c..85109f06e48b 100644
--- a/meta-arm/recipes-security/trusted-services/ts-sp-common.inc
+++ b/meta-arm/recipes-security/trusted-services/ts-sp-common.inc
@@ -31,6 +31,10 @@  INSANE_SKIP:${PN}-dev += "ldflags"
 
 # Trusted Services SPs do not compile with clang
 TOOLCHAIN = "gcc"
+# FIXME - there is an issue with mbedtls unions and gcc15.  It has been
+# fixed in commit 4c26d7d54cf5f5dc1e63e0dd0b902fda05e7063f but that has
+# not been released yet.  Work around this issue here until that is out
+TARGET_CFLAGS += "-fzero-init-padding-bits=unions"
 
 # FORTIFY_SOURCE is a glibc feature. Disable it for all SPs as these do not use glibc.
 TARGET_CFLAGS:remove = "-D_FORTIFY_SOURCE=2"