diff --git a/common.gypi b/common.gypi index 6ded41451..b2bf16bc4 100644 --- a/common.gypi +++ b/common.gypi @@ -3708,19 +3708,39 @@ ['target_arch=="arm"', { 'target_conditions': [ ['_toolset=="target"', { - 'cflags_cc': [ - # The codesourcery arm-2009q3 toolchain warns at that the ABI - # has changed whenever it encounters a varargs function. This - # silences those warnings, as they are not helpful and - # clutter legitimate warnings. - '-Wno-abi', - ], 'conditions': [ + ['clang==0', { + 'cflags_cc': [ + # The codesourcery arm-2009q3 toolchain warns at that the ABI + # has changed whenever it encounters a varargs function. This + # silences those warnings, as they are not helpful and + # clutter legitimate warnings. + '-Wno-abi', + ], + }], + ['clang==1 and arm_arch!=""', { + 'cflags': [ + '-target arm-linux-gnueabihf', + # TODO(sbc): Remove this once the warning in libvpx is fixed: + # https://code.google.com/p/webm/issues/detail?id=829 + '-Wno-absolute-value', + ], + 'ldflags': [ + '-target arm-linux-gnueabihf', + ], + }], ['arm_arch!=""', { 'cflags': [ '-march=<(arm_arch)', ], }], + ['clang==1', { + 'cflags': [ + # We need to disable clang's builtin assember as it can't + # handle a several of asm files. + '-no-integrated-as', + ], + }], ['arm_tune!=""', { 'cflags': [ '-mtune=<(arm_tune)', diff --git a/linux/install-arm-sysroot.py b/linux/install-arm-sysroot.py index 5c278ea65..4d593cc71 100755 --- a/linux/install-arm-sysroot.py +++ b/linux/install-arm-sysroot.py @@ -25,6 +25,10 @@ Steps to rebuild the arm sysroot image: nativeclient-archive2/toolchain/$NACL_REV/sysroot-arm-trusted.tgz """ +# TODO(sbc): merge this script into: +# chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py + +import hashlib import os import shutil import subprocess @@ -33,9 +37,23 @@ import sys SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) URL_PREFIX = 'https://storage.googleapis.com' -URL_PATH = 'nativeclient-archive2/toolchain' -REVISION = 13035 -TARBALL = 'sysroot-arm-trusted.tgz' +URL_PATH = 'chrome-linux-sysroot/toolchain' +REVISION = 285950 +TARBALL = 'debian_wheezy_arm_sysroot.tgz' +TARBALL_SHA1SUM = 'fc2f54db168887c5190c4c6686c869bedf668b4e' + + +def get_sha1(filename): + sha1 = hashlib.sha1() + with open(filename, 'rb') as f: + while True: + # Read in 1mb chunks, so it doesn't all have to be loaded into memory. + chunk = f.read(1024*1024) + if not chunk: + break + sha1.update(chunk) + return sha1.hexdigest() + def main(args): if '--linux-only' in args: @@ -70,6 +88,11 @@ def main(args): else: curl.append('--silent') subprocess.check_call(curl) + sha1sum = get_sha1(tarball) + if sha1sum != TARBALL_SHA1SUM: + print 'Tarball sha1sum is wrong.' + print 'Expected %s, actual: %s' % (TARBALL_SHA1SUM, sha1sum) + return 1 subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot]) os.remove(tarball)