Module: gas-preprocessor
Branch: master
Commit: bc7a8a67935a5cadcddcc192a173f818ad91c65f

Author:    Martin Storsjo <[email protected]>
Committer: Martin Storsjo <[email protected]>
Date:      Mon May 18 10:20:14 2015 +0300

Check for arch alias names when parsing the -arch option

This fixes running with "-arch ppc".

There's a similar check further below (which checks the arch value
after autodetecting it, if it wasn't set), but if this particular
check is removed, the -arch parameter won't be validated at all
when doing e.g. "gas-preprocessor.pl -arch foo -- gcc -v".

---

 gas-preprocessor.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 52ab556..1c2ce77 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -63,7 +63,7 @@ while (@ARGV) {
         $force_thumb = 1;
     } elsif ($opt eq "-arch") {
         $arch = shift;
-        die "unknown arch: '$arch'\n" if not exists $comments{$arch};
+        die "unknown arch: '$arch'\n" if not exists $canonical_arch{$arch};
     } elsif ($opt eq "-as-type") {
         $as_type = shift;
         die "unknown as type: '$as_type'\n" if $as_type !~ 
/^((apple-)?(gas|clang)|armasm)$/;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to