Beat apk racism with a stick
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
envsetup: set OUT_DIR to an absolute path always

OUT_DIR was set to $(TOPDIR)out previously,
but $(TOPDIR) was null, so it was a relative path.
This broke releasetools, inline kernel building, etc
since they require absolute paths.
Fix it so that it is set to $(shell readlink -f .)/out
if $(TOPDIR) is null.

Also remove hacks which checked if (OUT_DIR) was out
and changed it to $(ANDROID_BUILD_TOP)/out to workaround
the aforementioned problem.

Change-Id: I459a3b1325a1bbea0565cd73f6acf160d4ed9b39

Conflicts:

	core/tasks/kernel.mk
build: Add board platforms to qcom_utils

PS3: rebased

Change-Id: I85458167bf2b9c04b029d09b87bf791ff4cfd04d
qcom_utils: Only define QCOM_BOARD_PLATFORMS if compiling kernel inline

	* If using prebuilt kernel KERNEL_OBJ/usr will not exist, thus
	  build will complain of dir missing during module compilation

	** Requires TARGET_USE_PREBUILT_KERNEL := true in BoardConfig for now

Signed-off-by: bmc08gt <bmc08gt.teamb00sted@gmail.com>
Change-Id: Iecd8c97e89504c60d2f01926318468ac7eb396f9
Squash commits from CM for making lunch faster

before patch:
time lunch aokp_d2tmo-userdebug
real	0m33.123s

after patch:
time lunch aokp_d2tmo-userdebug
real	0m3.575s

Load only the current product config makefile.

To reduce the start time.
With the change and previous change of doing clean step in only given paths,
start time of mm/mmm is reduced from ~5s to about 1s;
lunch time is reduced from ~40s to 3.5s.

Bug: 7186768,7169854
Change-Id: Ifd72ba1c6362a5e1125a23c505fd47947ab56675

build: Fix fastpath code for AOKP

 * We need to adjust to the new validations

Change-Id: I9066d4f437beb9597027ee6bbb52504b5e7e84c5

build: Preliminary support for CM product builds

If building a cm_* product, skip crawling the filesystem for
AndroidProduct makefiles (and, of course, parsing their contents)
and aim directly for the device/cm/<product> device configuration

Change-Id: I2a5e70dda973a6fcdbba0d5e26b35b99d3f1aea2

Change how we search for CM makefiles.

build: Fix fastpath code for CM_BUILD

 * We need to adjust to the new validations

Change-Id: I9066d4f437beb9597027ee6bbb52504b5e7e84c5

build: export AOKP_BUILD

reference AOKP_BUILD

Change-Id: I95d9f05c622e74117cda0967cf6cf248a68e56c5
Revert "Squash commits from CM for making lunch faster"

This reverts commit 8f83e5e87d56d2ddc89dc473bc11654b1292a838.
Add TARGET_GCC_VERSION

Default to 4.6, but can overwritten to something else in
prebuilts/gcc/$os/$arch/$arch-linux-android*-$ver

Change-Id: I16f99d642b8ff8e831d392261a0c536041107051
[ARM] Extend the usage of TARGET_GCC_VERSION for gdb and arm-eabi-*.

In the future to upgrade the gcc version we just need to edit one
line in core/config.mk.

Change-Id: I01bb38c38f2388913bb7369aa4b2da480411dfbe
Export TARGET_GCC_VERSION as an env variable.

Have it referenced by the adbs tool to pick the specified toolchain.

Change-Id: I23df88946254a55d0749d6753e54559faf33e121
x86: enable FORTIFY_SOURCE

Enable FORTIFY_SOURCE for Android x86.  This adds certain security
protections to Android programs, checking for common programming
mistakes and buffer overflows.

FORTIFY_SOURCE protections have been enabled for ARM since
a46c480e43cc61d0190569684f0a1e53a5da75b6 (Jun 4th 2012)

Change-Id: Idae6f93d37ddae605088867cd3029f12632456e1
Use GCC 4.7 from google

Thanks aaronpoweruser for saving me hours of fixing errors myself.

Change-Id: I85cdd49a802bc9577e40bccbcfa2b08f3c76a472
Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>
GCC 4.7 O3 and aliasing Optimizations

Requires http://gerrit.sudoservers.com/#/c/4568/ to build.

Change-Id: Ic416df6a593d1094deaac5a2261b625f734ce404
Add strict_aliasing.
Revert "Add strict_aliasing."

This reverts commit 96536efedc2787754da5c7e11dc95f7c85e30f58.
Revert "GCC 4.7 O3 and aliasing Optimizations"

This reverts commit aec2ce932785cbac4ab498310f0c7c17426b5fcc.
Revert "Use GCC 4.7 from google"

This reverts commit 19c2b94c28547e98c1f0d46889513fa64207de79.
Revert "x86: enable FORTIFY_SOURCE"

This reverts commit a322d7ea1061962531516cfe3eab20256badd7bd.
Revert "Export TARGET_GCC_VERSION as an env variable."

This reverts commit 21d81624680c95b0d7dd42f5bd2a40c37d231dc4.
Revert "[ARM] Extend the usage of TARGET_GCC_VERSION for gdb and arm-eabi-*."

This reverts commit 96f864c2346c370186b7c72527c6d47a17df4815.