summaryrefslogtreecommitdiff
path: root/make_helpers
diff options
context:
space:
mode:
authorChris Kay <chris.kay@arm.com>2026-08-20 03:50:12 +0100
committerChris Kay <chris.kay@arm.com>2026-08-20 17:52:07 +0100
commitda9a6cfb002856adf62aa551b8ee36839cfe0141 (patch)
tree74e808684c6223c9a1eb9790281d3aa683ba79e9 /make_helpers
parent56a7578d9e8fdf27156bc55f011f80f19164c643 (diff)
downloadarm-trusted-firmware-da9a6cfb002856adf62aa551b8ee36839cfe0141.tar.gz
arm-trusted-firmware-da9a6cfb002856adf62aa551b8ee36839cfe0141.zip
refactor(build): remove redundant `eval` calls
Execute expressions directly without `eval` when they do not expand to Make syntax (i.e. where `eval` is provably pointless). Additionally, remove the obsolete `eval` feature check - we mandate at least GNU Make 4.3, which always supports it. Change-Id: I26f1723f084d0428a2cbe336e76f0765a9818a5a Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'make_helpers')
-rw-r--r--make_helpers/arch_features.mk2
-rw-r--r--make_helpers/armv7-a-cpus.mk4
-rw-r--r--make_helpers/build_macros.mk14
3 files changed, 7 insertions, 13 deletions
diff --git a/make_helpers/arch_features.mk b/make_helpers/arch_features.mk
index 2e079cfe4..ae95fdc8f 100644
--- a/make_helpers/arch_features.mk
+++ b/make_helpers/arch_features.mk
@@ -149,4 +149,4 @@ endif
# Force all FEAT_* in FEAT_LIST to FEAT_STATE_ALWAYS (1), overriding any
# previous settings from platform makefiles.
-$(eval $(call set_ones, ${sort ${FEAT_LIST}}))
+$(call set_ones, ${sort ${FEAT_LIST}})
diff --git a/make_helpers/armv7-a-cpus.mk b/make_helpers/armv7-a-cpus.mk
index a8e9d5078..6835d5aa4 100644
--- a/make_helpers/armv7-a-cpus.mk
+++ b/make_helpers/armv7-a-cpus.mk
@@ -44,13 +44,13 @@ endif
# Defined if ARMv7 core supports the Generic Timer extension.
ifeq ($(filter yes,$(ARM_CORTEX_A7) $(ARM_CORTEX_A12) $(ARM_CORTEX_A15) $(ARM_CORTEX_A17)),yes)
-$(eval $(call add_defines,\
+$(call add_defines,\
$(sort \
ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING \
ARMV7_SUPPORTS_VIRTUALIZATION \
ARMV7_SUPPORTS_GENERIC_TIMER \
ARMV7_SUPPORTS_VFP \
-)))
+))
endif
ifeq ($(ARM_CORTEX_A5),yes)
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 218b615d2..f52427ddd 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -4,12 +4,6 @@
# SPDX-License-Identifier: BSD-3-Clause
#
-# Report an error if the eval make function is not available.
-$(eval eval_available := T)
-ifneq (${eval_available},T)
- $(error This makefile only works with a Make program that supports $$(eval))
-endif
-
# A user defined function to recursively search for a filename below a directory
# $1 is the directory root of the recursive search (blank for current directory).
# $2 is the file name to search for.
@@ -96,7 +90,7 @@ endef
# Convenience function for verifying options have boolean values
# $(eval $(call assert_booleans,FOO BOO)) will assert FOO and BOO for 0 or 1 values
define assert_booleans
- $(foreach bool,$1,$(eval $(call assert_boolean,$(bool))))
+ $(foreach bool,$1,$(call assert_boolean,$(bool)))
endef
0-9 := 0 1 2 3 4 5 6 7 8 9
@@ -112,7 +106,7 @@ endef
# Convenience function for verifying options have numeric values
# $(eval $(call assert_numerics,FOO BOO)) will assert FOO and BOO contain numeric values
define assert_numerics
- $(foreach num,$1,$(eval $(call assert_numeric,$(num))))
+ $(foreach num,$1,$(call assert_numeric,$(num)))
endef
# Convenience function to check for a given linker option. A call to
@@ -538,7 +532,7 @@ define MAKE_LIB
$(eval SOURCES := $(LIB$(BL)_SRCS))
$(eval OBJS := $(addprefix $(BUILD_DIR)/,$(call SOURCES_TO_OBJS,$(SOURCES))))
-$(eval $(call MAKE_LIB_OBJS,$(BUILD_DIR),$(SOURCES),$(1),$(BL),$(2)))
+$(call MAKE_LIB_OBJS,$(BUILD_DIR),$(SOURCES),$(1),$(BL),$(2))
libraries: ${LIB_DIR}/lib$(1).a
ifeq ($($(ARCH)-ld-id),arm-link)
@@ -595,7 +589,7 @@ define MAKE_BL
$(eval LINKER_SCRIPTS := $(call linker_script_path,$(LINKER_SCRIPT_SOURCES)))
$(eval GNU_LINKER_ARGS := $(call ld_prefix,-Map=$(MAPFILE)) $(foreach script,$(LINKER_SCRIPTS) $(DEFAULT_LINKER_SCRIPT), $(call ld_prefix,--script $(script))))
-$(eval $(call MAKE_OBJS,$(BUILD_DIR),$(SOURCES),$(1),$(BL)))
+$(call MAKE_OBJS,$(BUILD_DIR),$(SOURCES),$(1),$(BL))
# Generate targets to preprocess each required linker script
$(eval $(foreach source,$(DEFAULT_LINKER_SCRIPT_SOURCE) $(LINKER_SCRIPT_SOURCES), \