History log of /ndk/build/tools/rebuild-all-prebuilt.sh
Revision Date Author Comments
5de3ded3f0e11d3505ca8d0238108ec254721fa7 15-May-2013 Logan Chien <loganchien@google.com> Fix "--try-64" flag for rebuild-all-prebuilt.sh

The flag "--try-64" was not propagated to the other scripts.
This CL fix this issue by renaming HOST_FLAG to HOST_FLAGS.

Change-Id: I84b9877e84b276152609a584e3c3896d4469ccd4
454a4461e791257580af5975656f16785dcac1ab 14-Mar-2013 Andrew Hsieh <andrewhsieh@google.com> Misc fixes

1. only strip binaries in build-llvm.sh
2. don't package ld.mcld.exe for now (until it's fixed)
3. build 64-bit host prebuilt first (so testing on AOSP
build can be launched earlier)

Change-Id: I7c6a1711204f5c2aad257617e363208c4428548f
3b28972d8a5a108579496233266fccd69c9d2fe5 17-Jan-2013 Andrew Hsieh <andrewhsieh@google.com> Fix canadian build

1. Rename functions *_mingw_* to *_canadian_* to cover new
switch --darwin which define DARWIN=yes and expect toolchain
prefix at ${DARWIN_TOOLCHAIN}-
2. Add new flags CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD
for "build". See https://android-review.googlesource.com/#/c/50032
and https://android-review.googlesource.com/#/c/50121
Now we can export LDFLAGS as well.
3. Add NATIVE_CC for awk which needs to run "maketab"
4. "Clean up" in build-ndk-stack.sh
5. Fix make-3.81 and sed-4.2.1 configure $CPP to take $CFLAGS as well
6. make-release.sh and rebuild-all-prebuilt.sh build darwin-x86 too
if ${DARWIN_TOOLCHAIN}-gcc is found

Change-Id: If0d1452990b705e0d62b9e8c6de8911296158533
524869abdbd228ccb916cc9a4902550dd6382ba2 02-Jan-2013 Andrew Hsieh <andrewhsieh@google.com> Add --also-64 to build/tools/rebuild-all-prebuilt.sh

The default builds 32-bit host toolchain
The existing --try-64 builds 64-bit host toolchain instead
The new --also-64 builds both 32- and 64-bit toolchain

Change-Id: If838215f81c90d6c51293988f36c40b68a867cb0
61274001e503a62031d51cee410806d9aac3d210 14-Oct-2011 David 'Digit' Turner <digit@google.com> rebuild-all-prebuilt.sh: Rewrite the script

This rewrites the script completely to invoke the new
build-host-prebuilts.sh and build-target-prebuilts.sh
scripts instead.

We no longer make the script download or unpack the toolchain
source directory, instead you will have to provide it manually,
as in the following example:

$NDK/build/tools/download-toolchain-sources.sh /tmp/ndk-$USER/src
$NDK/build/tools/rebuild-all-prebuilt.sh /tmp/ndk-$USER/src

Change-Id: I9f03d13105b7b67a0570a119014a3739f5581d6c
b0d90531b30c42891feaa4860e21ed43af63c93a 10-Oct-2011 David 'Digit' Turner <digit@google.com> build/tools/dev-defaults.sh: new script

This patch moves the definitions of all defaults to dev-defaults.
This should make it easier in the future to upgrade the toolchains
or target binaries.

Change-Id: I140b51c5b5116d37d16e628120f8f58974252de4
223fc9fca598b371b4429e25eaedfde57ac8d540 03-Oct-2011 David 'Digit' Turner <digit@google.com> build-gcc.sh: Remove --copy-libstdcxx and --keep-libstdcxx options

These options are obsolete. Instead, the build-gnu-libstdc++.sh
script can be used to rebuild the GNU libstdc++ library directly.

Change-Id: I281653915a5bce272ac8d593038291b73270c128
49e5ea4fdd8960bbc856136c2aa7715292955c55 23-Sep-2011 David 'Digit' Turner <digit@google.com> Update GDB to version 7.1.x

Change-Id: Idabf82e3fa909a1000011fd621810a62857e453e
3da537977a724ebf88ba889f0d8177ea20f5c007 22-Sep-2011 David 'Digit' Turner <digit@google.com> prebuilt-common.sh: Distinguish host and target builds

This patch modifies the helper functions inside prebuilt-common.sh
to distinguish between host and target builds more easily.

A target build is used to build target Android binaries, while a host
one is used to build binaries that will run on the host machine, i.e.
invoked by the NDK build script.

We will use host builds to generate the Windows helper binaries that
the NDK depends on (sed, awk, make, etc...) in future patches.

Change-Id: Ifbc2a112ee08fa42c9987ee26fee4539476e91a4
c38f5f527a59f1d849371d662f8882d325edc3bf 14-Sep-2011 David 'Digit' Turner <digit@google.com> GAbi++: new C++ runtime with RTTI support

This patch adds a new C++ runtime that can be used by modules
by setting APP_STL to either 'gabi++_static' or 'gabi++_shared'
in their Application.mk

GAbi++ is an alternative to the GNU libsupc++ that provides
RTTI support (with exceptions added in the future).

The goal is to use it to support RTTI (and later exceptions)
with our version of STLport, or even a different non-GNU STL.

+ new build-gabi++.sh script to rebuild the prebuilt libraries
from sources.

+ support in rebuild-all-prebuilt.sh

+ support in package-release.sh

+ Unit test to check that RTTI actually works, both in the
static and shared library case.

Change-Id: I7e73a31a4d24b5baa36fef357b69064c192ddc56
c0bf90ae0f4f84875d0af5d7166b57deb77e57a3 28-Jun-2011 David 'Digit' Turner <digit@android.com> ndk-stack: Fixes + Documentation

This patch fixes the ndk-stack tool to properly work as advertized, and
adds a new documentation file (docs/NDK-STACK.html) to illustrate its usage.

+ Add build/tools/build-ndk-stack.sh to automatically rebuild the
host tool from sources (and from scratch).

+ Ensure that rebuild-all-prebuilt.sh invokes build-ndk-stack.sh
and places the resulting binary at the top of target NDK directory.

+ Ensure that package-release.sh places the prebuilt binaries into
the final packages.

+ Add a --host-only option to rebuild-all-prebuilt.sh to indicate
that you only want to rebuilt the host binaries (and none of the
target ones). The --darwin-ssh and --mingw options also imply
--host-only.

Change-Id: I5f26e83378c02bfd3b62fa76a7c50c5755104fa9
951491bfe4536a1cde79d7db4134ba81a9988bd9 25-Jun-2011 David 'Digit' Turner <digit@android.com> Fix build-stlport.sh

We fix the script used to rebuild the STLport prebuilt libraries.
Instead of requiring a valid NDK installation, we only need prebuilt toolchain
binaries and platforms files instead.

By default, the script now builds a temporary Makefile that contains all the
build instructions. This allows us to launch it with parallel jobs (see -j<num>
options). You can use the new --no-makefile flag to disable this and build all
files in sequence directly from the script.

+ Fix the --package-dir option.

Note that this also fixes rebuild-all-prebuilt.sh which uses build-stlport.sh

Change-Id: Icf64e700cc110d2b304f0372875aa7752cb0ad82
b9007524f8244c5a7083447ef0342388d4c39c02 03-Jun-2011 David 'Digit' Turner <digit@android.com> Remove arm-eabi-4.4.0 support

The arm-eabi-4.4.0 was deprecated a long time ago, now remove any support
for it from the NDK to simplify things.

Change-Id: I41e65539824673466a1fc4c22bbd0d42a49d1394
3592767ce5ca9431eea728370c99d97aadb0800e 03-Jun-2011 David 'Digit' Turner <digit@android.com> build-stlport.sh: make script error-proof.

This patch improves build-stlport.sh by making it check that it can
use a fully complete NDK installation to perform the STLport libraries
build. Before that, it was easy to call the script from an incomplete
NDK installation (e.g. from the ndk git repository itself without
having called build-platforms.sh or built the toolchain previously).

Also modify rebuild-all-prebuilt.sh to properly call build-platforms.sh
before building the STLport libraries. As a secondary effect, this fixes
the "rebuild-all-prebuilt.sh --arch=x86" case.

Note that this breaks the --darwin-ssh option, but this issue will be
addressed in a later patch. You can still run build-all-prebuilt.sh
directly on a Darwin machine to generate the binaries.

Change-Id: I257f8536d3d156bc82f862d7f57a45ec39ebc8fe
7a54bc8cb5965d2fa65ccbe722bb2f42e0bbb9b4 30-May-2011 David 'Digit' Turner <digit@android.com> Ensure all build scripts use /tmp/ndk-$USER/

This patch ensures that all the scripts used to rebuild the NDK
are putting stuff under /tmp/ndk-$USER. This allows several users
to use the same NDK installation in parallel.

More cleanup will soon follow.

Change-Id: Iec765e44c7f89c9fbf21c15bfd69fb88b1bc03b9
fbbf8dea91caea05b36bb1060e442cd1d30bf36c 08-Apr-2011 David 'Digit' Turner <digit@android.com> rebuild-all-prebuilt.sh: Fix --darwin-ssh with --arch=x86

This patch allows one to use both --arch=x86 and --darwin-ssh=<host>
to remotely build the x86 prebuilt binaries on a Darwin machine
accessed remotely through ssh.

Change-Id: I1e375237912b1cd4767cc6db67d877ebf07b7b89
19fdb17143b383c09c77757c212b1886d2d49c7b 07-Apr-2011 David 'Digit' Turner <digit@android.com> Remove x86-4.2.1 from rebuild-all-prebuilt.sh

This toolchain is now completely obsolete.

Change-Id: Ib0eb9a465804dbc1b268850f3e2068e84d0024b4
e9b7c49eb604afb2311e1514d43dd87679b905d8 01-Apr-2011 Bruce Beare <bruce.j.beare@intel.com> rebuild-all-prebuilt: add -verbose option

Change-Id: Ieecb307c906fdf3b26e54ba717cdc9cae8544db9
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
c75d928b614d55447b1a589fad88017bd33cec5b 24-Feb-2011 Martin Storsjo <martin@martin.st> Fix a typo

Change-Id: I780c1b7bdcd2f4293be904e5dc46088960307feb
aa6f65b711f6d4ad8c6216de7680413edd0ab83a 17-Feb-2011 Bruce Beare <bruce.j.beare@intel.com> The x86-4.4.x is now named x86-4.4.3

Change-Id: I23eeceae148c6911d54b3536ee5741e786f77ecd
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
f443f173035da627fcd48b22a5097dac84a00fa0 31-Jan-2011 Bruce Beare <bruce.j.beare@intel.com> rebuild-all-prebult: replace --try-x86 option with --arch

Change-Id: I7d5a0d33dc5ea206e505763586e25a18c1cea261
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
bc4b67a2bde188722b2ce6541e3175446cacdd06 31-Jan-2011 Bruce Beare <bruce.j.beare@intel.com> rebuild-all-prebult: add options for binutils-version, mpfr-version, sysroot

Change-Id: I8a8aaa2ed2aa889526802674ccc4edbb5919d57d
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
99fe4b8ad34283a065b90fb6cd56999c8998da35 02-Dec-2010 David 'Digit' Turner <digit@google.com> Support remote Darwin builds on Linux.

This patch adds a --darwin-ssh=<hostname> option to both
rebuild-all-prebuilt.sh and make-release.sh. This allows one
to launch a build of Darwin binaries through ssh from a Linux
machine.

The idea is to fully automate the rebuild of all toolchain
binary tarballs. When the "mingw32" package is installed, the
"make-release.sh" script should be able to generate binaries
for all three supported systems now (provided --darwin-ssh is
used).

Change-Id: I8a62b47d4431c231de38cb9a425833bf9e648c84

+ fix minor bugs in script options parsing.
+ fix minor bug in run-tests.sh
728259794fa6d8f81d211124dfc8935f6314d56d 30-Nov-2010 David 'Digit' Turner <digit@google.com> Package and use libsupc++ prebuilt tarballs.

Since the mingw build cannot generate valid libsupc++ binaries
we need to package them during the Linux build and reuse the
new tarballs when packaging new releases.

