build: Don't work around cortex-a8 issues when targeting a9 only

Don't work around cortex-a8 issues when other compiler flags
show we want to target cortex-a9 only

Change-Id: If5a077243fc15298fbcbe2ffc857b5e961dd29da
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
build/core: Fix build errors

- Include task hooks only if they exists
- Fix typos

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Conflicts:
	core/legacy_prebuilts.mk
build/core: Don't use -fno-strict-aliasing

Don't use -fno-strict-aliasing: It's no longer needed.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
build: Don't add -fno-strict-aliasing to HOST compiler flags

Change-Id: I07eef86f11ec3761e0922855cb6ff881c2773966
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
build: Explicitly disable -Werror=strict-alising for HOST builds

Change-Id: Ib1e834951196ab3ea6acbe47c27eebe5633f55d2
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
build: Add option to disable strict-aliasing optimizations

This is useful for builds that pull in unmodified AOSP repositories
that can't be compiled with strict-aliasing compliance enabled

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Makefile: Make sure gcc is built before system.img in developer-* builds

This is a workaround for make 3.81 not seeing the dependency introduced
in native-toolchain/Android.mk.

Change-Id: Ie64c39c4904f6ca45978802a6494f55c667add84
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Changes done for compile and link NEON jpeg libs, remove the module support for kernel build

Change-Id: Ic809a66884fda4d3c8552f838b97bb57ee263df8

Conflicts:
	target/board/generic/BoardConfig.mk
Set HAVE_UNWIND_CONTEXT_STRUCT for Clang

Change-Id: I423d650181c6736111e4a5e91ded81c471dd08e1
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Cleanup build optimization flag whitespace
 4.8 GCC, Strict Aliasing=3, -O3 CFLAG, Opt Flags!!

For those of you who are building cm-11.0 with the neofy script,
none of this stuff applies to you as the script did it all for you ;)

To everyone else:
With this commit, you will be heavily modifying your build environment. What this
will do, is allow you the freedom of using any custom toolchain of your choice,
provided you follow two simple rules:

RULE #1: Both the androideabi and armeabi toolchain folders of your choice HAVE to
be named like the following:

for androideabi, the folder has to be prefixed with: arm-linux-androideabi-
and for arm-eabi, the folder has to be prefixed with: arm-eabi-

ex:

If you want to use GCC-4.8 as your toolchain of choice, both the androideabi and
armeabi folders have to look like this:

arm-linux-androideabi-4.8
arm-eabi-4.8

if you want them to be different, say, 4.8 for the arm-eabi and 4.9 for androideabi,
then they should look like this:

arm-eabi-4.8
arm-linux-androideabi-4.9

Take note, that if usining linaro, you will have to clone in the toolchain twice as
this method requires two different folders (the way it should be IMO). You would need
to rename one of the clones to arme-abi- and the other to arm-linux-androideabi-.

SECTION 2
RULE #2: The default configuration I've set is to build with GCC 4.8 for androideabi and 4.8 for
armeabi by default (in core/combo/TARGET_linux-arm.mk lines 50-51) unless you specify an alternate
target chain on those two lines! So if you want to use a different chain, you'll
need to change the build numbers on those two lines. for Example:

Say you wanted to use a 4.7 chain instead for armeabi and 4.8 for androideabi.. You would
change lines 50 and 51 to the following:

TARGET_GCC_VERSION_ARM := 4.7
TARGET_GCC_VERSION_AND := 4.8

Notice at the end of each line one is for ARM and one is for AND which hints at armeabi
and androideabi and the only thing you're changing is the number.

You also need to make sure rule number 1 is observed if you do this.. Can't build with
an alternate chain if one is not present ;) Personally, I've found the following two
toolchains to be the best without any drawback to rom (sans ART) courtesy of sparksco:

https://github.com/SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-eabi-4.8
https://github.com/SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-linux-androideabi-4.8

MAKE SURE YOU PULL BOTH FROM THE sm-kk-mr1 BRANCH IF YOU DECIDE TO USE THESE CHAINS!

This build commit also changes your global compiler ARM flags to -O3. -O3 is an option
that enables all -O1 and -O2 flag options as well as some heavy -O3 flag options that build
for optimized performance!

This commit also adds a few optimization flags that I've pre-selected for added performance.

This commit also builds the entire rom using a Strict Aliasing rule set at the highest level
of =3 and set to error on every strict aliasing issue. Make sure that you have all the
proper strict aliasing commits needed! If you can't find them, they will be
available to you on my github account at https://github.com/IAmTheOneTheyCallNeo

to make your search for all those needed easier, you can find all of them in the following script:
https://github.com/vigor/android/blob/cm-11.0/neofy.sh

Contact me if you have any issues and I will help you when and if I can.

-Neo

Conflicts:
	core/combo/TARGET_linux-arm.mk
	core/combo/select.mk
	core/tasks/kernel.mk
	envsetup.sh
Change default toolchains/fix toolchain flags

Conflicts:
	core/linaro_compilerchecks.mk

Change-Id: I252cdc9ac170349434ed4055097056a91058492f