native_client/src/native_client.git
9 hours agoAdd rule to build nacl_helper_nonsfi for ARM master
mazda@chromium.org [Fri, 19 Dec 2014 19:09:49 +0000 (19:09 +0000)]
Add rule to build nacl_helper_nonsfi for ARM

- Added gyp rule to build nacl_helper_nonsfi for ARM
- Fixed the target flag to use armv7-unknown-nacl-gnueabihf

BUG= https://code.google.com/p/chromium/issues/detail?id=433201
BUG= https://code.google.com/p/chromium/issues/detail?id=372049
TEST=try

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

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

34 hours agoUpdate .DEPS.git
chrome-admin@google.com [Thu, 18 Dec 2014 18:14:08 +0000 (18:14 +0000)]
Update .DEPS.git

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

34 hours agoallow all fma3 instructions in validator.
shyamsundarr@chromium.org [Thu, 18 Dec 2014 18:14:03 +0000 (18:14 +0000)]
allow all fma3 instructions in validator.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=1972
R=kschimpf@google.com

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

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

2 days agoUpdate base revisions used when generating patches for bintuils and newlib
sbc@chromium.org [Thu, 18 Dec 2014 01:59:23 +0000 (01:59 +0000)]
Update base revisions used when generating patches for bintuils and newlib

Bintuils and newlib have been updated to new upstream
versions but the system generating the patch files
was still using old revisions resulting in vary large
(and confusing) patch files.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4025
TEST= make patches
R=mcgrathr@chromium.org

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

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

