* Specify -ldl with libasan in XGCC Specs
@ 2014-12-14 0:45 Cyd Haselton
2014-12-15 1:39 ` Cyd Haselton
0 siblings, 1 reply; 3+ messages in thread
From: Cyd Haselton @ 2014-12-14 0:45 UTC (permalink / raw)
To: gcc-help
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Specify -ldl with libasan in XGCC Specs
2014-12-14 0:45 Specify -ldl with libasan in XGCC Specs Cyd Haselton
@ 2014-12-15 1:39 ` Cyd Haselton
2014-12-15 12:41 ` Cyd Haselton
0 siblings, 1 reply; 3+ messages in thread
From: Cyd Haselton @ 2014-12-15 1:39 UTC (permalink / raw)
To: gcc-help
On Sat, Dec 13, 2014 at 6:45 PM, Cyd Haselton <chaselton@gmail.com> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Specify -ldl with libasan in XGCC Specs
2014-12-15 1:39 ` Cyd Haselton
@ 2014-12-15 12:41 ` Cyd Haselton
0 siblings, 0 replies; 3+ messages in thread
From: Cyd Haselton @ 2014-12-15 12:41 UTC (permalink / raw)
To: gcc-help
On Sun, Dec 14, 2014 at 7:39 PM, Cyd Haselton <chaselton@gmail.com> wrote:
> On Sat, Dec 13, 2014 at 6:45 PM, Cyd Haselton <chaselton@gmail.com> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-15 12:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-14 0:45 Specify -ldl with libasan in XGCC Specs Cyd Haselton
2014-12-15 1:39 ` Cyd Haselton
2014-12-15 12:41 ` Cyd Haselton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).