build/core: Don't use -fno-strict-aliasing

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

Change-Id: I7b6e9524197dc152b57a8d1900dd6d7f9fe3452d
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	core/combo/TARGET_linux-arm.mk

Conflicts:
	core/combo/select.mk
build: Don't add -fno-strict-aliasing to HOST compiler flags

Change-Id: I07eef86f11ec3761e0922855cb6ff881c2773966
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	core/combo/select.mk
build: Explicitly disable -Werror=strict-alising for HOST builds

Change-Id: Ib1e834951196ab3ea6acbe47c27eebe5633f55d2
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
build/core: Build in ISOC++11 mode if possible

Add -std=gnu++11 if the compiler supports it

Change-Id: Ied8b4487263172b678fd2912cfe428187b2edf95
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
build: Allow building with OpenJDK v1.7

Ubuntu-12.10 ships with OpenJDK v1.7 and AOSP errors out if you try
to build it with JAVA version other than 1.6. Linaro Android build
with JAVA v1.7, boot tested on Origen 4412, seems to work fine.

Change-Id: I8ca783b48de80131f830139a33d8fc0aa92c562c
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

Change-Id: I0599127b1e113c0799dd8fa92db00b989ebc9bd3
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	core/combo/select.mk
build/core: Add option to disable C++11 bits

Change-Id: I45294e8c19bf7cdf200b45fbd114ccd75c4e3ca9
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@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>
product/core: Install busybox, lrzsz, ffmpeg, x264

Change-Id: I92e750e8dace870ff39a7bae3633328b1be14983
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	target/product/core.mk
build/core: Add linaro_compilerchecks.mk

Add linaro_compilerchecks.mk, allowing to run some checks on the
compiler version and supported flags before setting them

Change-Id: I96e1277e74c0ea3457677bef39644aaece01f653
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
build: Add support for TARGET_EXTRA_C{,PP}FLAGS

Add support for setting TARGET_EXTRA_C{,PP}FLAGS in board configs.
This can be used to set compiler flags for a board that break other
boards, such as -march=cortex-a9 or -DUSE_CUSTOM_EXTENSIONS_FOR_XYZ

Change-Id: I0efd4e37578bf6d239bf56dfeeaaed44840ee3af
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
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

Change-Id: Ide3b1bd0bac050da5b96d1e9a0dabd55fbf675fe
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	core/legacy_prebuilts.mk
definitions.mk: Don't fail if xmllint isn't installed

This is a workaround for xmllint currently not being installed on the
build slaves. It should be reverted when this is fixed, as it eliminates
a check for sane code.

Change-Id: I46eeadebd931ee1b6812a9eb933ee4b56ebd16a7
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
build android with cfX-Toolchain 4.8.y

Conflicts:
	core/config.mk
	core/linaro_compilerchecks.mk
use diagnostic colors

Summary:
This is supported in gcc 4.9.y and greater and only works if output is a terminal via a gcc check, so as not to break other types of builds. This is not intended to colorize everything, only errors, warnings, notes, carets, locus', or quotes. Documentation for this feature may be found here: http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html
It is worth noting that the documentation is slightly outdated, due to the cflag being removed in favor of setting the equivalent to -fdiagnostics-color=always anytime GCC_COLORS is detected in the environment.

Test Plan: Fuck test plans, this is the dopest dope you've ever smoked

Reviewers: randall.rushing, Mustaavalkosta, michyprima, rlasalle15

Differential Revision: http://review.codefirex.com/D59
Give more option for linux-x86 arm-eabi toolchain

Summary: You may now set TARGET_ARM_GCC_VER to 4.6-aosp, 4.7-aosp, 4.7 (cfx), or 4.8 (cfx) to change the arm-eabi toolchain used in build. This is intended for better kernel compatibility.

Test Plan: Tested on mako (4.7) and ace (4.8)

Reviewers: Mustaavalkosta, michyprima

Differential Revision: http://review.codefirex.com/D107
linux-arm: introduce ARCH_ARM_HIGH_OPTIMIZATION_COMPAT

Conflicts:
	core/combo/TARGET_linux-arm.mk
extend ARCH_ARM_HIGH_OPTIMIZATION_COMPAT

Summary: Now disabling aggressive loop optimizations if ARCH_ARM_HIGH_OPTIMIZATION_COMPAT is used. This fixes nfc on c6603 without the need to use a lower optimization level for thumb modules. This should also fix grouper BT while still using ARCH_ARM_HIGH_OPTIMIZATION but will need testing on that.

Test Plan: Tested nfc on c6603, worked great. Need Grouper BT tested with ARCH_ARM_HIGH_OPTIMIZATION and ARCH_ARM_HIGH_OPTIMIZATION_COMPAT enabled

Reviewers: Mustaavalkosta, randall.rushing

Differential Revision: http://review.codefirex.com/D121

Conflicts:
	core/combo/TARGET_linux-arm.mk
build: Inline kernel building as a buildtime task

Kernel image integration is now done in the build system. The
"one true way" of doing this is to download the kernel source
into kernel/TARGET_BOOTLOADER_NAME (by usage of the cm.dependencies
mechanism or otherwise), and defining the TARGET_KERNEL_CONFIG
variable in the device's BoardConfig makefile

If the kernel's location doesn't match the automagic location
(multi-device kernel source, for instance), TARGET_KERNEL_SOURCE
can be used to specify a kernel path (i.e.,
"TARGET_KERNEL_SOURCE := kernel/shared-whatever")

If the device requires out-of-kernel-tree modules to be built,
the TARGET_KERNEL_MODULES variable can be used, pointing to a
_make target_ that will build and install such modules. Definition
of such a target is the device author's responsibility, the only
restriction is that it is a normal makefile recipe (example
below)

Optionally (or as an alternative), a prebuilt binary can also be
defined at BoardConfig, by usage of the TARGET_PREBUILT_KERNEL
variable. This binary will be used if the kernel source is absent
(or undefined).

A minimal BoardConfig.mk should look something like this:

TARGET_KERNEL_CONFIG := cyanogenmod_<device>_defconfig
TARGET_PREBUILT_KERNEL := device/<vendor>/<device>/kernel

To include, for example, the TI WLAN modules, this can be used:

-----------------------------
TIWLAN_MODULES:
       make -C hardware/ti/wlan/wl1283/platforms/os/linux/ KERNEL_DIR=$(KERNEL_OUT) ARCH="arm" CROSS_COMPILE="arm-eabi-" TNETW=1273 RANDOM_MAC=n REPORT_LOG=n
       mv hardware/ti/wlan/wl1283/platforms/os/linux/tiwlan_drv.ko $(KERNEL_MODULES_OUT)
       make -C hardware/ti/wlan/wl1283_softAP/platforms/os/linux/ KERNEL_DIR=$(KERNEL_OUT) ARCH="arm" CROSS_COMPILE="arm-eabi-" TNETW=1273 REPORT_LOG=n
       mv hardware/ti/wlan/wl1283_softAP/platforms/os/linux/tiap_drv.ko $(KERNEL_MODULES_OUT)

TARGET_KERNEL_MODULES := TIWLAN_MODULES
---------------------------

Change-Id: I8634fa4c788a42dc6f62e62ca170825b66db126a