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

Jon Mason <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
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 <[email protected]>
---
 meta-arm/recipes-security/trusted-services/ts-sp-common.inc | 4 ++++
 1 file changed, 4 insertions(+)

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"
-- 
2.39.5 (Apple Git-154)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.