clang:compiling with O3 flag

Change-Id: Id4d56ee3b6b250674df852ff8b1c583c3c80f0fc
arm:thumb:compiling with  O2

The compiler was targeting -Os before this commit, now it targets -O2

Change-Id: I07929b161610acd0a2cebb63a383720b6078d59c
Enabled fgcse-sm, fgcse-las and fgcse-after-reload flags to optimize load and store operations

Also passing two extra optimization flags : fgcse-sm and fgcse-las
The last two are not enabled by default by any optimization levels
Change-Id: I27b05be6a103ed1064859eff57f5ec87be7bb1be
No error on array-bounds

O3 flag raises an error when array subscript is above array bounds, passing Wno-array-bounds prevents the compiler to stop working when facing this error

Change-Id: Ide8d80360bb2ee351b8aa5bebb4a2c1f58a26ea7
clang: added unsupported flags to CLANG_CONFIG_arm_UNKNOWN_CFLAGS

fgcse-las and fgcse-sm are not supported by clang, we have to notice the compiler to ignore them

Change-Id: I136dfc309c6f9801285458d134de8fcdc757b4bf
build: Handle custom boot images properly

When a pre-built image should be used, it should be stored in the
target files zip so that it can be used with external signing
processes.

Original-Change-Id: I2661af9ac58af30bb9314b552775046d3abf44e0
Change-Id: I10b3bd0bb33489b8ffb26d16d002f8dd6ff405ad
build: Use project pathmap for recovery

Change-Id: I6339ac77b899a43db21261d587252b65cb58ad79
build: clean up otasigcheck

- Only mount and unmount /data if it was originally unmounted
- Don't use comparison hack, just check the result of the script

Change-Id: I4a22485d315cf91e95ce578907c49f5fa3a03222
ota: Let devices specify their own recovery-from-boot.p installer

Some devices apply transformations to the installed images, making
the sha1 checksums fail (or, worse, generating invalid images). If
"/system/etc/recovery-transform.sh" exists, run that instead, passing
the expected sizes and checksums as arguments in the form of

recovery-transform.sh <recovery_size> <recovery_sha1> <boot_size> <boot_sha1>

A direct emulation of the standard patcher could look like this, transformations
should be added as needed.

----------------
RECSIZE=$1
RECSHA1=$2
BOOTSIZE=$3
BOOTSHA1=$4

dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=$C/recovery.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=$C/boot.img

if ! applypatch -c EMMC:$C/recovery.img:$RECSIZE:$RECSHA1; then
  log -t recovery "Installing new recovery image"
  applypatch -b /system/etc/recovery-resource.dat EMMC:$C/boot.img:$BOOTSIZE:$BOOTSHA1 EMMC:$C/recovery.img $RECSHA1 $RECSIZE $BOOTSHA1:/system/recovery-from-boot.p || exit 1
else
  log -t recovery "Recovery image already installed"
fi
----------------

Conflicts:
	tools/releasetools/ota_from_target_files

Change-Id: Ie601841ca1cdad6b8f3b16e593d2718a92e8ca09
LD_FLAGS: use JustArchi V3's flags

Change-Id: I04e47f3f534f58244bb36929b8017a2da8481f84
Enabled gcc's automatic vectorization for the whole build

Change-Id: Idfcc7f1810605308d64667c06e2b1b823a6cee7c
compile the whole build with O3 flag

Change-Id: I92d5951a90be2ed8e69aa5f67d1f1ff60507c790
No errors on strict overflow

Wno-strict-overflow prevents the compilers to stop its compilation upon strict overflow

Change-Id: I5483325133002ab44034198c3f784f299e74cfd1
gitignore: ignore temp files(*.*~) produced by gedit

Change-Id: Ie4e59f611f8a73fbe3674f5e4c71384c5be98c46
Enabled Swing Modulo Scheduling for the whole build

-fmodulo-sched and -fmodulo-sched-allow-regmoves are fairly new optimizations not currently automatically enabled at any -O level.
These options improve loop scheduling – more information can be found there: https://gcc.gnu.org/news/sms.html.

Change-Id: I69b3fa05e0d5d262ddbe5ec5da0ba0573b1db38a
clang:updated unknown cflags

-fmodulo-sched and -fmodulo-sched-allow-regmoves are not supported by clang, so we need to add them to the unknown flag list

Change-Id: I75b8b4b62732f1a8f006e25127b8edadaf976920