Remove headers from glibc-compat that we now ship in the SDK.

Add missing syscall stubs to glibc-compat.

Also, install the headers from "NACL_SDK_ROOT/include/<toolchain>"
into the toolchain include folder.  This is needed since
configures doesn't pass CFLAGS when checking for headers.

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

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

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

Recent changes to the newlib socket headers broke
the glibc-compat build.  It was relying on the headers
defining inet_aton and friends to __inet_aton,etc.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@848 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add implicit finalize to default translate step.

Without this the new pnacl-translate will fail on
the non-finalized executables.  For example lua and
minigzip are both failing with the latest SDK.

This needs to roll into chromium repo to fix the
current build breakage there.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@849 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Handle both old and new pnacl toolchain locations.

Once this change lands it will need to be integrated
into chromium as or before the toolchain location change
lands.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@850 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Stop using -O0 for pnacl link in nacl_ports, use standard flags. 

Since we no longer run pnacl-opt, might as well link with 
the standard flags, rather than try to influence it to being 
-O0. That way, when we study bitcode size we can just 
control things via NACL_DEBUG. 

NACL_DEBUG will give you -O0, and otherwise you get -O2.

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

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@851 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix naclports builds which were broken by recent SDK changes.

SDL: Add missing include of <sys/mount.h>
nacl-mounts: irt_filename interface renamed
mpg123: disable networking (the socket headers were recently
added by the syscall are not in libnacl, and we don't link
with nacl_io)
git: Disable git build by default (it doesn't build on glibc
due to missing -ldl)
ffmpeg: Add dependency on glibc-compat.  This is needed now that we provide termios.h since ffmpeg starts depending select/signal/etc in this case.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@852 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix dosbox and nethack builds.

TBR=binji

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@853 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix pnacl build of lua

TBR=binji

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@854 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Use 'out' folder to when downloading NaCl SDK

Also, don't redownload/extract if existing SDK is the same
as the latest one found online.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@855 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix broken SDK download script.

The download script now uses the out directory, but
was not checking that the direcotry existed before
using it.

TBR=binji

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@856 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Don't remove entire out directory on 'make clean'

Only remove certain direcotires from the out direcotry
on 'make clean'.  In paritular, don't remove the cache
of downloaded tarballs, the publish folder, or (in the
case of the bots) the nacl sdk root itself.

'make reallyclean' can be used to remove the absolutely
everything if needed.

TEST=./buildbot_selector.sh
R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@857 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Update newlib and pnacl builds of python.

Remove newlib TODOs from the python patch now that fsync,
fdatasync are in nosys, and ftruncate is in the newlib
headers.

Move dummy implementations of getcwd() and uname() to only
the sel_ldr build of python.  These are provided by nacl_io
in the PPAPI build.

Honor NACL_DEBUG=1 when building python_ppapi.

Modify mine type embedded in python.js when deploying pnacl
build.

Add more built-in native modules to newlib build of python.

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

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@858 7dad1e8b-422e-d2af-fbf5-8013b78bd812
upload the publish directory to commondatastorage in buildbot scripts.

Also, add buildbot_test.sh script to make local testing
of buildbot scripts easier.

TEST=./buildbot_test.sh
R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@859 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix gsutil location on bots

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@860 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix python pnacl build.

Modify glibc_compat to not rely on __weak_reference which
doesn't work on pnacl.

Add missing include to python_ppapi entry point.

TBR=binji

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@861 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Add load progress and exit handling to terminal apps.

R=bradnelson@google.com

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@862 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Publish into seperate folders per toolchain.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@863 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix gsutil uploading in buildbot scripts.

Calculate gsutil location and unset the requisite variables
in a single location for all bots.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@864 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Fix bug in buildbot_selector.

We can't set PEPPER_VER until after the SDK is installed.

Also, refactor to remove code duplication.

R=binji@chromium.org

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

git-svn-id: https://naclports.googlecode.com/svn/trunk/src@865 7dad1e8b-422e-d2af-fbf5-8013b78bd812
Make gcc error out if -shared is used with newlib.

Unfortunately the old version of gcc that we ship for x85-newlib
produced 257Mb files when -shared is used.  In fact, -shared is
not suppored.  This change modifies the specs file of the compiler
to produce an error message if -shared is passed to the linker.

R=binji@chromium.org

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

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