summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-05 22:54:59 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-05 22:54:59 +0200
commitd82ffa9a1b9311de8e6708b78e38006f2ae77546 (patch)
tree5344f3e40c6ee3922f6cd0e7e92e8d3b990cd3e3 /config
parent0d0ee447e8838d634f40193d33c7bd5b78aebd39 (diff)
Add support for ARMv7 architecture
Diffstat (limited to 'config')
-rw-r--r--config/android.config12
1 files changed, 9 insertions, 3 deletions
diff --git a/config/android.config b/config/android.config
index bb45d18..559b95b 100644
--- a/config/android.config
+++ b/config/android.config
@@ -6,7 +6,7 @@
import os
from cerbero.config import Architecture, DistroVersion
-if target_arch == Architecture.ARM:
+if target_arch == Architecture.ARM or target_arch == Architecture.ARMv7:
prefix=prefix or os.path.expanduser('~/cerbero/dist/android_arm')
sources=sources or os.path.expanduser('~/cerbero/sources/android_arm')
cache_file= cache_file or 'android_arm'
@@ -35,8 +35,14 @@ ccache = use_ccache and 'ccache ' or ''
# Toolchain environment
os.environ['CPPFLAGS'] = "--sysroot=%s -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -DANDROID -DPIC -I%s/usr/include" % (sysroot, sysroot)
-os.environ['CFLAGS'] += "--sysroot=%s -fPIC -DPIC -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -I%s/usr/include" % (sysroot, sysroot)
-os.environ['LDFLAGS'] = "--sysroot=%s -fPIC -Wl,-no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc -Wl,-dynamic-linker,/system/bin/linker -L%s/usr/lib %s" % (sysroot, sysroot, os.environ.get('LDFLAGS', ''))
+os.environ['CFLAGS'] += "--sysroot=%s -fPIC -DPIC -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -I%s/usr/include " % (sysroot, sysroot)
+os.environ['LDFLAGS'] = "--sysroot=%s -fPIC -Wl,-no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc -Wl,-dynamic-linker,/system/bin/linker -L%s/usr/lib %s " % (sysroot, sysroot, os.environ.get('LDFLAGS', ''))
+
+if target_arch == Architecture.ARM:
+ os.environ['CFLAGS'] += "-march=armv5te -mtune=xscale -msoft-float "
+elif target_arch == Architecture.ARMv7:
+ os.environ['CFLAGS'] += "-march=armv7-a -mfloat-abi=softfp -mfpu=vfp "
+ os.environ['LDFLAGS'] += "-Wl,--fix-cortex-a8"
os.environ['CXXFLAGS']=os.environ['CFLAGS']
def cmd(command):