| aaac0982 | 18-Aug-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
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
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-"
show more ...
|