Re: Specify -ldl with libasan in XGCC Specs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 14, 2014 at 7:39 PM, Cyd Haselton <chaselton@xxxxxxxxx> wrote:
> On Sat, Dec 13, 2014 at 6:45 PM, Cyd Haselton <chaselton@xxxxxxxxx> wrote:
>> This is (hopefully)  related to the previous issue I posted about
>> libgcc failing to build on Android.  I ran gcc -dumpspec, xgcc
>> -dumpspec, compared the two and noticed that, for the *link_command
>> -ldl is specified with -lpthread for static-libasan for the installed
>> GCC and is not for the *link_command portion of the newly built
>> XGCC...which appears to be used for building libgcc.
>>
>> Is there a way to change the link_command for the newly built xgcc so
>> that it includes -ldl?
>>
>> Alternatively, if I am off track with troubleshooting, let me know.
>
> UPDATE:  I may have found the solution to this issue; googling libasan
> and libpthread yielded a link to gnu-user.h from a different repo
> which led me to hunt down the 4.8.0 version of the same file, which
> included two additional defines:
>
> /* Additional libraries needed by -static-libasan.  */
> #undef STATIC_LIBASAN_LIBS
> #define STATIC_LIBASAN_LIBS "-ldl -lpthread"
>
> /* Additional libraries needed by -static-libtsan.  */
> #undef STATIC_LIBTSAN_LIBS
> #define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
>
> I've added these to the end of the 4.9.2 gnu-user.h and am currently
> re-running make after running make clean in the builddir/gcc
> directory.

UPDATE:  This did not work because the mods were not integratedinto
dumpspecs.  Trying something else...but I am open to suggestions.  At
this point i'm guessing at what will work based on picking through
various bits of the toplevel/gcc dir.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux