The main idea is that libgcc.a should appear after object files and
static libraries but before depending shared libraries. This willl
force the linker to copy the libgcc.a functions required by the
generated library into the target binary, instead of relying on
what's available in libc.so and others.
This ensures maximum portability, and prevent problems in the future
when we change the toolchain, which translates to different libgcc.a
functions embedded in libc.so and other exposed native libraries.
However, this will make also generated shared libraries bigger, because
the compiler insists on generating code that depends on a bunch of C++
support functions (even when building from C sources). An increase of
about 8KB per shared library is expected.
This gets rid of the 'sources' directory and allows all sources
of a given Android application to be in the same directory tree
without using a symlink trick.
Note that apps/<name>/Application.mk is still required though.
A later release of the NDK will get rid of it too, but the change
is too drastic for the upcoming release.
The change moves various source files from sources into their
app/<name>/project/jni directory as well.
The whole documentation is updated to reflect the change.
Note that the app will only build against an android-4 SDK.
(Interestingly, the resulting binary runs very well under android-3).
This also adds missing license headers to the 'two-libs' sample.
- generate thumb code by default (type forced ARM generation)
- make the generation of unoptimized binaries with APP_OPTIM := debug actually work
(the -O0 -g flags were placed before the -Os -mthumb flags for thumb binaries)
- factor common code from build-executable/shared-library/static-library into build-binary.mk
and install-binary.mk
- properly add a -L$(SYSROOT)/usr/lib line to make LOCAL_LDLIBS := -lz work as advertized
(in build-binary.mk)
- add a few missing variables from clear-vars.mk
- run as bash script (since Debian's new 'dash' shell doesn't support it)
- remove obsolete host GCC requirement
- improve Windows support by using better heuristics for the executable suffix
- better NDK root directory auto-detection (avoids the need to define ANDROID_NDK_ROOT on some installs)
This is used to reduce the number of distributable prebuilt packages
(i.e. linux-x86_64 is not needed anymore).
Also fix build/tools/build-toolchain.sh to properly copy the GPL and LGPL
license files into the generated prebuilt packages.
Also add a .gitignore files to get less spew from 'git status'
The latter had the effect of removing the benefit of optimization settings, i.e. a typical compiler
command would look like:
<toolchain-compiler> .... -Isources/<module-path> -I -O2 -g
The "-I -O2" was interpreted literally as "search in '-O2' directory, and the optimization was
never set to 2 (or 0 in case of debug mode).
* changes:
Force --no-undefined at link time to generate an error when trying to generate a shared library that references undefined symbols. This can be overriden by defining LOCAL_ALLOW_UNDEFINED_SYMBOLS in your Android.mk to 'true'
* changes:
Fix bad dependency between generated shared libraries and the corresponding installed module. Also fixes the "make clean" target by the way.
* changes:
Remove hard-coded path to my home directory in build/tools/make-release.sh. Now you need to use the --prebuilt-path=<path> option to specify where to pick up the prebuilt toolchain tarballs instead, for example: