aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-02-25 11:25:08 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2020-03-31 11:34:16 +0000
commit32b209bfea25f6372894edc528d526070bb14e22 (patch)
tree461634be56afcf6a09620b762a352560bd41d1b1 /Makefile
parent27c5e15ee4b5d4b57852667ef362d9821349547b (diff)
downloadarm-trusted-firmware-32b209bfea25f6372894edc528d526070bb14e22.tar.gz
Makefile: don't use $(CC) before value is explicit set
Unless specified in the environment, $(CC) expands to some generic host C compiler like cc or c99. We set our own value for $(CC), but only few lines later. Move the first use of the $(CC) variable behind the definition to correct this. Change-Id: I45344e063d21ddfe22b7ad77954e85c1c46087bd Fixes: 1684b8733 ("Use clang assembler when clang compiler is used") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 20 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index a1702beaa..2fb675949 100644
--- a/Makefile
+++ b/Makefile
@@ -84,26 +84,6 @@ endif
export Q ECHO
-# Process Debug flag
-$(eval $(call add_define,DEBUG))
-ifneq (${DEBUG}, 0)
- BUILD_TYPE := debug
- TF_CFLAGS += -g
-
- ifneq ($(findstring clang,$(notdir $(CC))),)
- ASFLAGS += -g
- else
- ASFLAGS += -g -Wa,--gdwarf-2
- endif
-
- # Use LOG_LEVEL_INFO by default for debug builds
- LOG_LEVEL := 40
-else
- BUILD_TYPE := release
- # Use LOG_LEVEL_NOTICE by default for release builds
- LOG_LEVEL := 20
-endif
-
# Default build string (git branch and commit)
ifeq (${BUILD_STRING},)
BUILD_STRING := $(shell git describe --always --dirty --tags 2> /dev/null)
@@ -243,6 +223,26 @@ TF_CFLAGS_aarch64 = $(march64-directive)
LD = $(LINKER)
endif
+# Process Debug flag
+$(eval $(call add_define,DEBUG))
+ifneq (${DEBUG}, 0)
+ BUILD_TYPE := debug
+ TF_CFLAGS += -g
+
+ ifneq ($(findstring clang,$(notdir $(CC))),)
+ ASFLAGS += -g
+ else
+ ASFLAGS += -g -Wa,--gdwarf-2
+ endif
+
+ # Use LOG_LEVEL_INFO by default for debug builds
+ LOG_LEVEL := 40
+else
+ BUILD_TYPE := release
+ # Use LOG_LEVEL_NOTICE by default for release builds
+ LOG_LEVEL := 20
+endif
+
ifeq (${AARCH32_INSTRUCTION_SET},A32)
TF_CFLAGS_aarch32 += -marm
else ifeq (${AARCH32_INSTRUCTION_SET},T32)