On Wed, 7 May 2014, Janne Grunau wrote:
---
gas-preprocessor.pl | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index d6d12c3..f4a55a9 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -126,7 +126,17 @@ if ((grep /^-c$/, @gcc_cmd) && !(grep /^-o/, @gcc_cmd)) {
}
}
}
-@preprocess_c_cmd = map { /\.(o|obj)$/ ? "-" : $_ } @preprocess_c_cmd;
+# replace only the '-o' argument with '-', avoids rewriting the make dependency
+# target specified with -MT to '-'
+my $index = 1;
+while ($index < $#preprocess_c_cmd) {
+ if ($preprocess_c_cmd[$index] eq "-o") {
+ $index++;
+ $preprocess_c_cmd[$index] = "-";
+ }
+ $index++;
+}
+
my $tempfile;
if ($as_type ne "armasm") {
@gcc_cmd = map { /\.[csS]$/ ? qw(-x assembler -) : $_ } @gcc_cmd;
--
1.9.2
Looks ok to me
For the record, which kind of dependency generation options are used for
gaspp depends on how it's configured. If enabled implicitly (as in the ios
builds), the dependency generation is set up according to the normal
compiler. If specified manually (with --as="gaspp armasm" or so),
configure tries to detect the dependency generation mechanism for this
(and often ends up with something that doesn't produce proper
dependencies).
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel