summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-02-22 12:01:48 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-02-22 22:23:20 +0100
commit3e830e4d410f2c963e360ae10d67c2769ff204f3 (patch)
tree80badf769c398ac9fc7bccc85702fa50d1cfbf9f
parentc7dee3d07eefe37f11892857485aa7a7ecc8a776 (diff)
recipes: disable -O4 and -O3 optimizations which produce invalid output
The linker complains about the object files not beeing for the ARMv7 architecture being linked
-rw-r--r--recipes/libogg.recipe10
-rw-r--r--recipes/libvorbis.recipe9
2 files changed, 19 insertions, 0 deletions
diff --git a/recipes/libogg.recipe b/recipes/libogg.recipe
index c3de19f..3233e94 100644
--- a/recipes/libogg.recipe
+++ b/recipes/libogg.recipe
@@ -1,4 +1,5 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
+from cerbero.utils import shell
class Recipe(recipe.Recipe):
@@ -12,3 +13,12 @@ class Recipe(recipe.Recipe):
def prepare(self):
if self.config.target_platform == Platform.IOS:
self.autoreconf = True
+
+ def configure(self):
+ if self.config.target_platform == Platform.IOS:
+ if self.config.target_arch in [Architecture.ARM, Architecture.ARMv7]:
+ # These optimizations make the linker think the object file is not
+ # for the arm architecture
+ shell.replace (os.path.join(self.build_dir, 'configure.in'),
+ {'-O4': '-O2'})
+ super(recipe.Recipe, self).configure()
diff --git a/recipes/libvorbis.recipe b/recipes/libvorbis.recipe
index 20af967..ebddafc 100644
--- a/recipes/libvorbis.recipe
+++ b/recipes/libvorbis.recipe
@@ -1,4 +1,5 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
+from cerbero.utils import shell
class Recipe(recipe.Recipe):
@@ -12,3 +13,11 @@ class Recipe(recipe.Recipe):
'include/vorbis', 'lib/pkgconfig/vorbis.pc',
'lib/pkgconfig/vorbisenc.pc', 'lib/pkgconfig/vorbisfile.pc']
+ def configure(self):
+ if self.config.target_platform == Platform.IOS:
+ if self.config.target_arch in [Architecture.ARM, Architecture.ARMv7]:
+ # These optimizations make the linker think the object file is not
+ # for the arm architecture
+ shell.replace (os.path.join(self.build_dir, 'configure'),
+ {'-O4': '-O2'})
+ super(recipe.Recipe, self).configure()