mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-07-15 15:37:15 +00:00
arm/ts-sp-common: Workaround unused-but-set-variable errors
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>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user