summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGovindraj Raja <govindraj.raja@arm.com>2023-10-17 08:13:03 -0500
committerGovindraj Raja <govindraj.raja@arm.com>2023-10-30 18:23:23 +0200
commitf0c813b7e850568094d4d5d4c693c71d2a88d28b (patch)
tree8027868fe8992f4ec5458e424166f9ddb8c27ce7
parentd638029ffc67c2767b47c930b0151d6451267b7d (diff)
build(refactor): avoid ifdef comparison
During build 'ENABLE_SPE_FOR_NS=0' is a valid build option however using ifdef would incorrectly translate this as enabled. Change-Id: I1c516fb68f6e382bb83c578e499cbb86869d9eca Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
-rw-r--r--make_helpers/arch_features.mk10
1 files changed, 5 insertions, 5 deletions
diff --git a/make_helpers/arch_features.mk b/make_helpers/arch_features.mk
index fbde8223d..f957f0ddb 100644
--- a/make_helpers/arch_features.mk
+++ b/make_helpers/arch_features.mk
@@ -185,7 +185,7 @@ ENABLE_SYS_REG_TRACE_FOR_NS ?= 0
ifeq (${ARCH},aarch64)
ENABLE_SPE_FOR_NS ?= 2
else ifeq (${ARCH},aarch32)
- ifdef ENABLE_SPE_FOR_NS
+ ifneq ($(or $(ENABLE_SPE_FOR_NS),0),0)
$(error ENABLE_SPE_FOR_NS is not supported for AArch32)
else
ENABLE_SPE_FOR_NS := 0
@@ -197,7 +197,7 @@ ifeq (${ARCH},aarch64)
ENABLE_SVE_FOR_NS ?= 2
# SVE is only supported on AArch64 so disable it on AArch32.
else ifeq (${ARCH},aarch32)
- ifdef ENABLE_SVE_FOR_NS
+ ifneq ($(or $(ENABLE_SVE_FOR_NS),0),0)
$(error ENABLE_SVE_FOR_NS is not supported for AArch32)
else
ENABLE_SVE_FOR_NS := 0
@@ -303,10 +303,10 @@ ENABLE_SVE_FOR_SWD ?= 0
ifeq (${ARCH},aarch64)
ENABLE_TRBE_FOR_NS ?= 0
else ifeq (${ARCH},aarch32)
- ifdef ENABLE_TRBE_FOR_NS
- $(error ENABLE_TRBE_FOR_NS is not supported for AArch32)
+ ifneq ($(or $(ENABLE_TRBE_FOR_NS),0),0)
+ $(error ENABLE_TRBE_FOR_NS is not supported for AArch32)
else
- ENABLE_TRBE_FOR_NS := 0
+ ENABLE_TRBE_FOR_NS := 0
endif
endif