Enable -pipe and -ffast-math optimizations

ffast-math:
Sets -fno-math-errno, -funsafe-math-optimizations, -ffinite-math-only, -fno-rounding-math
-fno-signaling-nans and -fcx-limited-range.

pipe:
Doesn't create temporary files for the steps involved in compiling and linking a program.
Instead, passes the output of one step through a pipe to the next step.

Change-Id: I021b08dad77d5afb79f0bb9a1d02b70cf4531fbc
Signed-off-by: Rob Beane <robbeane@gmail.com>
Squash commits from CM for making lunch faster

re-define AOKP_BUILD to AOKP_PRODUCT to not interfer with official vs unofficial build status

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
build: 1/2 remove squisher

build: Pass OTAPACKAGE location to squisher

Pass the OTAPACKAGE location so we don't have to guess what
the package name will be. This fixes an issue when
BUILD_NUMBER is defined in an environment with automated
builds.

Change-Id: Iab18b541de37c99d237aabc3cb7b2e9ab076617b

Fix building when OUT_DIR is out of ANDROID_BUILD_TOP

This broke in http://review.cyanogenmod.com/#/c/23686/ / http://review.cyanogenmod.com/#/c/23687/

Change-Id: I9dc77a1fb465a30c833262ba3b1de3d2f0f968f0

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
build: add strip on kernel modules

kernel modules are huge for prima wlan and we need to strip them
unstriped size 40mb
striped size 2mb

Change-Id: Iefd572732cad0a6f608439618673068a3586fcd5