Change-Id: I6a84d2ba7737cdc3e59cce2ff65f4b477abae19a
da25f0b61422ac8d908778bf2bca5406919afe6a 30-Nov-2010 David 'Digit' Turner <digit@google.com> Generate GNU libstdc++ static library binaries and tarballs.

These are placed under sources/cxx-stl/gnu-libstdc++
Another patch will add APP_STL support for them.

Change-Id: I63bb6d2bd25eefb474d21b18979e9b72024ee613
b7265a10bee71832e6fadf114a7d45d7a0c2e046 30-Nov-2010 David 'Digit' Turner <digit@google.com> rebuild-all-prebuilt.sh: simplify script

+ fix STLport rebuild issue when the toolchain binaries
are not in the current NDK directory.

Change-Id: I35c7a5cc22564142c5a305d2b1273a350f22a8f1
8b1664f43e66813a489d32ee072b58bd62c6acf9 26-Nov-2010 David 'Digit' Turner <digit@google.com> Fix handling of mingw toolchain builds.

Rather than forcing all mingw builds to use -j1, start in parallel
and only retry with -j1 if an error is detected. This seems to be
enough to build the toolchain, and doesn't penalize machines where
the build does succeed in parallel.

+ Disable gold linker for mingw builds: it doesn't compile at all
for now!

Change-Id: I53041f8b98d970b80e42f5919014c370d62ad7c5
e1ffa3fd89266e13c887a8d25f6f7eb4abfa0ec2 25-Nov-2010 David 'Digit' Turner <digit@google.com> Proper thread support for gdbserver.

WARNING: DEEP MAGIC AHEAD!

This patch allows the gdbserver binary that we build for the
NDK to properly support threads on Android 2.3 and higher.

For previous platforms, the binary will still be limited to
to only set breakpoints on the main thread (just like with
previous NDK releases).

The root cause of the problem is a platform bug that was only
fixed in Android 2.3, so there is little we can do in the NDK
to fix it (apart from hoping the fix is back-ported properly).

Now the hairy details:

- The patch provides sources for libthread_db.a which will
get recompiled explicitely by build-gdbserver.sh.

Note that libthread_db has no real stable ABI/API so we
provide GDB version-specific implementations here
(see sources/android/libthread_db/gdb-<version>)

- Both libthread_db.c versions have been modified to probe
the system at runtime and detect if the platform bug is in
effect.

If it is, the library acts as if there are no threads in the
process. The reason for this behaviour (i.e. instead of
patching the gdbserver sources) is explained in comments
inside libthread_db.c.

+ Local patches to make signal handling and libthread_db support work
properly with gdbserver 6.6.

Change-Id: Idf3d71422d337f4384f51ca45cafe7f71fd8559d
12e952239e53d4b57721f9a5862accb32770bc53 23-Nov-2010 David 'Digit' Turner <digit@google.com> Disable parallel mingw toolchain builds.

For some reason, the mingw builds often fail mysteriously when run
in parallel. For now, disable parallel builds until we debug the
issue properly.

Change-Id: I2ca01103b16aa63048ae23a1085460e644dd4cca
25fc114e97e8e31af9c8a47f80ca4fbd134bf912 19-Nov-2010 David 'Digit' Turner <digit@google.com> Add support for prebuilt STLport binaries.

This patch allows the NDK to be redistributed with prebuilt
STLport binaries, since rebuilding the library from sources
is quite slow, and its implementation should not change.

Note that the binaries are not added to the NDK git repository.
Instead:

- build/tools/build-stlport.sh is a new script that can be used
to rebuild the binaries and package/copy them appropriately.
It requires a valid NDK installation (i.e. with working toolchain
binaries)

- rebuild-all-prebuilt.sh and package-release.sh are also modified
to rebuild STLport and unpack the prebuilt tarballs when necessary.

- tests/build/prebuild-stlport is a fake project that is used
by build/tools/build-stlport.sh to force the rebuild of the
libraries with the NDK (the script later copies/packages the
libs to the appropriate location).

- sources/android/stlport/Android.mk is modified to auto-detect
whether the binaries are installed under the libs/<abi>/ subdir.
If not, the library will be rebuilt from sources.

Rebuilding from sources can be forced by setting STLPORT_FORCE_REBUILD
to 'true' in your environment. That can be useful for debugging purpose.

