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: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- Cc: Yury Gribov <y dot gribov at samsung dot com>, Yuri Gribov <tetra2005 at gmail dot com>, Jakub Jelinek <jakub at redhat 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: Mon, 02 Jun 2014 23:42:39 -0500
- Subject: Re: [PATCH] Do not build libsanitizer also for powerpc*-*-linux*
- Authentication-results: sourceware.org; auth=none
- References: <1401100995 dot 27542 dot ezmlm at gcc dot gnu dot org> <53831D22 dot 30108 at gmx dot com> <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>
On Mon, 2014-06-02 at 14:48 +0400, Konstantin Serebryany wrote:
> Committed as r210012, please don't forget to add llvm-commits to CC
> next time (I did not see the message)
> Thanks!
I took that patch and applied it to the gcc sources, but I still
see the error on ppc:
[bergner@makalu-lp1
asan]$ /home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc/xgcc
-B/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc/ /home/bergner/gcc/gcc-fsf-mainline-asan/gcc/testsuite/c-c++-common/asan/asan-interface-1.c -B/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/ -B/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/ -L/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/.libs -fsanitize=address -g -I/home/bergner/gcc/gcc-fsf-mainline-asan/gcc/testsuite/../../libsanitizer/include -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -lm -m32 -o ./asan-interface-1.exe
[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: ./asan-interface-1.exe ==36082==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
[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)
libc.so.6 => /lib/power8/libc.so.6 (0x0f740000)
/lib/ld.so.1 (0x206b0000)
libpthread.so.0 => /lib/power8/libpthread.so.0 (0x0f6f0000)
libdl.so.2 => /lib/libdl.so.2 (0x0f6b0000)
libstdc++.so.6 => /home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libstdc++-v3/src/.libs/libstdc++.so.6 (0x0f520000)
libgcc_s.so.1 => /home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc/32/libgcc_s.so.1 (0x0f4c0000)
If I explicitly add a -lasan before the -lm on the compile, then
everything works fine. Is this a test case error for not linking
-lasan before -lm or ???
Peter