diff options
| author | Manish Pandey <manish.pandey2@arm.com> | 2026-09-07 21:33:45 +0000 |
|---|---|---|
| committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2026-09-07 21:33:45 +0000 |
| commit | 38269bb73d34b4a31100adf208a27e4c28e7d611 (patch) | |
| tree | 0d383dafca63c22ef6cc475ce347a76c641cca50 /make_helpers | |
| parent | 58f4fe3a0b8b97fd097aff2ec884cc77ac535650 (diff) | |
| parent | d7135a7214e49c6364ba518cdac343aa595a8db8 (diff) | |
| download | arm-trusted-firmware-master.tar.gz arm-trusted-firmware-master.zip | |
* changes:
feat(st): enable some warning flags
feat(build): enable -Wundef for C files if W >= 1
refactor(zlib): move zlib to a lib
refactor(compiler-rt): move compiler_rt to a lib
feat(build): introduce BL_FLAGS
fix(st-usb): staticize dwc3_dev_init
fix(st): staticize verify_signature
fix(stm32mp1): manage all flags for PKA algos
refactor(st-clock): remove STM32MP_M33_TDCID flag
fix(xlat): check definition of PLAT_XLAT_TABLES_DYNAMIC flag
fix(el3-runtime): add some missing prototypes
fix(scmi): remove scmi_msg_get_voltage_handler
fix(io): correct SIZE_MAX management
fix(libc): define __BSD_VISIBLE to 0
fix(build): move FIRME_SUPPORT flags to Makefile
Diffstat (limited to 'make_helpers')
| -rw-r--r-- | make_helpers/build_macros.mk | 2 | ||||
| -rw-r--r-- | make_helpers/cflags.mk | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index f52427ddd..033e7242e 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -407,7 +407,7 @@ $(eval BL_CFLAGS := $($(4)_CFLAGS)) $(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | $$$$(@D)/ $(BL_INCLUDE_DIRS:%=%/) $$(s)echo " CC $$<" - $$(q)$($(ARCH)-cc) $$(LTO_CFLAGS) $$(TF_CFLAGS) $(BL_CPPFLAGS) $(BL_CFLAGS) $(call MAKE_DEP,$(DEP),$(OBJ)) -c $$< -o $$@ + $$(q)$($(ARCH)-cc) $$(LTO_CFLAGS) $$(TF_CFLAGS) $(BL_CPPFLAGS) $(BL_CFLAGS) $$(BL_FLAGS) $(call MAKE_DEP,$(DEP),$(OBJ)) -c $$< -o $$@ -include $(DEP) diff --git a/make_helpers/cflags.mk b/make_helpers/cflags.mk index 3aacd4659..d00c8e17d 100644 --- a/make_helpers/cflags.mk +++ b/make_helpers/cflags.mk @@ -52,8 +52,6 @@ WARNING2 := $(WARNING1) WARNING2 += -Wold-style-definition WARNING2 += -Wmissing-prototypes WARNING2 += -Wmissing-format-attribute -# TF-A aims to comply with this eventually. Effort too large at present -WARNING2 += -Wundef # currently very involved and many platforms set this off WARNING2 += -Wunused-const-variable=2 @@ -69,6 +67,15 @@ WARNING3 += -Wpacked WARNING3 += -Wpointer-arith WARNING3 += -Wswitch-default +# The -Wundef cannot be easily handled through warning flags. +# This would bring warning for libs (compiler-rt, zlib). +# Instead add it to BL_FLAGS that is only used by MAKE_C macro. +# TODO: remove the W=1 check for -Wundef when all the related warnings +# are corrected. +ifeq ($(shell test $(W) -ge 1 && echo true),true) +BL_FLAGS += -Wundef +endif + cflags-common += $(WARNING$(W)) ifneq (${E},0) cflags-common += -Werror |
