This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not build libsanitizer also for powerpc*-*-linux*
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Peter Bergner <bergner at vnet dot ibm dot com>, Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, Yuri Gribov <tetra2005 at gmail dot com>, Thomas Schwinge <thomas at codesourcery dot com>, Arseny Solokha <asolokha at gmx dot com>, Dodji Seketeli <dodji at redhat dot com>, Kostya Serebryany <kcc at google dot com>, Dmitry Vyukov <dvyukov at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Tue, 3 Jun 2014 08:41:10 +0200
- Subject: Re: [PATCH] Do not build libsanitizer also for powerpc*-*-linux*
- Authentication-results: sourceware.org; auth=none
- References: <87egzeqrrt dot fsf at kepler dot schwinge dot homeip dot net> <1401390478 dot 7849 dot 39 dot camel at otta> <1401455362 dot 7849 dot 42 dot camel at otta> <20140530134933 dot GZ10386 at tucnak dot redhat dot com> <1401565995 dot 7849 dot 54 dot camel at otta> <CAGQ9bdxPb+Qb47kRVB+8HHdXT3JmtaGU+PeSKkiO-zZSHwOYig at mail dot gmail dot com> <538C1242 dot 1050703 at samsung dot com> <CAGQ9bdxkC+1coiz8D7+R0KHhUjQi_yX_pAXiS9PGyc9QiEoHmg at mail dot gmail dot com> <1401770559 dot 11815 dot 7 dot camel at otta> <538D6904 dot 5020501 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jun 03, 2014 at 10:19:48AM +0400, Yury Gribov wrote:
> >I took that patch and applied it to the gcc sources,
> >but I still see the error on ppc:
> >...
> >[bergner@makalu-lp1 asan]$ LD_LIBRARY_PATH=:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc/32:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/.libs::/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc/32:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/.libs: ldd ./asan-interface-1.exe
> > linux-vdso32.so.1 => (0x00100000)
> > libm.so.6 => /lib/power8/libm.so.6 (0x0ff00000)
> > libasan.so.1 => /home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/.libs/libasan.so.1 (0x0f930000)
>
> Now check indeed seems to be useful: libasan should be the first
> library in the list when -fsanitize=address flag is present. Are
> compiler specs for Power somehow special?
-fsanitize=address should insert -lasan quite early on the linker command
line, please try to cut'n'paste the command line from testsuite/g++/g++.log
and add -v to see what is passed to the linker.
Perhaps the linker reorders the libraries?
Or do you have LD_PRELOAD?
Jakub