build/core: Enable more optimizations

Enable -O3 for the compiler and -O2 for the linker - the code
is now ready for it.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

build/core: Go back to using -O3 by default

Now that the libdex issue is isolated and worked around,
we can build the OS at -O3 again.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

build: Enable -fstrict-aliasing

Patches needed to support -fstrict-aliasing globally are in -- let's
get rid of -fno-strict-aliasing at last

Conflicts:

	core/combo/TARGET_linux-arm.mk

Change-Id: I01a56b07bcb9c59a79476b1304f4af02763451c0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

build: Remove another -fno-strict-aliasing hardcode

Change-Id: I698dc7a99082f1a75877d8ed0dc93ca02ffc0f7b
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

build/core: Build in ISOC++11 mode if possible

Add -std=gnu++11 if the compiler supports it

Change-Id: Ied8b4487263172b678fd2912cfe428187b2edf95
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

build/core: Restore linaro_compilerchecks.mk

Restore the compiler functionality checks from
linaro_android_2.3.7

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

build/core: Include linaro_compilerchecks.mk

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

linaro_compilerchecks.mk: Don't rely on TARGET_CC

In some cases, it is important to use linaro_compilerchecks.mk
before TARGET_CC has been defined - we need to handle it

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

build/core: Bring back support for TARGET_EXTRA_CFLAGS

This commit re-introduces support for setting TARGET_EXTRA_CFLAGS
(such as -march=SomethingNotCompatibleWithOtherBoards) in board
specific config files.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Revert "build: Remove another -fno-strict-aliasing hardcode"

This reverts commit 9dd834f470dd18bc34996acd51496dee2a0d3859.

Some extra code needs to be fixed before we can do this.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Turn off -Werror=strict-aliasing

Otherwise the build will fail where there are unfixed aliasing violations.

Change-Id: Id85ed87ce7dd81d9c855260ba24d4473fc0e83f7
Signed-off-by: Evan McClain <aeroevan@gmail.com>
use linaro 4.7.1 toolchain

Change-Id: I61348be6e8f3390b8c491b3ee3e29b08ce4a2cd1
Merge commit 'refs/changes/44/17444/1' of http://review.cyanogenmod.com/CyanogenMod/android_build into linaro

Change-Id: I84e9df59c92d1980f2ee61c003e40c7592fa94d3
Merge commit 'refs/changes/58/17358/2' of http://review.cyanogenmod.com/CyanogenMod/android_build into linaro

Change-Id: I4f83fd01943c8d747180d77f32db95a52cfbf270
Revert back to no-strict-aliasing.
This avoids "dereferencing type-punned pointer might break strict-aliasing rules" build errors.

Change-Id: I101f7d87dfd0483825faff821b52126576e32182
Revert back to -O2 and -Os.
This fixes runtime link errors as such:
MX.Player( 1619): java.lang.UnsatisfiedLinkError: Cannot load library: find_library[1228]:   132 'libmxvp.so' failed to load previously

Change-Id: If68512b5047b57a4bedf43d13d45c7f6a1a7dcb1