frameworks/base: Assorted build fixes

Assorted build fixes for gcc 4.6 and -DNDEBUG

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix aliasing violations

This makes it possible to build the code without
disabling the strict-aliasing optimization in gcc.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix aliasing violations

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
libstagefright: Fix aliasing violations

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix various aliasing violations

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Revert "frameworks/base: Fix various aliasing violations"

This reverts commit e494389d542f755a11a3dab66167efe547170f92
fix build break when using prebuilt toolchain

When doing a build with the prebuilt 4.4 toolchain a duplicate
symbol error is hit. This is due to the fact this symbol is
really defined system/core/include/system/window.h

Change-Id: I9dac8e4f483422a7d42ab0d305ece61197f936b9
Signed-off-by: Andy Doan <andy.doan@linaro.org>
opengl: Enable -flto and -ffast-math

OpenGL can be built with -ffast-math and -flto without
regressions. Enable them for an extra speed boost.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Change-Id: Iec2950b1d8fef30ef5530551b094e97c7ee91fa7
ensure compiler supports -flto

Change Iec2950b1d8fef30ef5530551b094e97c7ee91fa7 enabled
-flto in all builds. However, not all compilers support this
option. This changes ensures the flag is only used when its
supported

Change-Id: I29c1ae41eac6c5c03c944b1200b22171bcbc0719
Signed-off-by: Andy Doan <andy.doan@linaro.org>

Conflicts:
	opengl/libagl/Android.mk
Pm.java: add function to get verison with package

add -v option to [list packages] subcommand to get the version information
of each listed packages. the BP is:
https://blueprints.launchpad.net/linaro-android/+spec/linaro-android-commit-test-tools-source

Change-Id: I994b86a67a736af8af2a6b3498432e0ba65663e5
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
frameworks/base: gcc 4.7 compile fixes

Make sure we can compile even with gcc 4.7's added
strictness

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
stagefright: Fix build with gcc 4.7

Make it build with gcc 4.7's added strictness

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Make sure Singleton instantiations are exported

This fixes using Singletons across shared library borders
with gcc 4.7

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
libstagefright: Work around gcc 4.7 bug

When using gcc 4.7, use -O2 instead of -Os to
work around compiler bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Revert "Revert "frameworks/base: Fix various aliasing violations""

This reverts commit 634a905618c37b153a06559433f31ab2a10a920d.
frameworks/base: Compile fixes for ISO C++ 11

Fix build in ISO C++ 11 mode (where char16_t is defined and different
from uint16_t)

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
libmediaplayerservice: Fix aliasing violation

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
voip: Fix aliasing violation

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
rs: Fix aliasing violation

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
visualizer: Use -fno-strict-aliasing for now

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