On 05/27/2011 01:20 PM, Alexander Sack wrote:
Hi Jim,
On Fri, May 27, 2011 at 1:06 PM, Jim Huang<jim.hu...@linaro.org> wrote:
Hello list,
If you build Android using gcc-linaro-4.5-2011.05 [1], you will
encounter a problem that bootanimation shows endless. It results from
the mis-optimization in libgui, which handles the operations in
Android SensorManager.
To work around this problem, you can apply the following patch:
--- a/libs/gui/Android.mk
+++ b/libs/gui/Android.mk
@@ -18,6 +18,8 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE:= libgui
+LOCAL_CFLAGS += -O0
+
in channel you said that -O1 is also working ... do we need O0 here?
one idea would be to make a list of all optimizations that come for O2
and then spin builds with adding one at a time ... in that way we can
narrow down things. Not sure if that would be helpful for fixing the
issue.
Hi there,
I've got an android build system up and running and had a quick look
into this. When using the gcc-linaro-4.5-2011.05-0 the bootanimation
runs forever when compiling the libgui.so using -O[s|1|2]. For me it
only works when disabling all optizations (-O0). So, I've started with
-O0 and tried to bisect the various optimization switches but I didn't
fail. Next I've started with -O1 and disabled all the optimizations but
it didn't pass. So, this approach was a dead end. Then I realized that
the build system employs some sort of a prelinker called apriori. Adding
'LOCAL_PRELINK_MODULE := false' to the makefile disables the prelink
step. And the resulting ELF binary finally worked (tested with
-O[s|1|2]). It would be good to understand the root cause of this
because the workaround probably has drawbacks at run (load) time.
Apriori gets two input files. The prelink-linux-arm.map which lists the
start of the prelink addresses:
libui.so 0xAB900000 # [~1M]
libgui.so 0xAB800000 # [~1M]
libskia.so 0xAB100000 # [~2M]
and the libgui.so to be prelinked. I'd expect to see the resulting
PhysAddr's somewhere nearby 0xAB800000 but this doesn't seem to be the
case somehow. In order to exclude a miscompiled apriori, I've prelinked
libgui using an apriori binary build with the prebuilt gcc44 - no
difference. Therefore I don't think gcc is miscompiling but something
went wrong whith the prelink step. But still - the android prelinking
remains a mystery to me as I don't know what is supposed to be prelinked
and what is actually failing. However, I think we are one step further.
Regards
Ken
project frameworks/base/
diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk
index 249558a..3bc7eaa 100644
--- a/libs/gui/Android.mk
+++ b/libs/gui/Android.mk
@@ -16,6 +16,8 @@ LOCAL_SHARED_LIBRARIES := \
libhardware \
libhardware_legacy
+LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE:= libgui
ifeq ($(TARGET_SIMULATOR),true)
_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev