aboutsummaryrefslogtreecommitdiff
path: root/make_helpers/windows.mk
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2016-04-11 13:01:17 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2016-04-14 16:16:37 +0100
commit403973c95daa62b8411f789a8a93ef9e18b7f980 (patch)
treed5390c0506b5a4bd3c90c7576625f41bae32bb30 /make_helpers/windows.mk
parent43b97eda2592d19832da8e93b77fea94acc1c869 (diff)
downloadtrusted-firmware-a-403973c95daa62b8411f789a8a93ef9e18b7f980.tar.gz
Give user's compiler flags precedence over default ones
The user can provide additional CFLAGS to use when building TF. However, these custom CFLAGS are currently prepended to the standard CFLAGS that are hardcoded in the TF build system. This is an issue because when providing conflicting compiler flags (e.g. different optimisations levels like -O1 and -O0), the last one on the command line usually takes precedence. This means that the user flags get overriden. To address this problem, this patch separates the TF CFLAGS from the user CFLAGS. The former are now stored in the TF_CFLAGS make variable, whereas the CFLAGS make variable is untouched and reserved for the user. The order of the 2 sets of flags is enforced when invoking the compiler. Fixes ARM-Software/tf-issues#350 Change-Id: Ib189f44555b885f1dffbec6015092f381600e560
Diffstat (limited to 'make_helpers/windows.mk')
-rw-r--r--make_helpers/windows.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/make_helpers/windows.mk b/make_helpers/windows.mk
index 8ac82460f0..fe5e8c1fec 100644
--- a/make_helpers/windows.mk
+++ b/make_helpers/windows.mk
@@ -104,6 +104,6 @@ BUILT_TIME_DATE_STRING = const char build_message[] = "Built : "${BUILD_MESSAGE_
VERSION_STRING_MESSAGE = const char version_string[] = "${VERSION_STRING}";
define MAKE_BUILD_STRINGS
@echo $$(BUILT_TIME_DATE_STRING) $$(VERSION_STRING_MESSAGE) | \
- $$(CC) $$(CFLAGS) -x c - -o $1
+ $$(CC) $$(TF_CFLAGS) $$(CFLAGS) -x c - -o $1
endef