+ improve 'pretty-dir' function to recognize the NDK path as a prefix
and replace it in the output by '<NDK>'

+ improve formatting of NDK build messages for prebuilt binaries.
Now it looks like:

Prebuilt : <libname> <= <source-directory>/

Change-Id: I5158b9d7f13e0f6252d89f82b6fd2960e4a2ab1f
a0f307d9a1b8e0d5e2a8b4ea0a4126ef7fb3a29b 06-Oct-2010 David 'Digit' Turner <digit@google.com> Rework toolchain build scripts.

* 'make-release.sh' can now be used to rebuild
everything *from* scratch (ultra long).
Use the new 'package-release.sh' if you want the old behaviour.

* 'download-toolchain-sources.sh'will now apply patches
by default before packaging the sources into a tarball.
Use the --no-patch option to prevent this.

* Add missing patches for proper Canadian-cross build
and gdbserver thread support under build/tools/toolchain-patches

* Rework the way 'rebuild-all-prebuilts.sh' works

* Update docs/DEVELOPMENT.TXT to indicate how things work in
the new world order.

This change doesn't affect the NDK build system itself but simplifies
release package generation greatly.

Change-Id: I9a07fe1e64450b0d1329c4a9b47c22094cb29617
e11a9b58ffe6d0dd9c61b651e2ce39ef0601e186 24-Sep-2010 David 'Digit' Turner <digit@google.com> Reorder location of toolchains files.

build/toolchains/<name>/* --> toolchains/<name>/*
build/prebuilt/<system>/<name>/lib/gdbserver --> toolchains/<name>/prebuilt/gdbserver
build/prebuilt/<system>/<name>/ --> toolchains/<name>/prebuilt/<system>/

The main idea is to group all toolchain-related files under the same directory.

Change-Id: Idb41de49b5d81b6881ac4e0eea24506ff4a07f03
ea573da2c3f1a8379f4344d023035fdf795c768d 24-Jul-2010 David 'Digit' Turner <digit@google.com> Update toolchain to arm-linux-androideabi-4.4.3

You can still use the old one with NDK_TOOLCHAIN=arm-eabi-4.4.0
defined in your environment.

Removed support for arm-eabi-4.2.1

+ Add --mingw option to build/tools/build-gcc.sh

Change-Id: I03f6b7cb67b1110e5794da9c4e9b6b8d1e029bb9
fdb474627a9cfdfd650c974e9c1ec28f0c0ed520 14-Jul-2010 David 'Digit' Turner <digit@google.com> Add --git-http option to download-toolchain-sources.sh

Change-Id: I9e77ef663758f9c5d48181f111158e63eda4c5ee
24f3d9e99d26d478caf1f1c287bd95687e6cba64 01-Jun-2010 David 'Digit' Turner <digit@google.com> ndk/build/tools: fix improper mktemp usage

Change-Id: I592b025ebdf2181a80f5c7014fb40d3cdcd8e2ca
1e2d5412dd2ff828508ab6fb505b213647a46bd3 11-May-2010 David 'Digit' Turner <digit@google.com> Move samples from apps/<name>/project to samples/<name>

Update documentation accordingly

Note: removes obsolete unit tests under apps/unit-tests/
+ fix --verbose option in build/tools/rebuild-all-prebuilt.sh
+ add NX support to x86-4.2.1 toolchain config file
+ update .gitignore

Change-Id: I3c8e6185ad41f103a425387d7618ab3e73182fdc
8eb71acd0f6c0fb89099af2cfbf71a6a5570b3f9 28-Apr-2010 David 'Digit' Turner <digit@google.com> Fix rebuild-all-prebuilt.sh, and add --try-x86 option.

--try-x86 is used to enable the build of the x86-4.2.1 toolchain.

Change-Id: Ie018d5c1e2ebb082058f522058a643a00825b70a
f051ab722edb8c443e73dea83724e50f6c858970 16-Apr-2010 David 'Digit' Turner <digit@google.com> Rework toolchain binaries build scripts.

Remove build-toolchain.sh and now provide rebuild-all-prebuilts.sh

Change-Id: I558c95d1667d1283be9b3a075ad0565e05da0dc5