On 01/09/2015 10:33 AM, Richard Biener wrote: > On Thu, Jan 8, 2015 at 11:12 AM, Andrew Haley <a...@redhat.com> wrote: >> Android native GCC can't support LTO because of a lack of support for >> dlopen() in the C library. How should we patch the configury to disable >> LTO by default? >
> How does LTO need dlopen? It seems it only cannot use the linker > plugin That's right, it's the plugin which is causing the problem. > in which case the existing check for plugin-supporting ld should > catch it? It doesn't seem to. The problem is probably caused by libfakechroot.so, which intercepts calls to dlopen() and tries to forward them. Unfortunately dlopen() is not in Android's libc, so libfakechroot returns a link error for dlopen(). I don't know what the check for plugin-supporting ld does, but I guess it doesn't call dlopen(). I'll grant you that this isn't really our bug: libfakechroot shouldn't be exporting dlopen() on Android. Andrew.