History log of /ndk/build/core/default-build-commands.mk
Revision Date Author Comments
3addfc8c44cb6f6148d39036eb7b379ff97a1b58 27-Aug-2012 David 'Digit' Turner <digit@android.com> Update default build commands.

The default build commands were obsolete and _all_ toolchains
used the same override. So update the defaults and remove all
the overrides.

Change-Id: I163a826621363a61bfdc21f8d1d4ef262fc99749
19c0e0ecefd43a3e24a4b13eddea8303cc75c4ec 07-Aug-2012 Jason Lin <sh.lin@mediatek.com> Fix wrong build commands when using multiple ABIs.

The build commands must use lazy assignment, because these
commands may be redefined in setup.mk for different ABI and
toolchain. Without this change, NDK alway uses the commands
defined in the last included setup.mk but not the correct ones.
2723aa406bd0474c26f3ce5dbcc7a233d1b83357 28-Jun-2012 Andrew Hsieh <andrewhsieh@google.com> Remove *LDSCRIPT_X and *LDSCRIPT_XSC

*LDSCRIPT_X[SC] are no longer needed since MIPS patches of linker
scripts are merged into toolchain repo.

Change-Id: I2007476a8e37334b28a37d1666a16b343cb41d4b
ed5bc4dd6c325a8f2193763161b1fc84250efa39 25-May-2012 Andrew Hsieh <andrewhsieh@google.com> Revise LOCAL_DISABLE_NO_EXECUTE and LOCAL_DISABLE_RELRO implementations

Revise implementations after toolchain is patched to provides NX
and relro protections by default.

See
https://android-review.googlesource.com/#/c/36682/
https://android-review.googlesource.com/#/c/37040/

Change-Id: Ic9daed89c78c25ad46d66ced5a2e534ec8ca83ae
f74c373729bcd1519debe03cda90ef3fd3366848 17-May-2012 Nick Kralevich <nnk@google.com> ndk: compile third party apps with relro support.

Enable relro / bind_now when compiling NDK applications.
This marks certain regions of memory as read-only after linking,
making memory corruption security vulnerabilities harder
to exploit.

See:
* http://www.akkadia.org/drepper/nonselsec.pdf (section 6)
* http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html

Change-Id: I52ebddca857845145d5192341d0343183b56843d
097812d190ebd3539c82c9c2b24161ae5e75cbb8 30-Mar-2012 Chao-Ying Fu <fu@mips.com> [MIPS] Support to ndk scripts to build MIPS NDK

Change-Id: I36e85a57d409d3f56c37737713bbeb9953b24eaa
7a06c124be094134d81920a8f9fe363f6f30abd1 25-Nov-2011 David 'Digit' Turner <digit@google.com> Build modules with hundreds or thousands of sources.

This patch adds the support for LOCAL_SHORT_COMMANDS in Android.mk
and APP_SHORT_COMMANDS in Application.mk. Setting these variable to
'true' will force the use of a linker/archiver list file when building
your NDK modules.

This is mainly useful when you have a very large number of source
files and/or libraries on Windows, which has a limited
command-line length of 8191 characters.

Fixes http://code.google.com/p/android/issues/detail?id=25359

Change-Id: I6f4824e91231e92c0aa83631b89c462ff25ed1cc
d7ea04d2f4b44b72732ecadbb14ae0e866cd5465 14-Jul-2011 David 'Digit' Turner <digit@android.com> Fix multi-abi build.

This patch fixes multi-ABI builds, i.e. when using something like:

APP_ABI := armeabi x86

In your Application.mk or even the command-line when calling ndk-build.

+ Fix missing libgcc in the toolchain setup scripts. This is required to ensure
that the generated shared library / binary includes all libgcc symbols it
depends on.

Change-Id: I19bb26c8b59901f46af1bb27a1ec4fba62b1dbcc
2201d6fcf0b82f0e6028a5e5faaa30710c2b373d 27-Apr-2011 Mark D Horn <mark.d.horn@intel.com> Remove absolute paths from shared libraries

Resulting binary for the target contained some shared
libraries which has an (incorrect) absolute path to the .so.

Change-Id: Ic04be5103b1fafed4aad19d50fc3e36bed020e40
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
fc53a9dd8c214b498c00b3028c86de7085c2cab6 19-Nov-2010 David 'Digit' Turner <digit@google.com> Do not use -Wl,--whole-archive is not needed.

This is a mostly cosmetic fix: when linking the final
shared library or executable, dont' use in the final command
"-Wl,--whole-archive -Wl,--no-whole-archive" if there are
no whole static libraries to link to.

Change-Id: Ief95a1c0bb083889d714e77f1e3ab6a22e6e42c3
b1a60f32cc6b482c1209e1d53e773add926dc520 15-Nov-2010 David 'Digit' Turner <digit@google.com> Add support for LOCAL_WHOLE_STATIC_LIBRARIES.

These libraries are linked to the final binary with the help of
-Wl,--whole-archive .. -Wl,--no-whole-archive. The main difference
is the following:

Consider the following link command:

gcc -o libfoo.o libfoo.a libbar.a libzoo.a

The default Unix linker behaviour is the following:
- undefined symbols in libfoo.a will be searched in libbar.a and libzoo.a
(in this specific order)
- undefined symbols in libbar.a will only be searched in libzoo.a
- undefined symbols in libzoo.a will create an error.

Now consider:

gcc -o libfoo.so -Wl,--whole-archive libfoo.a -Wl,--no-whole-archive libbar.a libzoo.a

Then:

- undefined symbols in libfoo.a are still search in the same way
- undefined symbols in libbar.a are searched in libfoo.a then in libzoo.a
- undefined symbols in libzoo.a are searched in libfoo.a

LOCAL_WHOLE_STATIC_LIBRARIES is a way to group static libraries in the
"whole" category when linking final binaries. This is normally only used
when there are weird circular dependencies in your libraries.

Technically, it's not required, one could instead do:

gcc -o libfoo.o libfoo.a libbar.a libzoo.a libfoo.a

But this does not translate well with the NDK build system's definition of
LOCAL_STATIC_LIBRARIES, and forces the use of LOCAL_LDLIBS := libfoo.a which
is less elegant.

Change-Id: I4b90cad004280a78d596388911482d90bd0755f3
9a19979f7fdb7c4cb322faa69acca06cd93ce77c 23-Oct-2010 David 'Digit' Turner <digit@google.com> Generate smaller release binaries.

Switch from --strip-debug to --strip-unneeded, which is more
aggressive (it gets rid of the non-dynamic symbol table). This
is only used for shared libraries and executables (static libs
are never stripped with the NDK).

Change-Id: I39196c85e85a0a63c4eabf6bf8f6a1143cc4f60f
1579cd933a0e3a1bdd494a312fb5b9e75a03be87 07-Oct-2010 David 'Digit' Turner <digit@google.com> Fix cygwin build on Windows.

This introduces changes to the build system to deal
with the fact that our Windows toolchain binaries are
not Cygwin programs anymore. As a consequence, they
don't understand paths like /cygdrive/c/stuff.

Essentially, this forces path conversions whenever we're
sending a path to the toolchain binaries, through the new
'host-path' and 'host-c-includes' helper functions.

Also, it reformats the auto-generated dependency files
in order for them to be properly parsed by Cygwin's
GNU Make (see build/awk/convert-deps-to-cygwin.awk for
examples).

As a bonus, this change also simplifies the setup of
each toolchain by grouping common definitions under
build/tools/default-build-commands.mk

Change-Id: I5af99b63cb53b3fcb5e1008dfb764e1e934623e5