dalvik: Fix compile failures with -DNDEBUG and gcc >= 4.6

With -DNDEBUG and -DLOG_NDEBUG, assert() and friends are defined to
nothing - causing variables that are used only in the context of assert
or logging to be defined, but not used, resulting in a build failure
if -Werror is enabled.

Change-Id: Iae18e0274ec2f11f95f918b75006be7cf375a8c0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
dalvik/libdex: Change to -O2 if we're building with -O3

This is a workaround for an apparent gcc bug.
https://bugs.launchpad.net/linaro-android/+bug/948255

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
dalvik/libdex: Don't reduce optimization level to -O2

Don't reduce optimization level to -O2: It's sufficient to disable
function inlining

Change-Id: Ie6d9978cf0bf0e49cfa296c09c4eba913f22c303
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
dalvik: Fix for broswer-crashing bug

This applies the fix proposed by Olivier Cozette in
https://code.google.com/p/android/issues/detail?id=37561
and fixes our bug:
https://bugs.launchpad.net/linaro-android/+bug/978060

An alternative fix has been applied since, leaving this one in
as a comment for reference

Change-Id: I54336c83650c1628fd1bb689148bc1dd8843d7c6
Signed-off-by: Jon Medhurst <tixy@linaro.org>
If parameter -d could not be accessed, issue warning and process single file

Change-Id: Id65e4e1c2c16f6a7d89475892b6a2db7afb3acff
Merge remote-tracking branches 'linaro/linaro_android_4.2.2' and 'cm/cm-10.1' into cm-10.1