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

RULE #2: The build is configured to build with GCC 4.9 in core/config.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 lines to your Device's BoardConfig.mk
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.7 toolchain instead. Add this to your device BoardConfig.mk:

TARGET_GCC_VERSION := 4.7

Keep in mind, 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.. Can't build with an alternate
chain if one is not present ;)

This commit also changes your global compiler flags to -O3. -O3 is an option
that enables all -O1 and -O2 flag options and compiles for best performance.

This commit also adds a few optimization flags that I've pre-selected for added optimization
performance with minimal cost to memory.

This commit also builds the entire rom using a Strict Aliasing 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 either be
available to you on https://github.com/IAmTheOneTheyCallNeo or https://github.com/VigorCM

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

-Neo
change default GCC to 4.7

Change-Id: Ic2ea14642cd3cd5e52a908dd26424d1feac43e50