On Wed, Nov 19, 2014 at 4:14 PM, Kai Ruottu <kai.ruottu@xxxxxxxxxxx> 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. >> >> > > 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... Wouldn't the modification need to be in one of the the gcc/config/.. files as well? Again...my knowledge of GCC internals is minimal...but I just modified libgcc/config/t-slibgcc so that SHLIB_LINK would include -ldl, re-ran make, and got the same error. I could run make distclean and start over, but I'm working on an Android tablet so unless it's absolutely necessary I'd like to avoid doing so; it would take about half a day to get results.