diff --git a/media/libvpx/bug666931.patch b/media/libvpx/bug666931.patch new file mode 100644 index 000000000000..3e580735c03b --- /dev/null +++ b/media/libvpx/bug666931.patch @@ -0,0 +1,25 @@ +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 () + + # 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/; diff --git a/media/libvpx/build/make/ads2gas.pl b/media/libvpx/build/make/ads2gas.pl index 3dff048b559a..f8f03d1eb61f 100644 --- a/media/libvpx/build/make/ads2gas.pl +++ b/media/libvpx/build/make/ads2gas.pl @@ -79,7 +79,10 @@ while () 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 diff --git a/media/libvpx/update.sh b/media/libvpx/update.sh index 56748a7d7ca6..fcec84654aa9 100755 --- a/media/libvpx/update.sh +++ b/media/libvpx/update.sh @@ -326,3 +326,6 @@ patch -p3 < bug640935.patch # Patch to avoid text relocations on ARM patch -p3 < bug646815.patch + +# Patch to fix alignment problems with using ARM asm in Thumb mode. +patch -p3 < bug666931.patch