GCC Freedom, Strict Aliasing, -O3, Extra Flags

|
|
|
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-.

RULE #2: The source is configured to build with GCC 4.7 for androideabi and GCC 4.7 for
armeabi by default (in core/combo/TARGET_linux-arm.mk) unless you specify an alternate
target chain in your Device's BoardConfig. So if you want to use a different chain, you'll
need to add the following two lines to your Device's BoardConfig.mk followed by the GCC
number of your choice for each in order to initiate an alternate custom toolchain sequence
(I simply add it to the very bottom of the BoardConfig.mk).

Say you wanted to use a 4.8 chain instead for armeabi and 4.9 for androideabi.. You would
add the following two lines to your device's BoardConfig.mk:

TARGET_GCC_VERSION_ARM := 4.8
TARGET_GCC_VERSION_AND := 4.9

Notice at the end of each line one is for ARM and one is for AND which hints at armeabi
and androideabi.

Keep in mind also, that this simple number change you specify at the end will decide
which toolchain you will use. So if you would rather use a 4.6 GCC, just change the
number to 4.6.

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 ;)

This build commit also changes your global compiler flags to -Os. -Os is an option
that enables all -O1 and -O2 flag options and compiles for best code size with memory
and battery saving optimizations with no negative effect towards performance whatsoever.

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/linaro commits needed! If you can't find them, they will be
available to you on my github account at https://github.com/IAmTheOneTheyCallNeo

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
Add the Custom Toolchain Triggers
change to 4.8
Fixes
Fix build
Merge remote-tracking branch 'build/linaro' into jb43