Bullet 2.81

BUG=none
R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@908 7dad1e8b-422e-d2af-fbf5-8013b78bd812
NaClPorts: Run sel_ldr tests in PNaCl build.

Runs for Box2D, giflib, yajl, zlib. Crashes w/ nacl_mounts...

Only runs x86-32 and x86-64, since there's no ARM sel_ldr in the SDK
(or no QEMU). Some tests only run the x86-64 version.

R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@909 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Cleanup RunSelLdrTests commands.

Most don't need to test for ARM/PNaCl, it's now rolled into
WriteSelLdrScript.

BUG=none
R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@910 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Use LIBS for curl build, instead of LDFLAGS w/ whole-archive.

The whole-archive makes the PNaCl build incredibly slow.
Every configure test ends up linking in *all* of lnacl_io
and optimizing it. The current curl build takes 25 min on
the build bots.

LDFLAGS ended up *before* conftest.c, so it wasn't able to
find "connect" for libnacl_io.a, unless there is a
whole-archive flag.  On the other hand LIBS goes *after*
conftest.c, so it is able to find "connect" in libnacl_io.a
without whole-archive.

R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@911 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Change openssl build to not have OPENSSL_NO_SOCK.

This is an attempt to fix the PNaCl ruby build on the bots.
The bots build openssl before building ruby, so it tries
to use openssl.  However, it uses SSL_set_fd, which is
if-def'ed out if OPENSSL_NO_SOCK=1.

BUG=https://code.google.com/p/naclports/issues/detail?id=86
R=dpolukhin@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@912 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Allow for environment isolation in build scripts

Some applications require intermediate binaries (e.g. compilers,
interpreters, code generators) as a part of the build. Those with
support for cross-compilation assume that you set appropriate
environment variables (e.g. CC, CXX, CFLAGS, CXXFLAGS) during
configuration to point to the target system toolchain (which is
Native Client in our case), but during the actual build these variables
point the host system toolchain. Howeverm this does not work with the
current build scripts which export all variables polutting the
environment.

This patch is a step towards fixing this issue. I have moved all the
variable exports into the respective functions where they are actually
needed instead of exporting them globaly. This allows build scripts
for individual application to invoke these steps in a subshell to
achieve the environment isolation if needed.

That means that the following function:

ConfigureStep() {
  ...
  DefaultConfigureStep
  ...
}

would become:

ConfigureStep() {
  ...
  (DefaultConfigureStep)
  ...
}

ensuring that any variables exported inside the DefaultConfigureStep
do not escape and polute the environment. For now, this is opt-in,
which means that the steps which should be isolated have to manually
wrapped in a subshell. If this proves to be useful, we might decide
to wrap all steps in a subshell by default in the future.

R=bradnelson@google.com

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@913 7dad1e8b-422e-d2af-fbf5-8013b78bd812
[NaClPorts] Update openssl from 1.0.0e to 1.0.1e.

Grab some newer features and bugfixes.

TEST= NACL_ARCH={pnacl,arm,i686,x86_64} make openssl
R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@914 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Use naclports variables instead of global variables in build scripts

This is a follow up to the environment isolation change. Since global
flags (i.e. CFLAGS, LDFLAGS) are now only being exported in each step
function, any build script which invokes these functions needs to use
naclports variables (i.e. NACLPORTS_CFLAGS and NACLPORTS_LDFLAGS).

BUG=
R=bradnelson@google.com, sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@915 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Remove -O2 workaround for libtiff + PNaCl.

Unstick the NaClPorts bots slightly, since there's
currently a failure using CFLAGS after r913:

./nacl-tiff.sh: line 14: CFLAGS: unbound variable

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

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@916 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix a couple more CFLAGS=${NACLPORTS_CFLAGS} issues.

R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@917 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix mimetype for pnacl builds of terminal apps.

Also convert gdb to use naclterm correctly.

R=bradnelson@google.com

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@918 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fixing gdb to function.

This worked locally to debug.

BUG=None
TEST=None
R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@919 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add emscripten as a new NACL_ARCH.

This is very incomplete; it's only enough to build libraries (not executables),
and I've only tested Bullet so far.

BUG=none
R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@920 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix curl/sqlite builds for pnacl.

They still crash when run, but at least they compile now.

BUG=none
R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@921 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix bug in argv passed to python and lua.

Turns our argv has to be NULL terminated and
lua was relying on this.  Fix is to simply
pass the argv provided by ppapi_simple.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@922 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Move gdb builds to unique subfolders.

This matches the behaviour of most other
autoconf-based builds.

Also, pass argv and argc from ppapi_simple
to gdb main.

R=bradnelson@google.com

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@923 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix broken headers in glibc-compat.

Update features.h which is a patched version of the newlib
version.  The new version includes recent changes to newlib's
features.h without which the glibc-compat will not compile.

Remove sys/dir.h and sys/_types.h headers which are exact
duplicates of those that already ship in the newlib toolchain.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@924 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Switch thttpd from nacl-mounts to nacl_io

We now have enough support for sockets in nacl_io to
support thttpd.  We even support non-blocking sockets
and fcntl() so the patch got a little smaller too.

Remove all the javascript interop code for reading html5fs
directories.  nacl_io uses PPAPI for this now.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@925 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add DROD example game.

This also adds metakit, which is required for DROD.

BUG=none
R=sbc@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@926 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix/Improve building on mac.

Don't attempt to run sel_ldr tests on mac
when arch is x86_64, since we don't currently
ship sel_ldr_x86_64 for mac.

Default to i686 on mac since chome for mac is
i686 only.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@927 7dad1e8b-422e-d2af-fbf5-8013b78bd812