summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-08-10 17:25:46 +0000
committerMåns Rullgård <mans@mansr.com>2009-08-10 17:25:46 +0000
commitaef6bd1bdd532dfdc8ecb45a012205953dbb13a2 (patch)
tree6de84db7f2806b2f213365f6159e70e18aeb8c26 /configure
parent8f0c157aaa554463c208209b974d2083dc21450a (diff)
Fix dependency generation with ccache/gcc
When running behind ccache, the output from -MMD is corrupted unless we also use the -MF and -MT flags. Since ccache is difficult to detect and gcc 2.x doesn't support the -MF and -MT flags, we always use the old dependency generation method when gcc 2.x is detected. Originally committed as revision 19620 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure b/configure
index 865b590847..0832edd424 100755
--- a/configure
+++ b/configure
@@ -1510,8 +1510,10 @@ filter_asflags=echo
if $cc -v 2>&1 | grep -qi ^gcc; then
cc_type=gcc
- CC_DEPFLAGS='-MMD'
- AS_DEPFLAGS='-MMD'
+ if ! $cc -dumpversion | grep -q '^2\.'; then
+ CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
+ AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
+ fi
elif $cc --version 2>/dev/null | grep -q Intel; then
cc_type=icc
CC_DEPFLAGS='-MMD'