From: Johann Date: Sat, 12 Mar 2022 22:02:03 +0000 (+0900) Subject: ads2gas_apple.pl: remove gcc-isms X-Git-Tag: v1.12.0-rc1~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ee32be84be7dfa2b0c00ba04f4d85503d46e3f3;p=libvpx ads2gas_apple.pl: remove gcc-isms The gcc assembler was incompatible for a long time. It is now based on clang and accepts more modern syntax, although not enough to remove the script entirely. Change-Id: I667d29dca005ea02a995c1025c45eb844081f64b --- diff --git a/build/make/ads2gas_apple.pl b/build/make/ads2gas_apple.pl index 0a3fccc4b..af10b436a 100755 --- a/build/make/ads2gas_apple.pl +++ b/build/make/ads2gas_apple.pl @@ -94,35 +94,17 @@ while () s/\bENDP\b//g; # EQU directive - s/(\S+\s+)EQU(\s+\S+)/.set $1, $2/; + s/(\S+\s+)EQU(\s+\S+)/.equ $1, $2/; # Begin macro definition if (/\bMACRO\b/) { # Process next line down, which will be the macro definition $_ = ; - - $trimmed = trim($_); - - # remove commas that are separating list - $trimmed =~ s/,//g; - - # string to array - @incoming_array = split(/\s+/, $trimmed); - - print ".macro @incoming_array[0]\n"; - - # remove the first element, as that is the name of the macro - shift (@incoming_array); - - @macro_aliases{@incoming_array} = @mapping_list; - - next; + s/^/.macro/; + s/\$//g; # Remove $ from the variables in the declaration } - while (($key, $value) = each(%macro_aliases)) { - $key =~ s/\$/\\\$/; - s/$key\b/$value/g; - } + s/\$/\\/g; # Use \ to reference formal parameters # End macro definition s/\bMEND\b/.endm/; # No need to tell it where to stop assembling