arm: Allow disabling PIE for dynamically linked executables

PIE can and does break some binaries that were built without it,
resulting in relocation-related issues (addressing memory
wrongly assumed to be at a fixed position).

Use this as a last resort measure for compatibility with pre-JB
binary blobs, and only if confirmed to fix a broken executable.
If you're not sure, do NOT enable this on a device.

Change-Id: I3b7001e682a6f7a845e62278fe2afa9ccf5552a4
Make the recovery ramdisk target depend on $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) rather than $(INSTALLED_BOOTIMAGE_TARGET). This fixes the circular dependency for when the kernel depends on the recovery ramdisk, which depends on the boot image, which depends on the kernel.

Change-Id: I658bedc329f2ea0170ac0012f80ca7d779b1c242
build: fix target header overlay

LOCAL_C_INCLUDES as defined by the makefile should be put AFTER
the overlay includes so the overlay always takes precedence.

Change-Id: I489b2aab6dbacd9122d834f85e07b63ed1271f07
kernel.mk: Fix darwin regression caused by 732db8b1.

Change-Id: I1d9c2e231eca695ff6292ce5e163580cfd3fbb86
build: fix ccache usage when building kernels

Change-Id: Id4edd4d85d9ba3ef42575f5fdebf22ed14957a99
kernel.mk: set KERNEL_OUT properly

It was hardcoded to $(ANDROID_BUILD_TOP)/$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
which wouldn't exist if OUT_DIR_COMMON_BASE was set to use another dir
(e.g. ramdisk)

Fix it so that it now points to $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
if OUT_DIR is not out

Change-Id: I1bf767d86548e41270d9cbb8f0c00512708501c5
makerecoveries.sh: Fix up some error reporting. Have errors return a non-zero return value for scriptage.

Change-Id: I944338b684fbaaf0cf9e991e5f370c3889e75649
Fix "build: display the full path of the installed libs, to allow copy paste"

When OUT_DIR is not "out", it'll show the wrong path, as the out dir
won't be under ANDROID_BUILD_TOP

This fixes commit 80970297312c426f326284e81869db8a2cf8a487.

Change-Id: Ie8610ec5e1e4ae570a64fba9168a686bfe929961
build: add support for uncompressed kernels
build: kernel: remove hard coded darwin toolchain.

* Use latest kernel toolchain from $(ARM_EABI_TOOLCHAIN) variable.

Change-Id: I3b43408937dd5f193fcba19c034f868272de8963
build: Add Qualcomm's helper macros

 * This is used everywhere in Qualcomm's code. There's no reason we need
   to constantly replace it with uglier stuff in our Makefiles.

Change-Id: I0183a338470ec96a38f356a47bae65a0d3fb2c95
Add standard method for enabling mfpu and mcpu code optimization
core/Makefile: avoid exceeding MAX_ARG_STRLEN

The current method of generating the apkcerts file can fail with
a "make: execvp: /bin/bash: Argument list too long" when the path
to the toplevel directory is long enough.

In my case, the MAX_ARG_STRLEN of 131072 was exceeded with a toplevel
directory length of 52 (with 427 apkcerts).

This reduces the length of the command-line string generated by not
repeating the output path for each entry (it cd's there first).

Change-Id: I9739f9aefdf5e0febed66517c7b418a4041f49f6
Build only modules required by the current product.

Don't build modules_to_check by default.
Instead add "checkbuild" to the command line as a build goal, if you
want to build everything.
We can use the "checkbuild" goal to make sure some build targets on the
build server still build everything.

(cherry-pick of 5a88269ad6ed44fb163f96847954faac21292567.)

Bug: 7253452
Change-Id: I21eb93f3cb430c9531fe41a2f5d7b445c09938b9
recoveryzip: Fix build of recoveryzip

The recoveryzip target was failing due to the change in the
handling of OUT_DIR. This removes the script's attempts to
set the path itself and uses the common variables instead.

Change-Id: I2a1334e940881005b9d3445b387858edf6da264a
Split to multiple bash commands.

This can fix the error "/bin/bash: Argument list too long", if we get a
really long apk list.
Bug tracker Link: http://code.google.com/p/android/issues/detail?id=38937

Change-Id: Ic6318465a0413ba9ac5afe2c4974ebb3abf59b01
unpackbootimg: add a target specifically for unpackbootimg.
for some reason, and I am guessing this is a bug in the Android build, I can no longer run the following:
make -j32 out/host/darwin-x86/bin/unpackbootimg

It works if the build has been built, but not if it is clean. Somewhere within the bowels of AOSP
something broken in 4.1.2.

Change-Id: I4f8c434f3fce9ddaee4f54febba02efac07a31a3
build: don't clear recovery ramdisk

Clearing recovery ramdisk removes all files place there by the
device tree and all busybox symlinks placed there by recovery

Change-Id: I19e6164856a01a83a6e2c50ef96742edcb9f570f

Conflicts:
	core/Makefile