build: Add support for extra kernel build variables

 * This allows specifying a variant defconfig, and an selinux defconfig
   which are simply configuration fragments.

Change-Id: I97882ae3b8c2e16ff6a7dce8dd3a70d70f8aa866

Conflicts:
	core/tasks/kernel.mk
Extract 50-slim.sh before we run backuptool

This lets us add things to 50-slim to be preserved in new ROM releases

Change-Id: I90f2b4ca1e534e0bb2370c7157a10e0e6282c84b
Merge "build: Add support for extra kernel build variables" into jb4.2
Revert "Fix Up New Sounds [1/3]"

This reverts commit 433aba5437fec2b62a1548c0a9fba738b366ba35.
Revert "Fix Default Alarm"

This reverts commit 9f5564a86672287d4d35d2309a9dac45732b19ee.
Remove mumbo-jumbo from updater-script.

Change-Id: Ie62598f999b95c15f9dae531b3addbdaba8b5e27
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
Update default sounds.

Change-Id: Ifd7c4ca0506361ade66bb35f7b81c3d36ab263a8
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
Adding ARM compiler flag optimizations (2/2)

This patch takes into consideration stability while increasing performance.
I've tested this setup on three different ARM devices for several months now
without any noticable side effects.  Grouper, Tilapia and Mako.

These flags are enabled at optimization level -O3.  However with -O3 there's
many flags that are known to break things like bluetooth on grouper/tilapia.
The potential for breaking things on various devices with -O3 is high.  There
is also flags enabled at -O3 that increase code size, which in turn can increase
memory usage.  Documentation of this can be found on Linaro's website who have
also done extensive testing with this:

http://www.linaro.org/linaro-blog/2011/10/25/compiler-flags-used-to-speed-up-linaro-android-2011-10-and-future-optimizations/

I have not noticed much code size increase using these flags.

About the flags, cited from GNU documentaion:

http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

* -fgcse-after-reload
   When -fgcse-after-reload is enabled, a redundant load elimination pass is
   performed after reload. The purpose of this pass is to clean up redundant
   spilling.

* -fipa-cp-clone
   Perform function cloning to make interprocedural constant propagation
   stronger.  When enabled, interprocedural constant propagation performs
   function cloning when externally visible function can be called with
   constant arguments. Because this optimization can create multiple copies
   of functions, it may significantly increase code size
   (see --param ipcp-unit-growth=value).

* -fpredictive-commoning
   Perform predictive commoning optimization, i.e., reusing computations
   (especially memory loads and stores) performed in previous iterations of
   loops.

* -fsched-spec-load
   Allow speculative motion of some load instructions. This only makes sense
   when scheduling before register allocation, i.e. with -fschedule-insns or
   at -O2 or higher.

* -funswitch-loops (only adding for thumb)
   Move branches with loop invariant conditions out of the loop, with duplicates
   of the loop on both branches (modified according to result of the condition).

* -fvect-cost-model
   Enable cost model for vectorization.

* Patch set 1:  Initial import

* Patch set 2:  Make a configurable BoardConfig option
                To enable add TARGET_ARM_OPTIMIZATIONS := true to
                your BoardConfig.mk of your ARM device

* Patch set 3:  Rebase on top of latest CM build repo commits

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Conflicts:
	core/combo/TARGET_linux-arm.mk

Change-Id: Iedae3bee4e4495f560457745239a51a427ad32d2
Signed-off-by: Derek Cannata <thederekjay@gmail.com>