Update revision for PNaCl r13245->r13250

Pull the following PNaCl changes into NaCl:
  r13247: (dyen@chromium.org) Fixed newlib libc linker script outputted by toolchain_build.
  r13249: (jvoung@google.com) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 765b07c: (jvoung@chromium.org) Revert "Remove the Defs list in X86InstrNaCl naclcall, since calls now use regmask."
  r13250: (jvoung@google.com) Re-instate PNACL_PRUNE for translator binaries, and log full file size.

BUG= https://code.google.com/p/chromium/issues/detail?id=377084
BUG= <none>
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3719
R= mseaborn@chromium.org, stichnot, dyen@chromium.org, jvoung@google.com, mcgrathr@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13251 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Make Android scons build align better with gyp android build

To build, you need to check out your client using:
gclient sync --deps=android,unix
and build using
./scons platform=arm android=1 sel_ldr nacl_helper_bootstrap
and run them under adb shell.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3032
R=bradnelson@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13252 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Add test for PNaCl setjmp() bug in which stack slots get reused wrongly

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3733
TEST=run_longjmp_stackslots_test
R=jfb@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13253 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Remove -sfi-load, etc. from the pnacl-translate driver (always set for nacl)

An LLVM side change made these features the default for NaCl.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=3858
R=mseaborn@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13254 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Added a way for toolchain_build to update known git mirrors.

Sometimes as we transition between git repository URLs it is necessary
to update an old URL mirror to a new one. We can now specify mirror
substitutions and update local git repositories to track the new URL
automatically.

Many machines are still using the old git base URL
'http://git.chromium.org/native_client', I have added it to be a
known mirror of 'https://chromium.googlesource.com/native_client'.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3852
R=bradnelson@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13255 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Non-SFI Mode: Build newlib-based Linux static executables for ARM

This adds ARM specific portions of the previous work for x86:

https://codereview.chromium.org/282983002

* Provide syscall wrappers for ARM.
* Implement nacl_tls_init and nacl_tls_get using CP15 register.
* Run the hello world test on the toolchain bots.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3851
TEST=./scons run_hello_world_test nonsfi_nacl=1 bitcode=1 platform=arm
R=mseaborn@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13256 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Include address in ReserveBottomPages failure message

When nacl_helper_bootstrap's ReserveBottomPages function fails,
there are two key pieces of information that help diagnosis of
the cause: the errno code of the failing mmap call, and the
address used in the mmap call.  Previously the error message
included only the former.  Include the latter as well.

BUG= none
TEST= trybots
R=mseaborn@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13257 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Add {TOOLCHAIN}/usr/local/lib to pnacl library search path.

This matches the include path which already includes usr/local/include.

R=jvoung@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13258 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Fix stlport issues in scons build

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3032
R=bradnelson@google.com, mcgrathr@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13259 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Accept mmap EINVAL failure for any <64k page, not just 0

A Chromium user/developer reported that on his system,
nacl_helper_bootstrap fails at startup because of an unexpected
mmap failure.  It fails with EINVAL when trying to establish the
PROT_NONE mapping for the second page, not just the first as the
code previously expected.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3866
TEST= trybots
R=mseaborn@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13260 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM change:

83cde78: (jvoung@chromium.org) Revert tablegen localmods for 32-bit naclcalls. Use normal calls.

BUG=none
TEST= PNaCl toolchain trybots
R=stichnot@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13261 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Automate file and symlinks copy for libstdc++

Previously, libstdc++ files and symlinks were specified in a list,
which could get stale and break (encoded version numbers change).
This changes switches to using a patern match for libstdc++ and
libsubc++ to ensure actual files get copied.

R=binji@chromium.org
TBR=stichnot@google.com
(For throttle permission)
BUG=none

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13262 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Use chromium credential if no other credential is available.

BUG=None
TEST=trybots
TBR=sehr@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13263 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Fix quoting of arguments on Linux/Mac

If one of the values passed to --defines includes spaces or quotes,
passing the command-line to the shell will cause the command to be
incorrectly parsed.

Since using a shell is only required on Windows, and quoting the
command-line is really tricky, only use the shell on Windows.

BUG=375811
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13264 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Switch to hard float for arm.

We no longer assume the soft float is installed.
Add the arm compiler version to toolchain memoize checksum if available.

BUG=None
TEST=trybots
TBR=jfb@chromium.org,noelallen@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13265 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
command_tester: Reduce verbosity of the output

Before this change, command_tester redundantly prints every command
twice, like this:

[ RUN      ] nacl_newlib.run_foo_test
======================================================================
running ['path/to/sel_ldr', 'path/to/foo.nexe', 'some arg']
======================================================================
path/to/sel_ldr path/to/foo.nexe some arg
[       OK ] nacl_newlib.run_foo_test (0 ms)

The first printing preserves special characters (e.g. spaces,
blackslashes) but isn't easily copy+pastable to the shell.  The second
printing is copy+pastable unless the line contains special characters,
in which case the command line won't work in the shell.

After this change, we just print:

[ RUN      ] nacl_newlib.run_foo_test
path/to/sel_ldr path/to/foo.nexe 'some arg'
[       OK ] nacl_newlib.run_foo_test (0 ms)

This gives the best of both original printings.  It now preserves
special characters in copy+pastable form.

BUG=none
TEST=none
R=bradnelson@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13266 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Cleanup: Remove unused Gyp definition of libpthread_private

The definition was wrong: it was never updated to list irt_futex.c
instead of irt_mutex.c/irt_cond.c, so it wouldn't work.  No-one noticed
because the definition is not used or tested, so we might as well remove
it rather than fixing it.

It is not usable anyway, because there is no corresponding definition of
libnacl_sys_private.

BUG=none
TEST=trybots
R=mcgrathr@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13267 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update revision for PNaCl r13250->r13261

Pull the following PNaCl changes into NaCl:
  r13254: (jvoung@google.com) Remove -sfi-load, etc. from the pnacl-translate driver (always set for nacl)
  r13255: (dyen@chromium.org) Added a way for toolchain_build to update known git mirrors.
  r13256: (hamaji@chromium.org) Non-SFI Mode: Build newlib-based Linux static executables for ARM
  r13258: (sbc@chromium.org) Add {TOOLCHAIN}/usr/local/lib to pnacl library search path.
  r13261: (jvoung@google.com) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 83cde78: (jvoung@chromium.org) Revert tablegen localmods for 32-bit naclcalls. Use normal calls.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=3858
BUG= <none>
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3852
BUG= none
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3851
R= bradnelson@google.com, jvoung@chromium.org, hamaji@chromium.org, stichnot@chromium.org, jvoung@google.com, mseaborn@chromium.org, dyen@chromium.org, sbc@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13268 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Cleanup: Remove irt_mutex.c, irt_cond.c, etc. from libpthread_private

They are not used by libpthread_private, which only needs irt_futex.c.

We also no longer need to define the aliases __nc_irt_mutex and
__nc_irt_cond.  Only __nc_irt_futex is needed.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3851
TEST=run_thread_test run_gc_instrumentation_test
R=mcgrathr@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13269 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
toolchain_build: Fix arm-linux-gnueabi-gcc -v collection

The change in r13265 had a typo that meant it used 'gcc -v'
output in place of 'arm-linux-gnueabi-gcc -v' and so did not have
the effect intended.  Fix it by factoring out cut&pasted code
into a subroutine, so there cannot be a cut&paste editting error.

BUG= none
TEST= trybots
R=bradnelson@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@13270 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2