Commit d7595860 authored by sbc@chromium.org's avatar sbc@chromium.org

Enable ARM/linux cross compile to use clang.

BUG=395832
NOTRY=true

Review URL: https://codereview.chromium.org/408393002

Cr-Commit-Position: refs/heads/master@{#290261}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290261 0039d316-1c4b-4281-b951-d872f2087c98
parent 200abd27
......@@ -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)',
......
......@@ -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)
......
......@@ -97,7 +97,7 @@ void Initialize(const pp::Var& message_data, nacl::StringBuffer* sb) {
// Dump RNG output into a string.
//
void RngDump(const pp::Var& message_data, nacl::StringBuffer* sb) {
NaClSrpcError rpc_result;
NaClSrpcError rpc_result __attribute__((unused));
int status;
int rng;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment