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>
This commit is contained in:
Govindraj Raja 2023-10-17 08:13:03 -05:00
parent d638029ffc
commit f0c813b7e8

View file

@ -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,7 +303,7 @@ ENABLE_SVE_FOR_SWD ?= 0
ifeq (${ARCH},aarch64)
ENABLE_TRBE_FOR_NS ?= 0
else ifeq (${ARCH},aarch32)
ifdef ENABLE_TRBE_FOR_NS
ifneq ($(or $(ENABLE_TRBE_FOR_NS),0),0)
$(error ENABLE_TRBE_FOR_NS is not supported for AArch32)
else
ENABLE_TRBE_FOR_NS := 0