media/libvpx/bug666931.patch
author Joey Armstrong <joey@mozilla.com>
Fri, 06 Apr 2012 14:07:46 -0400
changeset 91537 b23771ca17fd1362243886e1beeab45ce5dc87e5
parent 72264 938c253f031cdffd490289d134f704570bc39400
permissions -rw-r--r--
Bug 741839 - Consolidate wildcard calls in client.mk. r=ted

diff --git a/media/libvpx/build/make/ads2gas.pl b/media/libvpx/build/make/ads2gas.pl
--- a/media/libvpx/build/make/ads2gas.pl
+++ b/media/libvpx/build/make/ads2gas.pl
@@ -74,17 +74,20 @@ while (<STDIN>)
 
     # Convert INCLUDE to .INCLUDE "file"
     s/INCLUDE(\s*)(.*)$/.include $1\"$2\"/;
 
     # Code directive (ARM vs Thumb)
     s/CODE([0-9][0-9])/.code $1/;
 
     # No AREA required
-    s/^\s*AREA.*$/.text/;
+    # But ALIGNs in AREA must be obeyed
+    s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/;
+    # If no ALIGN, strip the AREA and align to 4 bytes
+    s/^\s*AREA.*$/.text\n.p2align 2/;
 
     # DCD to .word
     # This one is for incoming symbols
     s/DCD\s+\|(\w*)\|/.long $1/;
 
     # DCW to .short
     s/DCW\s+\|(\w*)\|/.short $1/;
     s/DCW(.*)/.short $1/;