Skip to content

Commit bc7a8a6

Browse files
committed
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".
1 parent caccd79 commit bc7a8a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gas-preprocessor.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ ()
6363
$force_thumb = 1;
6464
} elsif ($opt eq "-arch") {
6565
$arch = shift;
66-
die "unknown arch: '$arch'\n" if not exists $comments{$arch};
66+
die "unknown arch: '$arch'\n" if not exists $canonical_arch{$arch};
6767
} elsif ($opt eq "-as-type") {
6868
$as_type = shift;
6969
die "unknown as type: '$as_type'\n" if $as_type !~ /^((apple-)?(gas|clang)|armasm)$/;

0 commit comments

Comments
 (0)