Re: Android Native GCC 4.9.2 Build Fails at Dynamic libgcc

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

 



On Wed, Dec 24, 2014 at 5:05 AM, Cyd Haselton <chaselton@xxxxxxxxx> wrote:
> On Wed, Dec 24, 2014 at 4:06 AM, Andrew Haley <aph@xxxxxxxxxx> wrote:
>> On 23/12/14 21:01, Cyd Haselton wrote:
>>> It does.  However, -ldl does not appear in the link-command section of
>>> dumpspecs...specifically for libasan...as it does for the build
>>> version (4.8.3)
>>>
>>> build version:
>>> *snip*
>>> %{!nostdlib:%{!nodefaultlibs:%{fsanitize=address:
>>> %{static-libasan:-ldl -lpthread}
>>> *snip*
>>>
>>> stage1 version
>>> *snip*
>>
>> Can we see all of that, with 4.8 and 4.9?  I think we may be getting
>> close.
>>
>> Andrew.
>>
>
> Sure.
>
> Here's the *link-command specs for 4.8:
> *link_command:
> %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker)
> %{!fno-use-linker-plugin:%{flto|flto=*|fuse-linker-plugin:     -plugin
> %(linker_plugin_file)     -plugin-opt=%(lto_wrapper)
> -plugin-opt=-fresolution=%u.res
> %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}}
>     }}%{flto|flto=*:%<fcompare-debug*}     %{flto} %{flto=*} %l
> %{pie:-pie} %{fuse-ld=*:-fuse-ld=%*}    %X %{o*} %{e*} %{N} %{n} %{r}
>   %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}
> %{static:} %{L*} %(mfwrap) %(link_libgcc)
> %{!nostdlib:%{!nodefaultlibs:%{fsanitize=address:%{!shared:libasan_preinit%O%s}
> %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan
> --no-whole-archive -Bdynamic}}%{!static-libasan:-lasan}}
> %{fsanitize=thread:%{static-libtsan:%{!shared:-Bstatic --whole-archive
> -ltsan --no-whole-archive -Bdynamic}}%{!static-libtsan:-ltsan}}}} %o
>  %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}
>    %{fgnu-tm:%:include(libitm.spec)%(link_itm)}    %(mflib)
> %{fsplit-stack: --wrap=pthread_create}
> %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}
> %{!nostdlib:%{!nodefaultlibs:%{fsanitize=address:
> %{static-libasan:-ldl -lpthread}    %{static:%ecannot specify -static
> with -fsanitize=address}}    %{fsanitize=thread: %{static-libtsan:-ldl
> -lpthread}    %{!pie:%{!shared:%e-fsanitize=thread linking must be
> done with -pie or -shared}}}}}
> %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}
> %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}
>
> And here's the *link-command for stage1 4.9
> *link_command:
> %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker)
> %{!fno-use-linker-plugin:%{!fno-lto:     -plugin %(linker_plugin_file)
>     -plugin-opt=%(lto_wrapper)     -plugin-opt=-fresolution=%u.res
> %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}}
>     }}%{flto|flto=*:%<fcompare-debug*}     %{flto} %{fno-lto}
> %{flto=*} %l %{pie:-pie} %{fuse-ld=*:-fuse-ld=%*}    %X %{o*} %{e*}
> %{N} %{n} %{r}    %{s} %{t} %{u*} %{z} %{Z}
> %{!nostdlib:%{!nostartfiles:%S}} %{!nostdlib:%{fvtable-verify=std:
> -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}
> %{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start
> -u_vtable_map_vars_end}}     %{static:} %{L*} %(mfwrap) %(link_libgcc)
> %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):%{!shared:libasan_preinit%O%s}
> %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan
> --no-whole-archive -Bdynamic}}%{!static-libasan:-lasan}}
> %{%:sanitize(thread):%{static-libtsan:%{!shared:-Bstatic
> --whole-archive -ltsan --no-whole-archive
> -Bdynamic}}%{!static-libtsan:-ltsan}}
> %{%:sanitize(leak):%{static-liblsan:%{!shared:-Bstatic --whole-archive
> -llsan --no-whole-archive -Bdynamic}}%{!static-liblsan:-llsan}}}} %o
>  %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}
>    %{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}
> %{fgnu-tm:%:include(libitm.spec)%(link_itm)}    %(mflib)
> %{fsplit-stack: --wrap=pthread_create}
> %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}
> %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):
> %{static-libasan:%:include(libsanitizer.spec)%(link_libasan)}
> %{static:%ecannot specify -static with -fsanitize=address}}
> %{%:sanitize(thread):
> %{static-libtsan:%:include(libsanitizer.spec)%(link_libtsan)}
> %{!pie:%{!shared:%e-fsanitize=thread linking must be done with -pie or
> -shared}}}    %{%:sanitize(undefined):%{static-libubsan:-Bstatic}
> -lubsan %{static-libubsan:-Bdynamic}
> %{static-libubsan:%:include(libsanitizer.spec)%(link_libubsan)}}
> %{%:sanitize(leak):
> %{static-liblsan:%:include(libsanitizer.spec)%(link_liblsan)}}}}
> %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}
> %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}

Also, although I have very little experience with git and less so with
the gcc/config files, I managed to locate the commit that removed the
macro defs for the additional libs needed by libasan and libtsan.  It
is here: https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/gnu-user.h;h=9b466212009d2975400cfbaafd4361dcb29a20b8;hp=6c26163b2238284b08ffccfee4127461cebec053;hb=c1283af40b65f1ad862cf5b27e2d9ed10b2076b6;hpb=a16e0d2db75307b909b8b6a500c40637ca757b64.
Although I'm not sure if this has anything to do with the libgcc issue
i'm seeing...



[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