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>
Merge commit 'refs/changes/58/17358/4' of http://review.cyanogenmod.com/CyanogenMod/android_build into ics