aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2014-08-18 19:19:36 +0200
committerJerome Forissier <jerome.forissier@linaro.org>2014-08-18 20:03:06 +0200
commitaaac0982cb33452651803f65e309914e9b8ce67e (patch)
tree4e5a45c539d1121dbdab9008872e1898af9a9037 /Makefile
parent27cbcc57098afcb97cfdcd01647c61180e0e849f (diff)
mk/compile.mk: simplify dependency generation; better support ccache
This commit modifies the compilation flags that are used to generate dependency files (*.o.d). Rather than using the preprocessor's -MD flag (-Wp,-MD,<depfile>), we now use the frontend's equivalent (-MD -MF <depfile> -MT <target>). There are three reasons for doing so: 1. The GCC man page recommends against using -Wp, because "the preprocessor's direct interface is undocumented and subject to change". 2. The new flags generate the correct rule directly, including the subdirectory in front of the object name, so scripts/fixdep is not needed anymore. 3. ccache (3.1.9) would not handle -Wp,-MD as expected. It would preserve the directory prefix, so that we would end up with an invalid path after the fixdep phase, making the rules useless. With this patch, OP-TEE builds fine with ccache: make -j3 CROSS_COMPILE="ccache arm-linux-gnueabihf-"
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 0 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6b3358a9..06609ea4 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,6 @@ O ?= out/$(ARCH)-plat-$(PLATFORM)
arch_$(ARCH) := y
-cmd-fixdep := ./scripts/fixdep
-
ifneq ($O,)
out-dir := $O/
endif