summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDan Handley <dan.handley@arm.com>2018-02-27 16:03:58 +0000
committerDan Handley <dan.handley@arm.com>2018-03-01 16:14:29 +0000
commitbc1a03c7a6db40a1ab86192675aa47d17afb7f4c (patch)
tree978a89490beddcd66df69f60bc1466b4d297777c /Makefile
parent97924e4521dbc1002f7b13302fd350c00da36b27 (diff)
Improve MULTI_CONSOLE_API deprecation warnings
For platforms that have not migrated to MULTI_CONSOLE_API == 1, there are a lot of confusing deprecated declaration warnings relating to use of console_init() and console_uninit(). Some of these relate to use by the generic code, not the platform code. These functions are not really deprecated but *removed* when MULTI_CONSOLE_API == 1. This patch consolidates these warnings into a single preprocessor warning. The __deprecated attribute is removed from the console_init() and console_uninit() declarations. For preprocessor warnings like this to not cause fatal build errors, this patch adds -Wno-error=cpp to the build flags when ERROR_DEPRECATED == 0. This option (and -Wno-error=deprecated-declarations) is now added to CPPFLAGS instead of TF_CFLAGS to ensure the build flags are used in the assembler as well as the compiler. This patch also disentangles the MULTI_CONSOLE_API and ERROR_DEPRECATED build flags by defaulting MULTI_CONSOLE_API to 0 instead of ERROR_DEPRECATED. This allows platforms that have not migrated to MULTI_CONSOLE_API to use ERROR_DEPRECATED == 1 to emit a more meaningful build error. Finally, this patch bans use of MULTI_CONSOLE_API == 1 and AARCH32, since the AArch32 console implementation does not support MULTI_CONSOLE_API == 1. Change-Id: If762165ddcb90c28aa7a4951aba70cb15c2b709c Signed-off-by: Dan Handley <dan.handley@arm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index db15930e..69f29e6c 100644
--- a/Makefile
+++ b/Makefile
@@ -374,6 +374,12 @@ ifeq ($(HW_ASSISTED_COHERENCY)-$(USE_COHERENT_MEM),1-1)
$(error USE_COHERENT_MEM cannot be enabled with HW_ASSISTED_COHERENCY)
endif
+ifneq ($(MULTI_CONSOLE_API), 0)
+ ifeq (${ARCH},aarch32)
+ $(error "Error: MULTI_CONSOLE_API is not supported for AArch32")
+ endif
+endif
+
################################################################################
# Process platform overrideable behaviour
################################################################################
@@ -588,9 +594,9 @@ all: msg_start
msg_start:
@echo "Building ${PLAT}"
-# Check if deprecated declarations should be treated as error or not.
+# Check if deprecated declarations and cpp warnings should be treated as error or not.
ifeq (${ERROR_DEPRECATED},0)
- TF_CFLAGS += -Wno-error=deprecated-declarations
+ CPPFLAGS += -Wno-error=deprecated-declarations -Wno-error=cpp
endif
# Expand build macros for the different images