Filter them out from the preprocessor invocation, and don't remove
them based on matching the "^-m" pattern.
As an alternative, we could also have gas-preprocessor.pl implicitly
add this option if the option "-arm64EC" is found, but requiring
the user to pass "-machine arm64ec" explicitly is more transparent.
---
gas-preprocessor.pl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 62c1a04..234c005 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -104,13 +104,17 @@ if ($as_type eq "armasm") {
$preprocess_c_cmd[0] = "cpp";
- # Remove -ignore XX parameter pairs from preprocess_c_cmd
+ # Remove -ignore XX and -machine XX parameter pairs from preprocess_c_cmd
my $index = 1;
while ($index < $#preprocess_c_cmd) {
if ($preprocess_c_cmd[$index] eq "-ignore" and $index + 1 <
$#preprocess_c_cmd) {
splice(@preprocess_c_cmd, $index, 2);
next;
}
+ if ($preprocess_c_cmd[$index] eq "-machine" and $index + 1 <
$#preprocess_c_cmd) {
+ splice(@preprocess_c_cmd, $index, 2);
+ next;
+ }
$index++;
}
if (grep /^-MM$/, @preprocess_c_cmd) {
@@ -195,7 +199,8 @@ if ($as_type ne "armasm") {
# which doesn't support any of the common compiler/preprocessor options.
@gcc_cmd = grep ! /^-D/, @gcc_cmd;
@gcc_cmd = grep ! /^-U/, @gcc_cmd;
- @gcc_cmd = grep ! /^-m/, @gcc_cmd;
+ # Remove -m* parameters, except for -machine, which is a valid armasm
option.
+ @gcc_cmd = grep ! /^-m(?!achine)/, @gcc_cmd;
@gcc_cmd = grep ! /^-M/, @gcc_cmd;
@gcc_cmd = grep ! /^-c$/, @gcc_cmd;
@gcc_cmd = grep ! /^-I/, @gcc_cmd;
--
2.43.0
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]