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'
Note: the prebuilt binary packages used by "make-release.sh" have
been updated to include the COPYING and COPYING.LIB files.
After this patch is commited, you should be able to run "make-release.sh"
to re-generate release packages that contain docs/LICENSES.TXT as well as COPYING and COPYING.LIB