From: Joel Rosdahl Date: Mon, 14 Jun 2010 21:33:58 +0000 (+0200) Subject: Pass -x with preprocessed language to real compiler if -x is given X-Git-Tag: v3.0~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de813673a6e91158aa2e1dacae60f53aea4e7fca;p=thirdparty%2Fccache.git Pass -x with preprocessed language to real compiler if -x is given Workaround for a bug in Apple's patched distcc; see . --- diff --git a/ccache.c b/ccache.c index 48e065579..6eb4582fc 100644 --- a/ccache.c +++ b/ccache.c @@ -1787,6 +1787,15 @@ static void process_args(int argc, char **argv, ARGS **preprocessor_args, } if (compile_preprocessed_source_code) { *compiler_args = args_copy(stripped_args); + if (explicit_language) { + /* + * Workaround for a bug in Apple's patched distcc -- it doesn't properly + * reset the language specified with -x, so if -x is given, we have to + * specify the preprocessed language explicitly. + */ + args_add(*compiler_args, "-x"); + args_add(*compiler_args, p_language_for_language(explicit_language)); + } } else { *compiler_args = args_copy(*preprocessor_args); }