Created attachment 30064 [details] Proposed fix The changes in libgcc symbol visibilities that got into 4.8 (http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01462.html) break important Android blobs. Bionic (Android's libc) has some rather weird hacks that expose libgcc.a's __aeabi_uidiv and friends to applications linking to Bionic. The changed symbol visibility breaks this, resulting in e.g. a Galaxy Nexus Android build done with gcc 4.8 failing to boot to UI because it can't load its graphics drivers. It may make sense to change symbol visibility back to default if the target is Android. I've attached a patch that does that.
This sounds more like a bug in Bionic rather than anything else. Why not fix it there?
I agree that the best fix would be to just rebuild the blobs to get rid of the problem -- but we don't have that option. Fixing it in Bionic is harder than it sounds because the way things are built, Bionic needs to export __aeabi_uidiv and friends - but since Bionic links to libgcc.a, it can't just define and export __aeabi_uidiv itself because that would cause a symbol clash even if libgcc.a's __aeabi_uidiv is hidden. Even adding definitions there with __attribute__((weak)) didn't work.
Created attachment 30068 [details] Another patch This patch is needed as well to make sure Bionic can re-export __aeabi_lmul and friends. Unlike the other patch, this one should be fixed before being applied: There should be a #ifdef around the added attribute (not sure if there's already a define for whether or not the target system is Android?)
GCC 4.8.1 has been released.
GCC 4.8.2 has been released.
GCC 4.8.3 is being released, adjusting target milestone.
GCC 4.8.4 has been released.
(In reply to Bernhard Rosenkränzer from comment #3) > Created attachment 30068 [details] > Another patch > > This patch is needed as well to make sure Bionic can re-export __aeabi_lmul > and friends. > > Unlike the other patch, this one should be fixed before being applied: There > should be a #ifdef around the added attribute (not sure if there's already a > define for whether or not the target system is Android?) Uggh, As you say this should be just for Android foo - please work out how to deal with this to handle Android and not affect all standard Linux targets. Maxim - can you handle this please ? regards Ramana
Hi Bero, I'm working on reproducing this. How do you build the android toolchain? Is it manual or do you have this scripted? In particular, do you use a pre-generated sysroot with Bionic or do you build the C library as part of the toolchain? Thanks.
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.
GCC 4.9.3 has been released.
GCC 4.9 branch is being closed
GCC 6 branch is being closed
The GCC 7 branch is being closed, re-targeting to GCC 8.4.
GCC 8.4.0 has been released, adjusting target milestone.
GCC 8 branch is being closed.
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
GCC 9 branch is being closed
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
GCC 10 branch is being closed.