This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Native GCC 4.9.0 Build Fails Building/Linking libgcc_s_so with Undefined Symbol
- From: Cyd Haselton <chaselton at gmail dot com>
- To: Kai Ruottu <kai dot ruottu at wippies dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 20 Nov 2014 06:47:07 -0600
- Subject: Re: Native GCC 4.9.0 Build Fails Building/Linking libgcc_s_so with Undefined Symbol
- Authentication-results: sourceware.org; auth=none
- References: <CAHu5PrZzf7wa1Y1mWjyb_XrLkksCw04PLRKQNNBvy-tsogGWdw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 11 dot 1411162341210 dot 1590 at laptop-mg dot saclay dot inria dot fr> <CAHu5Prb3OUk3SyDkwzzJ7NxVvh=2uNYeV4ch2O4Q1moACS-N=w at mail dot gmail dot com> <CAH6eHdS--Rd8WKedsCpwFyVF__xbaKda6FQLVxpkUM1maMogDw at mail dot gmail dot com> <CAHu5PraQfHcbCYhsF9gqMKsfNiLtOHdpfOB7_U4uWGUvAY7_zA at mail dot gmail dot com> <CAHu5PrYVdg=Kmb4aGwtoz++EPrAuVKBbZzUJ48j_+CRdV7buEg at mail dot gmail dot com> <CAH6eHdSL6OMD8eXicCsz_+3xoAQc+Km+DRqasuBZ=xA0SaoZPg at mail dot gmail dot com> <546D1646 dot 90506 at wippies dot com>
On Wed, Nov 19, 2014 at 4:14 PM, Kai Ruottu <kai.ruottu@wippies.com> wrote:
> 19.11.2014, 20:51, Jonathan Wakely kirjoitti:
>>
>> On 19 November 2014 18:08, Cyd Haselton wrote:
>>>
>>> In another attempt to fix this problem, I grepped for dlopen in the
>>> build directoryand ran across the following:
>>>
>>> From ./gcc/config.log
>>>
>>> configure:27894: checking for library containing dlopen
>>> configure:27925: gcc --sysroot=/usr/gcc-4.8/sysroot -o conftest -Wall
>>> -mandroid -mbionic -static-libstdc++ -static-libgcc
>>> -Wl,--dynamic-linker=/system/bin/linker -lc -ldl -lgcc -lm -lsupc++
>>> -lgnustl_shared conftest.c >&5
>>> configure:27925: $? = 0
>>> configure:27942: result: none required:
>>>
>>> And this, from liblto_plugin.la:
>>> # The name that we can dlopen(3).
>>> # Files to dlopen/dlpreopen
>>> dlopen=''"
>>>
>>>
>>> It seems to me as though configure needs to pick up libdl (which is
>>> the android library to link to for dlopen...though i'm not sure how to
>>> make this happen.
>>>
>>> Thoughts?
>>
>> It's already linking to libdl, look at the command it used.
I did see that, but doesn't the configure result indicate that the
libdl library was not picked up?
> It looks like the 'libgcc/config/t-slibgcc' could need a hack. The
> SHLIB_LINK definition
> there has SHLIB_LC which as default is '-lc' but in this special case it
> should be defined
> earlier as '-lc -ldl'... Probably making a custom template for the
> 'arm*-linux-androideabi'
> case in the 'libgcc/config.host' would be the right way to patch the support
> in...
Is there a way to temporarily work around this while building?
While waiting for the answer, I'll see if I can modify t-slibgcc to include -ldl