[PATCH 2/2] arm/ts-sp-common: Workaround unused-but-set-variable errors
Jon Mason <[email protected]> Tue, 2 Jun 2026 08:58:11 -0400
| Newsgroups | org.yoctoproject.lists.meta-arm |
|---|---|
| Message-ID | <[email protected]> |
With the new GCC, we're seeing the following error: | In file included from /builder/meta-arm/build/tmp/work/armv8-5a-poky-li= nux/ts-sp-smm-gateway/git/sources/ts/components/common/dlmalloc/malloc_wr= apper.c:62: | /builder/meta-arm/build/tmp/work/armv8-5a-poky-linux/ts-sp-smm-gateway/= git/sources/ts/components/common/dlmalloc/malloc.c: In function 'add_segm= ent': | /builder/meta-arm/build/tmp/work/armv8-5a-poky-linux/ts-sp-smm-gateway/= git/sources/ts/components/common/dlmalloc/malloc.c:4002:7: error: variabl= e 'nfences' set but not used [-Werror=3Dunused-but-set-variable=3D] | 4002 | int nfences =3D 0; | | ^~~~~~~ To workaround this issue, add "-Wno-error=3Dunused-but-set-variable" to T= ARGET_CFLAGS Signed-off-by: Jon Mason <[email protected]> --- meta-arm/recipes-security/trusted-services/ts-sp-common.inc | 1 + 1 file changed, 1 insertion(+) 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..114e5700a16e 100644 --- a/meta-arm/recipes-security/trusted-services/ts-sp-common.inc +++ b/meta-arm/recipes-security/trusted-services/ts-sp-common.inc @@ -33,6 +33,7 @@ INSANE_SKIP:${PN}-dev +=3D "ldflags" TOOLCHAIN =3D "gcc" =20 # FORTIFY_SOURCE is a glibc feature. Disable it for all SPs as these do = not use glibc. +TARGET_CFLAGS +=3D "-Wno-error=3Dunused-but-set-variable" TARGET_CFLAGS:remove =3D "-D_FORTIFY_SOURCE=3D2" OECMAKE_C_FLAGS:remove =3D "-D_FORTIFY_SOURCE=3D2" OECMAKE_CXX_FLAGS:remove =3D "-D_FORTIFY_SOURCE=3D2" --=20 2.50.1 (Apple Git-155)