aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-12-22 12:39:55 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-05 11:25:13 +0900
commitf2e1d57e43a0688901cc5f83546c66079fce5451 (patch)
tree1744d9549b41fef3793a24993481d1d23f5ffb1d
parentcef7b3ce8b26cd94e7e71ddeefc039451525b780 (diff)
downloadplatform_external_arm-trusted-firmware-f2e1d57e43a0688901cc5f83546c66079fce5451.tar.gz
platform_external_arm-trusted-firmware-f2e1d57e43a0688901cc5f83546c66079fce5451.tar.bz2
platform_external_arm-trusted-firmware-f2e1d57e43a0688901cc5f83546c66079fce5451.zip
Build: exclude -c flag from TF_CFLAGS
The -c flag should not be included in the global variable TF_CFLAGS; it should be specified in the build rule only when its target is a *.o file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--Makefile2
-rw-r--r--make_helpers/build_macros.mk2
-rw-r--r--make_helpers/windows.mk2
3 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e8716e566..bb46afcb4 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,7 @@ ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
${DEFINES} ${INCLUDES}
TF_CFLAGS += -nostdinc -ffreestanding -Wall \
-Werror -Wmissing-include-dirs \
- -std=c99 -c -Os \
+ -std=c99 -Os \
$(TF_CFLAGS_$(ARCH)) \
${DEFINES} ${INCLUDES}
TF_CFLAGS += -ffunction-sections -fdata-sections
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 16bdd7883..4ec060b64 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -358,7 +358,7 @@ ifdef MAKE_BUILD_STRINGS
else
@echo 'const char build_message[] = "Built : "$(BUILD_MESSAGE_TIMESTAMP); \
const char version_string[] = "${VERSION_STRING}";' | \
- $$(CC) $$(TF_CFLAGS) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o
+ $$(CC) $$(TF_CFLAGS) $$(CFLAGS) -xc -c - -o $(BUILD_DIR)/build_message.o
endif
$$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \
$(BUILD_DIR)/build_message.o $(OBJS)
diff --git a/make_helpers/windows.mk b/make_helpers/windows.mk
index fe5e8c1fe..c4317d53d 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) $$(TF_CFLAGS) $$(CFLAGS) -x c - -o $1
+ $$(CC) $$(TF_CFLAGS) $$(CFLAGS) -x c -c - -o $1
endef