2 days agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jvoung@google.com [Wed, 17 Dec 2014 23:37:06 +0000 (23:37 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM change:

3904ddc: (jvoung@chromium.org) Update ReplacePtrsWithInts to also fix up refs from subprogram debug metadata.

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

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

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

2 days agoCleanup: Remove irt_manifest.c (open_resource() impl), which is dead code
mseaborn@chromium.org [Wed, 17 Dec 2014 21:33:27 +0000 (21:33 +0000)]
Cleanup: Remove irt_manifest.c (open_resource() impl), which is dead code

This implementation of open_resource() is no longer used: it's
overridden on the Chromium side, and it's never used on the NaCl side.

We can no longer leave the nacl_irt_resource_open entry in
irt_interfaces.c, because this symbol would no longer be defined in
the Chromium build (where we don't link in irt_core_resource.c).

Therefore, we add nacl_irt_resource_open via irt_entry_core.c, which
matches how Chromium injects IRT interfaces in
ppapi/nacl_irt/irt_ppapi.cc and ppapi/nacl_irt/irt_start.cc.

Update the comments to reflect whether and how IRT interfaces are
defined and disabled under PNaCl.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3864
TEST=Chromium trybots + NaCl trybots

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

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

2 days agoMove struct nacl_abi_stat from sys/stat.h to bits/stat.h
mcgrathr@chromium.org [Wed, 17 Dec 2014 21:33:25 +0000 (21:33 +0000)]
Move struct nacl_abi_stat from sys/stat.h to bits/stat.h

Careful users such as the glibc port want NaCl-supplied headers that
define nacl_abi_* types and NACL_ABI_* constants but do not also do
anything to interfere with other identifiers such as declaring
standard functions.  However, they also need to define the macro
NACL_IN_TOOLCHAIN_HEADERS to avoid problematic includes directly
from the native_client tree such as that of machine/_types.h.
sys/stat.h does not fit the bill since it wants to declare
functions, but bits/stat.h is just right once we move the struct
definition there.  This also aligns the (sys/)foo.h vs bits/foo.h
distinction with how it's used in glibc (the origin of the bits/
header convention): OS-dependent bit values and type layouts go in
bits/ while common API declarations do not.

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

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

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

2 days agoUpdate revision for PNaCl r14210->r14219
jvoung@chromium.org [Wed, 17 Dec 2014 19:04:19 +0000 (19:04 +0000)]
Update revision for PNaCl r14210->r14219

Pull the following PNaCl changes into NaCl:
  r14213: (dschuff@chromium.org) toolchain_build: Use 'build_noncanonical' target type for target libraries
  r14216: (jvoung@google.com) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 1b5fb24: (jvoung@chromium.org) Remove GR32_TC_64 previously used by NaCl. Also put PSEUDO_NACL_SEG in SEGMENT_REG class.
    | aee8276: (dschuff@chromium.org) Default to an armv7 cpu when march=arm
    | 8511b00: (petar.jovanovic@rt-rk.com) Apply missing parts from upstream r218744
    | 9861392: (petar.jovanovic@rt-rk.com) Cherrypick upstream r220447: Fix Mips nacl-mask test
    | a6fa566: (jvoung@chromium.org) Cherry-pick: Use 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.
  r14217: (jvoung@google.com) Change unsandboxed IRT Mac back to 'build' instead of noncanonical.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4005
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4018
BUG= none (package_version checks that package is uploaded when setting rev)
R= jfb@chromium.org, bradnelson@google.com, dschuff@chromium.org, jvoung@google.com, dyen@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

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

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

2 days agoCleanup: Merge sources lists in irt/nacl.scons
mseaborn@chromium.org [Wed, 17 Dec 2014 17:06:25 +0000 (17:06 +0000)]
Cleanup: Merge sources lists in irt/nacl.scons

This code can be simplified because it doesn't build the in-browser
IRT any more.

This also happens to be necessary for a later change that requires
irt_query_list.c to be in libirt_support_private for
run_irt_compatibility_test_irt to link.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3864
TEST=trybots

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

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

3 days agoBuild irt variant tests to ensure tests broken on builders are built for testers.
bradnelson@google.com [Wed, 17 Dec 2014 02:29:57 +0000 (02:29 +0000)]
Build irt variant tests to ensure tests broken on builders are built for testers.

Add an explicit irt variant build step.

BUG=None
TEST=trybots (should actually let it finish...)
R=jfb@chromium.org

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

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

3 days agoUpdate newlib revision used by the gcc toolchain builders
sbc@chromium.org [Wed, 17 Dec 2014 00:45:47 +0000 (00:45 +0000)]
Update newlib revision used by the gcc toolchain builders

This brings in the following newlib revisions:

312a290 Define HAVE_MKDIR when building for NaCl
b115f61 Do not define rintl, lrintl, or llrintl in libm/common for i386

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

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

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

3 days agonacl-clang build for ARM
dschuff@chromium.org [Wed, 17 Dec 2014 00:28:14 +0000 (00:28 +0000)]
nacl-clang build for ARM

* Add build rules for nacl-clang ARM target libraries
* Add gcc's nacl-arm-macros.s file to NaCl repo for inclusion in nacl-clang
* Update a few tests to pass with ARM nacl-clang
* Update COMPONENT_REVISIONS to bring in:
  clang ee9f475 (dschuff@chromium.org) Inject the NaCl  ARM assembly macro file into ARM assembler jobs
  newlib 312a290 (sbc@chromium.org) Define HAVE_MKDIR when building for NaCl
  newlib 4e25c28 (dschuff@chromium.org) Condition itet ARM instruction in strcpy.c on non-nacl

R=jvoung@chromium.org, jfb@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4018

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

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

3 days agoMark finalized pexe and translated nexe as in all_programs at key points.
bradnelson@google.com [Tue, 16 Dec 2014 21:39:14 +0000 (21:39 +0000)]
Mark finalized pexe and translated nexe as in all_programs at key points.

In order to ensure builders on which tests are marked as broken generate the finalized pexes and translated nexes that testers need, add the pexes/nexes to the all_programs alias.

Fixes break from:
https://src.chromium.org/viewvc/native_client?view=rev&revision=14205
BUG=None
TEST=trybots
R=dschuff@chromium.org, jfb@chromium.org

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

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

3 days agoChange unsandboxed IRT Mac back to 'build' instead of noncanonical.
jvoung@google.com [Tue, 16 Dec 2014 17:31:04 +0000 (17:31 +0000)]
Change unsandboxed IRT Mac back to 'build' instead of noncanonical.

It depends on the OS, and the linux bot does not build the mac
version, so the mac bot is canonical.

BUG=none (package_version checks that package is uploaded when setting rev)
R=dschuff@chromium.org

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

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

4 days agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jvoung@google.com [Mon, 15 Dec 2014 23:11:03 +0000 (23:11 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

1b5fb24: (jvoung@chromium.org) Remove GR32_TC_64 previously used by NaCl. Also put PSEUDO_NACL_SEG in SEGMENT_REG class.
aee8276: (dschuff@chromium.org) Default to an armv7 cpu when march=arm
8511b00: (petar.jovanovic@rt-rk.com) Apply missing parts from upstream r218744
9861392: (petar.jovanovic@rt-rk.com) Cherrypick upstream r220447: Fix Mips nacl-mask test
a6fa566: (jvoung@chromium.org) Cherry-pick: Use 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4018
BUG= make check failure CodeGen/Mips/prevent-hoisting.ll
BUG= make check failure MC/Mips/nacl-mask.s
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4005
TEST= PNaCl toolchain trybots
R=dschuff@chromium.org, jfb@chromium.org

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

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

4 days agoUpdate revision for PNaCl r14185->r14210 and Fix PNaCl atomics on x86
jfb@chromium.org [Mon, 15 Dec 2014 19:18:06 +0000 (19:18 +0000)]
Update revision for PNaCl r14185->r14210 and Fix PNaCl atomics on x86

Mark the atomics test as fixed, both because of the LLVM 3.5 merge bug that was introduced as well as because of the x86-32 16-bit atomics hack. Both need to get fixed at the same time because the later exposes a bug in the former. This patch depends on a few LLVM-side patches, and a component revision update.

Pull the following PNaCl changes into NaCl:
  r14186: (jvoung@google.com) Don't use pnacl raw toolchain in llvm nightly and libcxx tests.
  r14187: (hamaji@chromium.org) Non-SFI Mode: Build PIE nonsfi_loader
  r14189: (dschuff@chromium.org) PNaCl: Update Clang revision in pnacl/COMPONENT_REVISIONS
    | 79e9765: (dschuff@chromium.org) Remove explicit -lnacl from linker command
  r14190: (jvoung@google.com) Remove a few locale-related "known failures" from libcxx list.
  r14197: (jvoung@google.com) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 87dd0f5: (jvoung@chromium.org) Fix a couple of warnings about unused private fields, use TRI, etc.
    | d70ed0a: (jfb@chromium.org) Emit callq instead of call on x86-64
    | ad454c1: (jvoung@chromium.org) Remove localmod for disabling libcall simplifications while compiling implementations of libs.
    | 90b592e: (kschimpf@google.com) Fix PNaCl bitcode when function call argument is has invalid reference.
    | f81627b: (kschimpf@google.com) Fix more error handling code wrt to handling the input bitcode buffer.
    | 8c34579: (dschuff@chromium.org) Modify X86NaClRewritePass ApplyMemorySFI to handle multiple memory operands
    | 19016fe: (jvoung@chromium.org) Cherrypick 217435 and 217942 which conflict with NACL_CG_CALL64r, and adjust localmod.
  r14204: (jvoung@google.com) Switch -split-module-sched back to dynamic for the sandboxed case.
  r14208: (dschuff@chromium.org) toolchain_build: Use 'build_noncanonical' target type for target libraries
  r14209: (dschuff@chromium.org) Revert "toolchain_build: Use 'build_noncanonical' target type for target libraries"
  r14210: (jfb@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | d244be0: (jfb@chromium.org) Emit LOCK prefix after DATA16
    | a974236: (jfb@chromium.org) Remove PNaCl's x86-32 hack for 16-bit atomics
    | f968dbd: (jfb@chromium.org) Cherrypick upstream patch: ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes
    | c6ab287: (jfb@chromium.org) Emit LAHF/SAHF instead of PUSHF/POPF

BUG= http://llvm.org/bugs/show_bug.cgi?id=20376
BUG= https://code.google.com/p/chromium/issues/detail?id=440427
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2518
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2981
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3579
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3673
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3868
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3946
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3999
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4015
R=dschuff@chromium.org, dyen@chromium.org, hamaji@chromium.org, jfb@chromium.org, jvoung@google.com, kschimpf@google.com
TEST= ./scons run_synchronization_sync_test bitcode=1 platform=x86-32

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

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

7 days agotoolchain_build: Use 'build_noncanonical' target type for target libraries
dschuff@chromium.org [Fri, 12 Dec 2014 22:52:29 +0000 (22:52 +0000)]
toolchain_build: Use 'build_noncanonical' target type for target libraries

This CL introdudes a new build target type, 'build_noncanonical'. Previously
we were using 'work' targets for target libraries on non-x86-64-linux bots so
that only one bot would upload them. But since we now us package_version to
extract the fresh packages instead of --install, we are getting stale packages
from DEPS for the noncanonical targets rather than the freshly-built ones.

build_noncanonical targets are memoized but use a different key for the same
build signature to avoid collisions between canonical and non-canonical builds.

However the package_version tools don't have a way to distinguish canonical
packages (i.e. those we want to upload) from non-canonical ones; they only know
how to process all the archives that are present. We can't just leave out the
the non-canonical packages entirely from the json files because they are
extracted by the package_version tool. So we do 2 invocations of
toolchain_build_pnacl: the first builds just the canonical packages. We upload
these, and then we do a second build with everything and extract that locally
for testing.

R=bradnelson@google.com, dyen@chromium.org

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

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

7 days agoAlways emit original sources from scan_sources.
teravest@chromium.org [Fri, 12 Dec 2014 22:16:58 +0000 (22:16 +0000)]
Always emit original sources from scan_sources.

scan_sources.py should always emit the original source files passed as input,
even if it cannot find them. This is necessary to create a proper dependency
arc from the build rule "mojo_nacl" to the generated source "libmojo.cc" from
the "monacl_codegen" build rule..

It's not sufficient to convey this source dependency through ninja depfiles.
This is because the emitted dependency in the mojo_nacl.ninja from "mojo_nacl"
to "monacl_codegen" is order-only and depenencies are scanned before order-only
dependencies are run (https://github.com/martine/ninja/issues/760).

BUG=https://code.google.com/p/chromium/issues/detail?id=440451
TEST=manually modified libmojo.cc.tmpl and rebuilt mojo_nacl.
R=bradnelson@google.com, ncbray@chromium.org

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

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

7 days agoTurn off graphing for pnacl-buildonly-spec.
bradnelson@google.com [Fri, 12 Dec 2014 19:25:29 +0000 (19:25 +0000)]
Turn off graphing for pnacl-buildonly-spec.

The runtest.py script recently started treating graphing requests
without datapoints as an error.
Dropping the buildonly-spec bot from uploading graphs,
as it has none.

BUG=None
TEST=None
TBR=jfb@chromium.org

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

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

7 days agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jfb@chromium.org [Fri, 12 Dec 2014 15:56:41 +0000 (15:56 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

d244be0: (jfb@chromium.org) Emit LOCK prefix after DATA16
a974236: (jfb@chromium.org) Remove PNaCl's x86-32 hack for 16-bit atomics
f968dbd: (jfb@chromium.org) Cherrypick upstream patch: ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes
c6ab287: (jfb@chromium.org) Emit LAHF/SAHF instead of PUSHF/POPF

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3673
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2518
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2981
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3579
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4015
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
BUG= http://llvm.org/bugs/show_bug.cgi?id=20376
TEST= PNaCl toolchain trybots
R= dschuff@chromium.org

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

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

8 days agoRevert "toolchain_build: Use 'build_noncanonical' target type for target libraries"
dschuff@chromium.org [Thu, 11 Dec 2014 21:57:24 +0000 (21:57 +0000)]
Revert "toolchain_build: Use 'build_noncanonical' target type for target libraries"

This reverts r14208 because it failed to update the once_tests

R=jfb@chromium.org
TBR because rietveld is having issues.

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

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

8 days agotoolchain_build: Use 'build_noncanonical' target type for target libraries
dschuff@chromium.org [Thu, 11 Dec 2014 21:35:13 +0000 (21:35 +0000)]
toolchain_build: Use 'build_noncanonical' target type for target libraries

This CL introdudes a new build target type, 'build_noncanonical'. Previously
we were using 'work' targets for target libraries on non-x86-64-linux bots so that
only one bot would upload them. But since we now us package_version to extract
the fresh packages instead of --install, we are getting stale packages from
DEPS for the noncanonical targets rather than the freshly-built ones.

build_noncanonical targets are memoized but use a different key for the
same build signature to avoid collisions between canonical
and non-canonical builds.

However the package_version tools don't have a way to
distinguish canonical packages (i.e. those we want to
upload) from non-canonical ones; they only know how to process all the archives that are present. We can't just
leave out the the non-canonical packages entirely from the
json files because they are extracted by the package_version tool. So we do 2 invocations of
toolchain_build_pnacl: the first builds just the canonical
packages. We upload these, and then we do a second build
with everything and extract that locally for testing.

R=dyen@chromium.org

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

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

8 days agoUpdate .DEPS.git
chrome-admin@google.com [Thu, 11 Dec 2014 21:12:08 +0000 (21:12 +0000)]
Update .DEPS.git

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

8 days agoenable remaining disabled avx1 ops.
shyamsundarr@chromium.org [Thu, 11 Dec 2014 21:11:52 +0000 (21:11 +0000)]
enable remaining disabled avx1 ops.
This corresponds to adding:

vcmpeqpd | vcmpeqps | vcmpeqss |
vcvtpd2dq | vcvtpd2dqx | vcvtpd2dqy |
vcvtpd2ps | vcvtpd2psx | vcvtpd2psy |
vcvtsi2sd | vcvtsi2ss | vcvtsd2si | vcvtss2si |
vcvttpd2dq | vcvttpd2dqx | vcvttpd2dqy |
vcvttps2dq |
vcvttsd2si | vcvttss2si |
vextractps |
vinsertf128 |
vmovd | vmovq |
vpinsrb | vpinsrd | vpinsrw |
vrsqrtss |
vmaskmovdqu | vpinsrq | vpextrq

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

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

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

8 days agoMark performance tests as broken when running on VMs
jfb@chromium.org [Thu, 11 Dec 2014 21:00:18 +0000 (21:00 +0000)]
Mark performance tests as broken  when running on VMs

Gasper has been sending a flood of emails about performance regressions for the
performance tests. Their performance varies drastically from one run to another,
and this distracts the sheriff from actual performance regressions. Either
gasper or these tests should be fixed, but since the code isn't being modified
it shouldn't matter than its curtosic runtime isn't being measured.

Only mark the tests as broken on VMs, since the HW bots shouldn't have so much
variability.

R=bradnelson@google.com, bradnelson@chromium.org, mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3161
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3987
TEST= is_sheriff && email_flood && patience_exceeded

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

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

8 days agoSwitch -split-module-sched back to dynamic for the sandboxed case.
jvoung@google.com [Thu, 11 Dec 2014 19:13:03 +0000 (19:13 +0000)]
Switch -split-module-sched back to dynamic for the sandboxed case.

Leave the non-sandboxed as "static" for deterministic builds,
but switch sandboxed to "dynamic" to keep measuring that on perf bots.

BUG= https://code.google.com/p/chromium/issues/detail?id=440427
R=dschuff@chromium.org, jfb@chromium.org

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

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

8 days agoFix stack alignment of child threads on ARM.
mazda@chromium.org [Thu, 11 Dec 2014 16:16:56 +0000 (16:16 +0000)]
Fix stack alignment of child threads on ARM.

It is intended that a child thread starts with the stack pointer
aligned with 16-byte boundary, but it was misaligned by 4 bytes
on ARM due to pop instruction. This CL fixes it by using ldr
instruction instead.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4016
TEST=./scons bitcode=1 nonsfi_nacl=1 pnacl_generate_pexe=0 platform=arm \
         run_stack_alignment_asm_test
TEST=./scons bitcode=1 nonsfi_nacl=1 pnacl_generate_pexe=0 platform=arm \
         nonsfi_tests
TEST=./stack_alignment_asm_test.nexe  # On a real ARM machine
TEST=./thread_test.nexe  # On a real ARM machine

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

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

8 days agoNon-SFI mode: Make nacl_helper_nonsfi build depend on libnacl_sys_private.a
mazda@chromium.org [Thu, 11 Dec 2014 16:16:51 +0000 (16:16 +0000)]
Non-SFI mode: Make nacl_helper_nonsfi build depend on libnacl_sys_private.a

Otherwise nacl_helper_nonsfi is not rebuilt when
libnacl_sys_private.a has been changed.

BUG= https://code.google.com/p/chromium/issues/detail?id=358465
TEST=# In Chromium repository
     touch native_client/src/nonsfi/linux/linux_pthread_private.c &&
     ninja -C out/Release nacl_helper_nonsfi

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

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

9 days agoStop closing thread handles owned by the Win32 debugging API.
grt@chromium.org [Thu, 11 Dec 2014 01:37:15 +0000 (01:37 +0000)]
Stop closing thread handles owned by the Win32 debugging API.

BUG= http://code.google.com/p/chromium/issues/detail?id=440502

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

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

9 days agoGN: do not assemble toolchain in output directory.
ncbray@chromium.org [Thu, 11 Dec 2014 01:11:17 +0000 (01:11 +0000)]
GN: do not assemble toolchain in output directory.

Note: this change will cause the GN build on the NaCl waterfall to use
pthreads, etc, from the toolchain directory.  This will be different
than SCons, which builds these artifacts itself.

BUG=https://code.google.com/p/chromium/issues/detail?id=401761

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

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

9 days agoncval_new: on success don't produce any output by default.
sbc@chromium.org [Wed, 10 Dec 2014 23:21:08 +0000 (23:21 +0000)]
ncval_new: on success don't produce any output by default.

All errors now go to stderr and on success we don't output
anything by default.  This is more common among toolchain
binaries such as compilers and is desirable for build most
systems.

The old bevaiour of printing "Valid." on sucess is still
available by adding '-v' (for verbose) to the command line.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4012
TEST= trybots

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

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

9 days agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
jvoung@google.com [Wed, 10 Dec 2014 23:14:06 +0000 (23:14 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

87dd0f5: (jvoung@chromium.org) Fix a couple of warnings about unused private fields, use TRI, etc.
d70ed0a: (jfb@chromium.org) Emit callq instead of call on x86-64
ad454c1: (jvoung@chromium.org) Remove localmod for disabling libcall simplifications while compiling implementations of libs.
90b592e: (kschimpf@google.com) Fix PNaCl bitcode when function call argument is has invalid reference.
f81627b: (kschimpf@google.com) Fix more error handling code wrt to handling the input bitcode buffer.
8c34579: (dschuff@chromium.org) Modify X86NaClRewritePass ApplyMemorySFI to handle multiple memory operands
19016fe: (jvoung@chromium.org) Cherrypick 217435 and 217942 which conflict with NACL_CG_CALL64r, and adjust localmod.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3999
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4006
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4014
BUG= merge to upstream/google/stable
TEST= PNaCl toolchain trybots
R=kschimpf@google.com

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

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

9 days agoRemove cygwin support from buildbot_pnacl_toolchain.py
dschuff@chromium.org [Wed, 10 Dec 2014 22:50:23 +0000 (22:50 +0000)]
Remove cygwin support from buildbot_pnacl_toolchain.py

Remove some custom munging that existed to support the mixing of cygwin and
Windows native python. This change is not intended to remove all cygwin
support from the build infrastructure, just from this file to facilitate
further changes.

R=dyen@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3473

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

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

9 days agoNon-SFI mode: Override NACL_BUILD_ARCH and _SUBARCH in build_nexe.py.
hidehiko@chromium.org [Wed, 10 Dec 2014 15:16:09 +0000 (15:16 +0000)]
Non-SFI mode: Override NACL_BUILD_ARCH and _SUBARCH in build_nexe.py.

These macros are defined in build/common.gypi. However, they are
for the host build macro. So, in some cases these values are wrong.
Specifically, we build 32-bit binary on x64 arch for example.
This CL overrides the macros in build_nexe.py based on --arch
flag, which is actual target architecture.
This is needed browser_tests on x64 Chrome.

The actual problem this CL fixes happens on nacl_helper_nonsfi built on
x64 arch, since NACL_BUILD_SUBARCH=64 on target_arch=x64.
It comes from native_client/build/common.gypi, which is included by
native_client/src/nonsfi/loader/loader.gypi.
As a result, the NACL_ELF_E_MACHINE in elf_loader.c becomes EM_X86_64 instead
of EM_386 (defined in nacl_config.h), so that loading fails.

The situation seems a bit unfortunate, because we want to build 32-bit binary
even if target_arch=x64. So, "defines" based on "target_arch" does not work
properly for this case. However, if we remove the defines, the host toolchain
will not define them, which causes a problem. Also, "defines" contains some
other macros we need for build_nexe.py and is widely used, so removing it from
untrusted.gypi wouldn't work, neither.
So, in this CL, fix the macro in build_nexe.py, following the code for other
macros (like NACL_WINDOWS, NACL_OSX ... etc) around edited code.

BUG=https://code.google.com/p/chromium/issues/detail?id=358465
TEST=Ran trybots. Ran browser_tests locally.

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

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

10 days agoRoll GCC toolchains.
ncbray@chromium.org [Wed, 10 Dec 2014 01:35:43 +0000 (01:35 +0000)]
Roll GCC toolchains.

The current "complete" toolchains do not include pthreads, etc, correctly.

BUG=https://code.google.com/p/chromium/issues/detail?id=401761

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

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

10 days agoFixed package_version reusing work dirs between revision packages.
dyen@chromium.org [Wed, 10 Dec 2014 01:16:38 +0000 (01:16 +0000)]
Fixed package_version reusing work dirs between revision packages.

R=ncbray@chromium.org
BUG=None
TEST=Set revision nacl_x86_glibc for 14191 should fail.

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

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

10 days agoUpdate glibc version in tools/REVISIONS (f78e18e->1106743)
sbc@chromium.org [Tue, 9 Dec 2014 20:16:10 +0000 (20:16 +0000)]
Update glibc version in tools/REVISIONS (f78e18e->1106743)

This brings in the following change:
1106743: NaCl: Fix off-by-one in getcwd() syscall emulation.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4010

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

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

10 days agoNaCl Core SDK libs for both x86-32/x86-64 x86 newlib/glibc toolchains.
dyen@chromium.org [Tue, 9 Dec 2014 19:22:32 +0000 (19:22 +0000)]
NaCl Core SDK libs for both x86-32/x86-64 x86 newlib/glibc toolchains.

R=ncbray@chromium.org
BUG=None
TEST=trybots

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

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

10 days agoRemove a few locale-related "known failures" from libcxx list.
jvoung@google.com [Tue, 9 Dec 2014 17:57:14 +0000 (17:57 +0000)]
Remove a few locale-related "known failures" from libcxx list.

These were added with https://codereview.chromium.org/722393002/

They are actually "UNSUPPORTED" by the bot, which is
considered a "pass" instead of a failure. So the bot had a
few unexpected successes and turned red.

The bot does not seem to support the ru_RU.UTF-8, zh_CN.UTF-8,
and cs_CZ.ISO-8859-2 locales, while my local machine is only
missing cs_CZ.ISO-8859-2, so the results may differ unless
all devs and bots install all locales.

BUG=none -- red bot
R=dschuff@chromium.org

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

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

10 days agoPNaCl: Update Clang revision in pnacl/COMPONENT_REVISIONS
dschuff@chromium.org [Tue, 9 Dec 2014 17:56:13 +0000 (17:56 +0000)]
PNaCl: Update Clang revision in pnacl/COMPONENT_REVISIONS

This pulls in the following Clang change:

79e9765: (dschuff@chromium.org) Remove explicit -lnacl from linker command

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3946
TEST= PNaCl toolchain trybots
TBR=jfb@chromium.org

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

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

10 days agoUpdate revision for PNaCl r14173->r14185
dschuff@chromium.org [Tue, 9 Dec 2014 16:50:09 +0000 (16:50 +0000)]
Update revision for PNaCl r14173->r14185

Pull the following PNaCl changes into NaCl:
  r14178: (dschuff@chromium.org) PNaCl: Update Clang revision in pnacl/COMPONENT_REVISIONS
    | ec2335b: (dschuff@chromium.org) Driver: Claim all -pthread/-pthreads flags when linking
    | e3f4cd2: (dschuff@chromium.org) Add <arch>/usr/lib and <arch>/usr/include to search paths for nacl-clang
  r14179: (kschimpf@google.com) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 12f5629: (kschimpf@google.com) Fix error reporting in the PNaCl bitcode reader.
  r14183: (dschuff@chromium.org) PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
    | 3bd3dbf: (jvoung@chromium.org) Remove localmod of C-API for linker symbol wrapping. Switched to C++.
    | 9b20c83: (dschuff@chromium.org) Use PushSection and PopSection when initializing NaCl MC streamer
    | a9788d8: (dschuff@chromium.org) Move NaCl MCStreamer initialization to after section init
  r14184: (dschuff@chromium.org) Use an architecture-specific newlib build for nacl-clang
  r14185: (dschuff@chromium.org) Make libc.a a linker script for nacl-clang

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3946
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4006
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3968
R= jvoung@chromium.org, kschimpf@google.com, dschuff@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

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

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

10 days agoNon-SFI Mode: Build PIE nonsfi_loader
hamaji@chromium.org [Tue, 9 Dec 2014 06:44:02 +0000 (06:44 +0000)]
Non-SFI Mode: Build PIE nonsfi_loader

Now elftools.py can parse program headers and nativeld.py
replaces PT_INTERP by PT_NULL so we can run non-SFI binaries
linked by gold on Linux using elftools.py.

pnacl-translate uses -pie instead of -static even when --noirt
is set and all non-SFI binaries relocate themselves.

Also update the unittest.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3868
TEST=PYTHONPATH=pnacl/driver pnacl/driver/tests/native_objects_test.py
TEST=trybots

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

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

11 days agoDon't use pnacl raw toolchain in llvm nightly and libcxx tests.
jvoung@google.com [Mon, 8 Dec 2014 23:14:13 +0000 (23:14 +0000)]
Don't use pnacl raw toolchain in llvm nightly and libcxx tests.

Use the non-raw one, which has libnacl built.

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

11 days agoMake libc.a a linker script for nacl-clang
dschuff@chromium.org [Mon, 8 Dec 2014 18:06:28 +0000 (18:06 +0000)]
Make libc.a a linker script for nacl-clang

This matches the behavior of nacl-gcc and will allow simplifying the driver
code.

R=jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3946

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

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

2 weeks agoUse an architecture-specific newlib build for nacl-clang
dschuff@chromium.org [Sat, 6 Dec 2014 00:16:34 +0000 (00:16 +0000)]
Use an architecture-specific newlib build for nacl-clang

Previously we were using the le32 newlib target for nacl-clang because the
LLVM assembler couldn't handle the syntax used in the NaCl assembly files
for e.g. memcpy. Now that we use gas by default we can use the assembly
versions instead of the generic C versions in le32.

Includes a bump of newlib to bring in
b115f61 (dschuff@chromium.org) Do not define rintl, lrintl, or llrintl in libm/common for i386

R=jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3946

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

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

2 weeks agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
dschuff@chromium.org [Fri, 5 Dec 2014 23:51:53 +0000 (23:51 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

3bd3dbf: (jvoung@chromium.org) Remove localmod of C-API for linker symbol wrapping. Switched to C++.
9b20c83: (dschuff@chromium.org) Use PushSection and PopSection when initializing NaCl MC streamer

and the following clang change:
a9788d8: (dschuff@chromium.org) Move NaCl MCStreamer initialization to after section init

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3968
TEST= PNaCl toolchain trybots
R=jvoung@chromium.org

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

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

2 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Fri, 5 Dec 2014 21:56:15 +0000 (21:56 +0000)]
Update .DEPS.git

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

2 weeks agoenable all nonspecial avx1 instructions.
shyamsundarr@chromium.org [Fri, 5 Dec 2014 21:55:34 +0000 (21:55 +0000)]
enable all nonspecial avx1 instructions.

The remaining instructions have typos in their definitions or produce restricted registers or have special mnemonic handling.

This adds:
      vblendpd | vblendps | vblendvpd | vblendvps |
      vcomisd | vcomiss |
      vcvtdq2pd | vcvtdq2ps | vcvtps2dq | vcvtps2pd |
      vdppd | vdpps |
      vextractf128 | vinsertps |
      vldmxcsr | vstmxcsr |
      vldqqu |
      vmaskmovpd | vmaskmovps |
      vmovmskpd | vmovmskps |
      vmovntdqa | vmovntdq | vmovntpd | vmovntps |
      vmpsadbw |
      vpabsb | vpabsd | vpabsw |
      vpalignr |
      vpblendvb | vpblendw |
      vpcmpestri | vpcmpestrm | vpcmpistri | vpcmpistrm |
      vperm2f128 | vpermilpd | vpermilps |
      vpextrb | vpextrd | vpextrw |
      vphminposuw |
      vpmovmskb |
      vpmovsxbw | vpmovsxbd | vpmovsxbq | vpmovsxdq | vpmovsxwd | vpmovsxwq |
      vpmovzxbw | vpmovzxbd | vpmovzxbq | vpmovzxdq | vpmovzxwd | vpmovzxwq |
      vpshufd | vpshufhw | vpshuflw |
      vpslld | vpslldq | vpsllq | vpsllw |
      vpsrad | vpsraw | vpsrld | vpsrldq | vpsrlq  | vpsrlw |
      vptest |
      vrcpps |
      vroundpd | vroundps |
      vroundsd | vroundss |
      vrsqrtps |
      vshufpd | vshufps |
      vsqrtpd | vsqrtps |
      vtestpd | vtestps |
      vucomisd | vucomis

BUG=https://code.google.com/p/nativeclient/issues/detail?id=1972

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

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

2 weeks agoGN: fix layering of library dependencies.
ncbray@chromium.org [Fri, 5 Dec 2014 20:12:34 +0000 (20:12 +0000)]
GN: fix layering of library dependencies.

The GN build did not match scons, and papered over issues by having sel_ldr
directly depend on libraries that should have been transitive dependencies.

A few targets that were unbuildable as either trusted or untrusted were also
gated out for their unbuildable configurations.

This change is needed to embed the NaCl build into other builds that depend
on sel_main_chrome.

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

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

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

2 weeks agoPNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS
kschimpf@google.com [Fri, 5 Dec 2014 19:09:07 +0000 (19:09 +0000)]
PNaCl: Update LLVM revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM change:

12f5629: (kschimpf@google.com) Fix error reporting in the PNaCl bitcode reader.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4006
TEST= PNaCl toolchain trybots
R=jvoung@chromium.org

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

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

2 weeks agoPNaCl: Update Clang revision in pnacl/COMPONENT_REVISIONS
dschuff@chromium.org [Fri, 5 Dec 2014 06:15:05 +0000 (06:15 +0000)]
PNaCl: Update Clang revision in pnacl/COMPONENT_REVISIONS

This pulls in the following Clang changes:

ec2335b: (dschuff@chromium.org) Driver: Claim all -pthread/-pthreads flags when linking
e3f4cd2: (dschuff@chromium.org) Add <arch>/usr/lib and <arch>/usr/include to search paths for nacl-clang

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3946
TEST= PNaCl toolchain trybots
NOTRY=true

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

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

2 weeks agoDisable the getdents() syscall by default for security hardening
mseaborn@chromium.org [Fri, 5 Dec 2014 04:26:26 +0000 (04:26 +0000)]
Disable the getdents() syscall by default for security hardening

This disables the getdents() syscall unless filesystem access is enabled.

BUG=none
TEST=none

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

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

2 weeks agoRevert "Nest the pnacl section of untrusted.gypi to the same level."
bradnelson@google.com [Thu, 4 Dec 2014 22:29:02 +0000 (22:29 +0000)]
Revert "Nest the pnacl section of untrusted.gypi to the same level."

This reverts r14152.

Broke MSAN in chrome:
https://codereview.chromium.org/774883002/#msg19

BUG=None
TEST=None
R=kschimpf@google.com, kschimpf@chromium.org

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

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

2 weeks agoUpdate revision for PNaCl r14165->r14173
jfb@chromium.org [Thu, 4 Dec 2014 21:17:47 +0000 (21:17 +0000)]
Update revision for PNaCl r14165->r14173

Pull the following PNaCl changes into NaCl:
  r14173: (jfb@chromium.org) Use static split module scheduling when using pnacl-translate.py

BUG= https://code.google.com/p/chromium/issues/detail?id=429358
R=jvoung@chromium.org, dschuff@chromium.org, jfb@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

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

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

2 weeks agocleanup scons test rules for validator proofs a bit.
shyamsundarr@chromium.org [Thu, 4 Dec 2014 19:02:33 +0000 (19:02 +0000)]
cleanup scons test rules for validator proofs a bit.

R=kschimpf@google.com

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

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

2 weeks agoUse static split module scheduling when using pnacl-translate.py
jfb@chromium.org [Thu, 4 Dec 2014 18:55:38 +0000 (18:55 +0000)]
Use static split module scheduling when using pnacl-translate.py

The chromium builders want to cache build results but the default translator behavior is to use dynamic scheduling for parallel translation, which reorders functions in the final nexe. This makes the build non-deterministic, which is nice to prevent predictable code generation in-browser (admitedly not a big security mitigation), but isn't nice for build caching. Static module scheduling will still use multiple cores to translate but is a tad slower.

R=jvoung@chromium.org, dschuff@chromium.org
BUG= https://code.google.com/p/chromium/issues/detail?id=429358
TEST= cd chromium/src && ninja -C out/Release ppapi_nacl_tests_pnacl_newlib_x64.nexe && mv out out.1 && gclient runhooks && ninja -C out/Release ppapi_nacl_tests_pnacl_newlib_x64.nexe && find ./ -name ppapi_nacl_tests_pnacl_newlib_x64.nexe | xargs -n1 md5sum

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

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

2 weeks agoUpdate binutils revision in tools/REVISIONS
mcgrathr@chromium.org [Thu, 4 Dec 2014 18:00:54 +0000 (18:00 +0000)]
Update binutils revision in tools/REVISIONS

This brings in:

1d8592c GAS: Handle multiple fixups in bundle for call adjustment
f009fc8 Add .dwarf2_addr_size directive to gas

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

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

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

2 weeks agoRe-enable exception_tests for nacl_clang on mac
dschuff@chromium.org [Wed, 3 Dec 2014 22:23:20 +0000 (22:23 +0000)]
Re-enable exception_tests for nacl_clang on mac

Build IDs are now being properly generated on non-Linux platforms.

R=jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3975

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

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

2 weeks agoRemove __X_LEAST{8,16,32}_TYPE__ hack for appeasing GCC torture tests w/ Clang.
jvoung@google.com [Wed, 3 Dec 2014 21:43:44 +0000 (21:43 +0000)]
Remove __X_LEAST{8,16,32}_TYPE__ hack for appeasing GCC torture tests w/ Clang.

Clang defines those now, thanks to binji.

Reverts part of 13354 and a way earlier change when these were first set up.

BUG=none
R=dschuff@chromium.org, jfb@chromium.org

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

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

2 weeks agoUpdate revision for PNaCl r14155->r14165
dschuff@chromium.org [Wed, 3 Dec 2014 21:20:36 +0000 (21:20 +0000)]
Update revision for PNaCl r14155->r14165

Pull the following PNaCl changes into NaCl:
  r14156: (dyen@chromium.org) Toolchain testing within the NaCl tree now use the raw variants.
  r14165: (dschuff@chromium.org) PNaCl: Update LLVM/binutils-x86 revision in pnacl/COMPONENT_REVISIONS
    | 6fa379e: (jvoung@chromium.org) Remove a couple random localmods that don't seem relevant anymore.
    | 566eb73: (jvoung@chromium.org) Remove localmod for 16-bit shld/shrd on x86-32.
    | 14fa683: (dschuff@chromium.org) Remove workaround for call+bundle_lock under gas in LowerTlsAddr
    | 1d8592c: (mcgrathr@chromium.org) GAS: Handle multiple fixups in bundle for call adjustment
    | 0a25822: (dschuff@chromium.org) Derive NaCl ToolChain from Generic_ELF instead of Linux

BUG= None
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2978
R= jvoung@chromium.org, dyen@chromium.org, dschuff@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

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

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

2 weeks agoFixed PNaCl buildbot test by adding extract argument to command.
dyen@chromium.org [Wed, 3 Dec 2014 20:54:31 +0000 (20:54 +0000)]
Fixed PNaCl buildbot test by adding extract argument to command.

R=jvoung@chromium.org
BUG=None
TEST=trybots

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

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

2 weeks agoMade buildbot PNaCl toolchain test extract using packages script.
dyen@chromium.org [Wed, 3 Dec 2014 19:14:09 +0000 (19:14 +0000)]
Made buildbot PNaCl toolchain test extract using packages script.

R=dschuff@chromium.org
BUG=None
TEST=trybots

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

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

2 weeks agoPNaCl: Update LLVM/binutils-x86 revision in pnacl/COMPONENT_REVISIONS
dschuff@chromium.org [Wed, 3 Dec 2014 17:14:25 +0000 (17:14 +0000)]
PNaCl: Update LLVM/binutils-x86 revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

6fa379e: (jvoung@chromium.org) Remove a couple random localmods that don't seem relevant anymore.
566eb73: (jvoung@chromium.org) Remove localmod for 16-bit shld/shrd on x86-32.
14fa683: (dschuff@chromium.org) Remove workaround for call+bundle_lock under gas in LowerTlsAddr

and the following binutils change:
1d8592c: (mcgrathr@chromium.org) GAS: Handle multiple fixups in bundle for call adjustment

and the following clang change:
0a25822: (dschuff@chromium.org) Derive NaCl ToolChain from Generic_ELF instead of Linux

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2978
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4008
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3975

TEST= PNaCl toolchain trybots
R=jvoung@chromium.org

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

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

2 weeks agoSwitch nacl-clang back to gas in SCons
dschuff@chromium.org [Wed, 3 Dec 2014 00:00:41 +0000 (00:00 +0000)]
Switch nacl-clang back to gas in SCons

Also re-enable nacl_clang tests which were disabled because of assembler
issues.

R=jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3966
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3969

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

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

2 weeks agoGN: add a base target for the NaCl build.
ncbray@chromium.org [Tue, 2 Dec 2014 23:56:56 +0000 (23:56 +0000)]
GN: add a base target for the NaCl build.

This is groundwork for composing NaCl into other builds without needing to
modify BUILDCONFIG.gn.

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

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

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

2 weeks agoUpdate revision for PNaCl r14148->r14155
dschuff@chromium.org [Tue, 2 Dec 2014 22:36:51 +0000 (22:36 +0000)]
Update revision for PNaCl r14148->r14155

Pull the following PNaCl changes into NaCl:
  r14151: (mseaborn@chromium.org) Remove much of the unused parts of pnacl/build.sh
  r14154: (jvoung@google.com) Add options for base dir and redirecting files to IRT open resource and use it.
  r14155: (dschuff@chromium.org) nacl-clang: use gas by default instead of the LLVM assembler

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

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

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

2 weeks agoCleanup: Use Bit('build_ARCH') instead of Bit('target_ARCH')
mseaborn@chromium.org [Tue, 2 Dec 2014 21:03:49 +0000 (21:03 +0000)]
Cleanup: Use Bit('build_ARCH') instead of Bit('target_ARCH')

Remove the definitions of 'target_ARCH' in SConstruct.

The distinction between "build" and "target" architecture is obsolete
-- the two are always the same.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2703
TEST=trybots

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

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

2 weeks agoCleanup: Remove TLS_PRESUMED_ALIGNMENT from tls.c
mseaborn@chromium.org [Tue, 2 Dec 2014 20:36:35 +0000 (20:36 +0000)]
Cleanup: Remove TLS_PRESUMED_ALIGNMENT from tls.c

The __tls_template_* symbols are no longer generated by the binutils
linkers, only by PNaCl's ExpandTls, so update the comments and remove
mentions about making assumptions about alignments.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=1240
TEST=tests/tls/

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

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

2 weeks agoRemove unnecessary PostMessage logic.
teravest@chromium.org [Tue, 2 Dec 2014 20:33:36 +0000 (20:33 +0000)]
Remove unnecessary PostMessage logic.

DEBUG_ONLY:dev://postmessage is no longer supported. This change removes some
code left behind which made that work.

BUG=https://code.google.com/p/chromium/issues/detail?id=406558

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

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

2 weeks agoRevert SCons portion of r14155
dschuff@chromium.org [Tue, 2 Dec 2014 18:13:53 +0000 (18:13 +0000)]
Revert SCons portion of r14155

I forgot that this will require a deps roll before it can land.

R=kschimpf@google.com, kschimpf@chromium.org

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

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

2 weeks agoClean up unused NaClDesc quota code.
teravest@chromium.org [Tue, 2 Dec 2014 18:11:49 +0000 (18:11 +0000)]
Clean up unused NaClDesc quota code.

While looking at cleaning up quota-related code in nacl::ReverseService, I came
across some unused quota-related code in NaClDescWrapper. This change removes
that code to make it more clear where NaClDescQuota is used today.

BUG=none

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

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

2 weeks agoToolchain testing within the NaCl tree now use the raw variants.
dyen@chromium.org [Tue, 2 Dec 2014 17:49:34 +0000 (17:49 +0000)]
Toolchain testing within the NaCl tree now use the raw variants.

In order to have the PNaCl toolchain trybots be able to
test the raw toolchains properly, I have also changed it
to use package_version to extract all the built packages.

BUG=None
TEST=trybot

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

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

2 weeks agonacl-clang: use gas by default instead of the LLVM assembler
dschuff@chromium.org [Tue, 2 Dec 2014 16:44:42 +0000 (16:44 +0000)]
nacl-clang: use gas by default instead of the LLVM assembler

Update COMPONENT_REVISIONS to bring in the following LLVM changes:
  e2a83b3 (dschuff@chromium.org): Remove nacltlsaddr32 from assembly layer
  74eb265 (dschuff@chromium.org): Use "." instead of label difference for GOT address calculations with gas

and the following clang change:
  0de7964 (dschuff@chromium.org): Use gas (non-integrated assembler) by default for nacl-clang

Also remove the SCons hack that disabled the integrated assembler when
building .S files

R=jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3966
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3946

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

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

2 weeks agoAdd options for base dir and redirecting files to IRT open resource and use it.
jvoung@google.com [Tue, 2 Dec 2014 16:40:13 +0000 (16:40 +0000)]
Add options for base dir and redirecting files to IRT open resource and use it.

These options are set by env vars: NACL_IRT_OPEN_RESOURCE_BASE and
NACL_IRT_OPEN_RESOURCE_REMAP. The redirection is used to map from
libpnacl_irt_shim.a to libpnacl_irt_shim_dummy.a.

Use these options with the PNaCl sandboxed translator, and
roll PNaCl translator ld DEPS. DEPS roll brings in:
https://codereview.chromium.org/770833002/

Also ensure that SPLIT_MODULE is always set in nativeld.py
so that the code can assume that value is valid.
Change the code so that when SPLIT_MODULE=1, the inputs
are partitioned into llc_output/linker_input files and
other linker input files, just like when SPLIT_MODULE > 1.
The consistent partitioning helps check that all native
libraries can use the same base_dir with open_resource.

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

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

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

2 weeks agoThe cached results from toolchain_build should be deterministic.
dyen@chromium.org [Mon, 1 Dec 2014 23:43:51 +0000 (23:43 +0000)]
The cached results from toolchain_build should be deterministic.

Now that we are using package_version to extract built packages right
after they are built, there seems to be issues of packages being
uploaded by multiple machines which causes hash mismatches. This CL
modified the TGZ creation during directory_storage so that they
produce deterministic archives.

BUG=None
TEST=trybots

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

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

2 weeks agoNest the pnacl section of untrusted.gypi to the same level.
bradnelson@google.com [Mon, 1 Dec 2014 21:39:20 +0000 (21:39 +0000)]
Nest the pnacl section of untrusted.gypi to the same level.

The pnacl sections of untrusted.gypi were nested one layer less deep
than other toolchains. This seems to result in >(_sources) being
expanded earlier for pnacl, resulting in misses sources in the
case of base_nacl.gyp in the chrome tree. This is likely because
this is one of the only places that we use target_defaults
to inject a non-variable 'sources' list.

Nesting to the same level seems to alleviate the issue.
(Hopefully giving us more correct dependencies.)

BUG=https://code.google.com/p/chromium/issues/detail?id=427427
TEST=local ninja check + trybots
R=mseaborn@chromium.org, derek@chromium.org

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

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

2 weeks agoRemove much of the unused parts of pnacl/build.sh
mseaborn@chromium.org [Mon, 1 Dec 2014 18:22:03 +0000 (18:22 +0000)]
Remove much of the unused parts of pnacl/build.sh

This is mostly dead code removal, since most of pnacl/build.sh is
superseded by toolchain_build/.  build.sh is now only used for
building the sandboxed translator.

This also removes a call to "binutils-liberty" which seems to be
unnecessary.

This removes:
 * trusted builds of LLVM and binutils
 * build of untrusted libraries (newlib, libcpp, compiler-rt, support
   libraries, libgcc_eh, newlib headers handling)
 * sync-sources, git-sync
 * gerrit-upload
 * toolchain download steps
 * entry points such as "everything", "build-all"

I'm not trying to be fully comprehensive here -- other unused parts
remain.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3719
TEST=PNaCl toolchain trybots
R=dschuff@chromium.org

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

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

2 weeks agoFix issue in DecodeEscaping() in debug_stub test
petarj@mips.com [Mon, 1 Dec 2014 12:04:25 +0000 (12:04 +0000)]
Fix issue in DecodeEscaping() in debug_stub test

DecodeEscaping(data) function has an issue with repeating escaped
characters, and wrong character gets repeated.
This issue fixes it.

BUG= run_debug_stub_test fails on MIPS
TEST= ./scons platform=mips32 run_debug_stub_test

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

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

3 weeks agoUpdate revision for PNaCl r14144->r14148
hamaji@chromium.org [Thu, 27 Nov 2014 08:57:11 +0000 (08:57 +0000)]
Update revision for PNaCl r14144->r14148

Pull the following PNaCl changes into NaCl:
  r14148: (dschuff@chromium.org) PNaCl: Update LLVM/clang/binutils-x86 revision in pnacl/COMPONENT_REVISIONS
    | 76c69a9: (jfb@chromium.org) Fix cmake build: MinSFI was incorrect
    | be5de11: (hamaji@chromium.org) Make all non-weak symbols hidden for better code
    | 72b17e0: (dschuff@chromium.org) Revert "De-C++11ify cherrypick of r220439"
    | 216cf01: (dschuff@chromium.org) Emit (and support) .dwarf_addr_size directive
    | 8d61550: (dschuff@chromium.org) Update clang localmods to use LLVM C++11 virtual/override style
    | f009fc8: (dschuff@chromium.org) Add .dwarf2_addr_size directive to gas

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
R= dschuff@chromium.org, jfb@chromium.org
TEST=git try
(Please LGTM this change and tick the "commit" box)

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

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

3 weeks agoPNaCl: Update LLVM/clang/binutils-x86 revision in pnacl/COMPONENT_REVISIONS
dschuff@chromium.org [Wed, 26 Nov 2014 21:00:10 +0000 (21:00 +0000)]
PNaCl: Update LLVM/clang/binutils-x86 revision in pnacl/COMPONENT_REVISIONS

This pulls in the following LLVM changes:

76c69a9: (jfb@chromium.org) Fix cmake build: MinSFI was incorrect
be5de11: (hamaji@chromium.org) Make all non-weak symbols hidden for better code
72b17e0: (dschuff@chromium.org) Revert "De-C++11ify cherrypick of r220439"
216cf01: (dschuff@chromium.org) Emit (and support) .dwarf_addr_size directive

Also update Clang to bring in:
8d61550: (dschuff@chromium.org) Update clang localmods to use LLVM C++11 virtual/override style

Also update Binutils-x86 to bring in:
f009fc8: (dschuff@chromium.org) Add .dwarf2_addr_size directive to gas

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3868
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3966
TEST= PNaCl toolchain trybots
R=jfb@chromium.org

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

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

3 weeks agoUpdate revision for PNaCl r14121->r14144
jfb@chromium.org [Tue, 25 Nov 2014 22:11:38 +0000 (22:11 +0000)]
Update revision for PNaCl r14121->r14144

Pull the following PNaCl changes into NaCl:
  r14124: (dschuff@chromium.org) Set the correct SCons platform when building core SDK libs for nacl-clang
  r14133: (dschuff@chromium.org) Update PNaCl build to bring in LLVM 3.5 merge
  r14138: (jfb@chromium.org) Fix cmake build
  r14140: (jfb@chromium.org) Update LLVM test-suite
  r14141: (jfb@chromium.org) Update libc++ version
  r14144: (dschuff@chromium.org) Run expand-varargs pass as well as expand-byval when using zerocost exceptions

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
BUG= None
R=jvoung@chromium.org, dschuff@chromium.org, dscuff@chromium.org, dyen@chromium.org, jfb@chromium.org, kschimpf@chromium.org, mseaborn@chromium.org, stichnot@chromium.org
TEST=git try
NOTRY=true
(Please LGTM this change and tick the "commit" box)

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

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

3 weeks agoFixed issue with package_version where overlaid extractions are skipped.
dyen@chromium.org [Tue, 25 Nov 2014 21:15:54 +0000 (21:15 +0000)]
Fixed issue with package_version where overlaid extractions are skipped.

Overlaid extractions should be combined with the original package
description before we check if the extracted packages match.

R=jvoung@chromium.org
BUG=None
TEST=trybots

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

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

3 weeks agoRun ARM GDB tests using DWARF 3 when building with LLVM
jfb@chromium.org [Tue, 25 Nov 2014 20:16:09 +0000 (20:16 +0000)]
Run ARM GDB tests using DWARF 3 when building with LLVM

The move to LLVM 3.5 broke line info reading for the bots' (pretty old) local GDB.

R=jvoung@chromium.org, dschuff@chromium.org, mcgrathr@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
TEST= git cl try -b nacl-arm_opt_panda

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

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

3 weeks agoRun expand-varargs pass as well as expand-byval when using zerocost exceptions
dschuff@chromium.org [Tue, 25 Nov 2014 17:03:24 +0000 (17:03 +0000)]
Run expand-varargs pass as well as expand-byval when using zerocost exceptions

On NaCl targets int64s and doubles use alignment of 8 instead of 4
(the equivalent of the -malign-double flag), whereas on x86-32 Linux they
have alignment of 4. However the alignment of double arguments passed on
the stack is still 4 in all cases. With le32 bitcode, the frontend leaves
va_arg calls as intrinsics which are expanded by the -expand-varargs pass
at link time. With x86-32-native bitcode, the frontend expands them itself.
When using --pnacl-allow-exceptions, the normal ABI simplification passes
are not run, but -expand-varargs must be run or this test will fail because
after LLVM 3.5 the backend will use 8-byte-aligned load to expand the va_arg
intrinsic.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
R=jvoung@chromium.org

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

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

3 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Tue, 25 Nov 2014 09:22:12 +0000 (09:22 +0000)]
Update .DEPS.git

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

3 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Tue, 25 Nov 2014 09:03:08 +0000 (09:03 +0000)]
Update .DEPS.git

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

3 weeks agoUpdate libc++ version
jfb@chromium.org [Tue, 25 Nov 2014 01:25:17 +0000 (01:25 +0000)]
Update libc++ version

Pull in the following change from the libc++ repo:

    libc++: fix the traps numeric_limits test

    We have a localmod in <limits> but not in the test. I'll update
    libcxx_known_failures.txt with the LLVM 3.5 roll, and update COMPONENT_REVISIONS
    at the same time.

TBR=dschuff@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
TEST= ./pnacl/scripts/llvm-test.py --libcxx-tests

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

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

3 weeks agoUpdate LLVM test-suite
jfb@chromium.org [Tue, 25 Nov 2014 01:22:50 +0000 (01:22 +0000)]
Update LLVM test-suite

This CL updates PNaCl's LLVM test-suite to the latest version, and it does so
using the (new!) official git mirror instead of the old SVN clone. This means
that the entire history just changed, and that anyone with a full checkout of
llvm-test-suite will need to do the following:
  git fetch origin
  git checkout master
  git reset --hard origin/master

The way this was done (with dschuff's help) was as follows:
  cd ./toolchain_build/src/llvm-test-suite
  git remote add -f upstream http://llvm.org/git/test-suite.git
  git checkout master
  git pull master
  git diff origin/upstream/master..master > pnacl.patch
  # Figure out what our latest commit from upstream is, find the equivalent in
  # the official upstream git mirror, and create the new branch from it:
  git checkout -b move-to-official-git $( \
    git log -n1 remotes/origin/upstream/master --format=%s | \
      xargs -I{} git log --all --grep='{}' --format=%H | \
      grep -v $(git log -n1 remotes/origin/upstream/master --format=%H))
  git apply pnacl.patch
  # Run the merge.sh script, resolve merge conflicts...
  ./merge.sh
  tree=$(git log --pretty=format:%T --no-walk HEAD)
  commit=$(git commit-tree -m 'Merge upstream LLVM.' \
      -p $(git merge-base HEAD $( \
             git log -n1 remotes/origin/upstream/master --format=%s | \
     xargs -I{} git log --all --grep='{}' --format=%H | \
     grep -v $(git log -n1 remotes/origin/upstream/master --format=%H))) \
      -p $(git merge-base HEAD upstream/master) \
      $tree)
  git checkout $commit
  git push --force-with-lease origin HEAD:master

R=dschuff@chromium.org, jvoung@chromium.org, kschimpf@chromium.org, mseaborn@chromium.org, stichnot@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
TEST= self

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

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

3 weeks ago[MIPS] Avoid use of non-existent MIPS dirs with biased bitcode
petarj@mips.com [Mon, 24 Nov 2014 19:01:53 +0000 (19:01 +0000)]
[MIPS] Avoid use of non-existent MIPS dirs with biased bitcode

Follow up to r14127 that broke the smoke test suite build for MIPS.
Toolchain directories do not containing MIPS biased bitcode libraries,
so skip the part that attempts to construct a path to it.
Also it fixes a typo.

BUG= smoke test can not be run for MIPS
TEST= ./scons platform=mips32 smoke_tests

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

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

3 weeks agoFix cmake build
jfb@chromium.org [Mon, 24 Nov 2014 18:45:50 +0000 (18:45 +0000)]
Fix cmake build

The cmake build was slightly broken after the LLVM 3.5 merge. Fix it.

R= dscuff@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
TEST= ./toolchain_build/toolchain_build_pnacl.py --verbose --cmake

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

3 weeks agoUpdate .DEPS.git
chrome-admin@google.com [Mon, 24 Nov 2014 17:25:07 +0000 (17:25 +0000)]
Update .DEPS.git

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

3 weeks agoadd avx1 xmm/ymm/memory move instructions.
shyamsundarr@chromium.org [Mon, 24 Nov 2014 17:24:12 +0000 (17:24 +0000)]
add avx1 xmm/ymm/memory move instructions.

This corresponds to:
 (vmovapd | vmovaps | vmovddup | vmovdqa | vmovdqu | vmovhlps |
  vmovhpd | vmovhps | vmovlhps | vmovlpd | vmovlps | vmovsd |
  vmovshdup | vmovsldup | vmovss | vmovupd | vmovups)

being added

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

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

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

4 weeks agoAdded raw toolchain variants so they get synced through package_version.
dyen@chromium.org [Fri, 21 Nov 2014 22:45:39 +0000 (22:45 +0000)]
Added raw toolchain variants so they get synced through package_version.

R=dschuff@chromium.org
BUG=None
TEST=trybots

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

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

4 weeks agoAdded support for revision sets which keeps packages in sync.
dyen@chromium.org [Fri, 21 Nov 2014 22:17:25 +0000 (22:17 +0000)]
Added support for revision sets which keeps packages in sync.

We often want various packages to always be kept in sync with one
another in regards to revisions. The package_version tool now supports
a "revision_set" concept which updates an entire set of packages when
a single revision name is updated.

The "pnacl_newlib" package has been converted to a revision set which
contains both "pnacl_newlib" and "pnacl_translator". Now both are
updated automatically.

R=dschuff@chromium.org, jvoung@chromium.org
BUG=None
TEST=setting pnacl_newlib revision also sets pnacl_translator

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

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

4 weeks agoUpdate PNaCl build to bring in LLVM 3.5 merge
dschuff@chromium.org [Fri, 21 Nov 2014 16:47:13 +0000 (16:47 +0000)]
Update PNaCl build to bring in LLVM 3.5 merge

* Update COMPONENT_REVISIONS to include LLVM, clang, and subzero updates
* Update build.sh for translator build compatibility with host libc++ and to avoid passing -ffunction-sections et al. to pnacl-ld
* Update driver and build scripts with new version number
* Update pnacl-finalize to strip module flags (removing debug-related flags)
* Update pnacl-translate to use llc's new spelling of -function-sections flags and to use llc's new flag to use DWARF instead of EABI EH
* Update test expectations for LLVM regression, LLVM testsuite, and Scons toolchain_tests.
* Update Mac host build flags for libc++/OSX 10.6 compatibility.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930
R=jvoung@chromium.org

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

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

4 weeks agoDebug stub test: Get local data symbols in GetSymbols()
hamaji@chromium.org [Fri, 21 Nov 2014 16:14:32 +0000 (16:14 +0000)]
Debug stub test: Get local data symbols in GetSymbols()

https://codereview.chromium.org/699863002/

will make some symbols hidden. Without this change, the test
fails because debug stub test cannot find a few symbols.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3868
TEST=./scons --mode=nacl,opt-host platform=arm bitcode=1 \
     skip_trusted_tests=1 pnacl_generate_pexe=0 nonpexe_tests
     # With the PNaCl LLVM change

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

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

4 weeks agoAdd pthread_attr_setscope/getscope to NaCl pthread implementation
sbc@chromium.org [Fri, 21 Nov 2014 02:13:00 +0000 (02:13 +0000)]
Add pthread_attr_setscope/getscope to NaCl pthread implementation

These mimic the glibc/linux implementation in that they
only support PTHREAD_SCOPE_SYSTEM. Although these functions
are essentially no-ops they ease the porting process for
software that depends on them.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3721
TEST=run_thread_test

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

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

4 weeks agoCleanup: Use Bit('build_ARCH') instead of Bit('target_ARCH') in tests/
mseaborn@chromium.org [Fri, 21 Nov 2014 01:17:31 +0000 (01:17 +0000)]
Cleanup: Use Bit('build_ARCH') instead of Bit('target_ARCH') in tests/

The distinction between "build" and "target" architecture is obsolete
-- the two are always the same.  This is a step towards removing the
"target" variants, to match what we've already done with the
NACL_BUILD/TARGET #defines.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2703
TEST=trybots

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

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

4 weeks agoSet all toolchain revisions to revision 14121.
dyen@chromium.org [Thu, 20 Nov 2014 22:58:08 +0000 (22:58 +0000)]
Set all toolchain revisions to revision 14121.

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

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

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

4 weeks agoChange nonsfi i686 target name in libpthread to match other modules
dschuff@chromium.org [Thu, 20 Nov 2014 21:25:56 +0000 (21:25 +0000)]
Change nonsfi i686 target name in libpthread to match other modules

No functionality change, but it will reduce bitcode linker warnings about
mismatched target triples.

R=mseaborn@chromium.org
BUG=none

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

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