diff options
author | Peter Züger <zueger.peter@icloud.com> | 2023-12-21 00:23:50 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-12-22 11:07:59 +1100 |
commit | d69e69adb689de91f97bc184c9ebc1022d0e4fc1 (patch) | |
tree | 63e8113b0e2935b07673ec1db68fbdf6083cffa5 /py | |
parent | ce42c9ee1659ff86337a7f528332b4eaed6df0fc (diff) |
py/mkrules.mk: Fix dependency file generation for compiler wrappers.
When compiling with distcc, it does not understand the -MD flag on its own.
This fixes the interaction by explicitly adding the -MF option.
The error in distcc is described here under "Problems with gcc -MD":
https://www.distcc.org/faq.html
Signed-off-by: Peter Züger <zueger.peter@icloud.com>
Diffstat (limited to 'py')
-rw-r--r-- | py/mkrules.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk index 7ecb2a5f6..30483feb5 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -63,7 +63,7 @@ $(BUILD)/%.o: %.s define compile_c $(ECHO) "CC $<" -$(Q)$(CC) $(CFLAGS) -c -MD -o $@ $< || (echo -e $(HELP_BUILD_ERROR); false) +$(Q)$(CC) $(CFLAGS) -c -MD -MF $(@:.o=.d) -o $@ $< || (echo -e $(HELP_BUILD_ERROR); false) @# The following fixes the dependency file. @# See http://make.paulandlesley.org/autodep.html for details. @# Regex adjusted from the above to play better with Windows paths, etc. @@ -75,7 +75,7 @@ endef define compile_cxx $(ECHO) "CXX $<" -$(Q)$(CXX) $(CXXFLAGS) -c -MD -o $@ $< || (echo -e $(HELP_BUILD_ERROR); false) +$(Q)$(CXX) $(CXXFLAGS) -c -MD -MF $(@:.o=.d) -o $@ $< || (echo -e $(HELP_BUILD_ERROR); false) @# The following fixes the dependency file. @# See http://make.paulandlesley.org/autodep.html for details. @# Regex adjusted from the above to play better with Windows paths, etc. |