| Message ID | 20260602125811.54843-2-jon.mason@arm.com |
|---|---|
| State | New |
| Headers | show |
| Series | [1/2] arm/tf-a-tests: Workaround GCC errors for 'unused-but-set-variable' | expand |
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 += "ldflags" TOOLCHAIN = "gcc" # FORTIFY_SOURCE is a glibc feature. Disable it for all SPs as these do not use glibc. +TARGET_CFLAGS += "-Wno-error=unused-but-set-variable" TARGET_CFLAGS:remove = "-D_FORTIFY_SOURCE=2" OECMAKE_C_FLAGS:remove = "-D_FORTIFY_SOURCE=2" OECMAKE_CXX_FLAGS:remove = "-D_FORTIFY_SOURCE=2"
With the new GCC, we're seeing the following error: | In file included from /builder/meta-arm/build/tmp/work/armv8-5a-poky-linux/ts-sp-smm-gateway/git/sources/ts/components/common/dlmalloc/malloc_wrapper.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_segment': | /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: variable 'nfences' set but not used [-Werror=unused-but-set-variable=] | 4002 | int nfences = 0; | | ^~~~~~~ To workaround this issue, add "-Wno-error=unused-but-set-variable" to TARGET_CFLAGS Signed-off-by: Jon Mason <jon.mason@arm.com> --- meta-arm/recipes-security/trusted-services/ts-sp-common.inc | 1 + 1 file changed, 1 insertion(+)