summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2014-04-19 02:23:19 +1000
committerJan Schmidt <jan@centricular.com>2014-04-19 04:19:40 +1000
commit41987882230328200e517110b519f9c05a18e99f (patch)
treec4a4d0fe3330ba811feee9101b9e0e60783be8cc
parent3341917da6b8de30f313a6896d87ed3144bfb743 (diff)
Add -mincoming-stack-boundary=4 to the libav cflags.
Android doesn't guarantee stack alignment, but libav already has compiler directives to force the stack alignment. This frees up a register that lets the asm build. Suggested as a fix by VLC: https://mailman.videolan.org/pipermail/vlc-commits/2012-July/015881.html I've tested as well as I can without actual hardware. SSSE3 seems broken on the android emulator, but I think that's the emulator - the other accelerations work fine. Fixes bug #724105
-rw-r--r--recipes/gst-libav-1.0-static.recipe5
-rw-r--r--recipes/gst-libav-1.0.recipe5
2 files changed, 10 insertions, 0 deletions
diff --git a/recipes/gst-libav-1.0-static.recipe b/recipes/gst-libav-1.0-static.recipe
index 3acfb0c5..03c932af 100644
--- a/recipes/gst-libav-1.0-static.recipe
+++ b/recipes/gst-libav-1.0-static.recipe
@@ -25,6 +25,7 @@ class Recipe(custom.GStreamerStatic):
if self.config.target_platform != Platform.LINUX:
self.configure_options += ' --disable-gtk-doc'
+
if self.config.target_platform == Platform.DARWIN:
if self.config.target_arch == Architecture.X86_64:
asflags = ' -arch x86_64 -m64'
@@ -33,6 +34,10 @@ class Recipe(custom.GStreamerStatic):
elif self.config.target_arch == Architecture.PPC:
asflags = ' -arch ppc'
self.configure_options += ' ASFLAGS="%s"' % asflags
+ elif self.config.target_platform == Platform.ANDROID:
+ if self.config.target_arch == Architecture.X86:
+ # libav internally aligns stacks, while Android doesn't
+ self.configure_options += ' --with-libav-extra-configure="--extra-cflags=\'-mincoming-stack-boundary=4\'"'
super(Recipe, self).prepare()
diff --git a/recipes/gst-libav-1.0.recipe b/recipes/gst-libav-1.0.recipe
index da0bbcd2..a1de53cc 100644
--- a/recipes/gst-libav-1.0.recipe
+++ b/recipes/gst-libav-1.0.recipe
@@ -24,6 +24,7 @@ class Recipe(recipe.Recipe):
if self.config.target_platform != Platform.LINUX:
self.configure_options += ' --disable-gtk-doc'
+
if self.config.target_platform == Platform.DARWIN:
if self.config.target_arch == Architecture.X86_64:
asflags = ' -arch x86_64 -m64'
@@ -32,6 +33,10 @@ class Recipe(recipe.Recipe):
elif self.config.target_arch == Architecture.PPC:
asflags = ' -arch ppc'
self.configure_options += ' ASFLAGS="%s"' % asflags
+ elif self.config.target_platform == Platform.ANDROID:
+ if self.config.target_arch == Architecture.X86:
+ # libav internally aligns stacks, while Android doesn't
+ self.configure_options += ' --with-libav-extra-configure="--extra-cflags=\'-mincoming-stack-boundary=4\'"'
def configure(self):
super(recipe.Recipe, self).configure()