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: Yury Gribov <y dot gribov at samsung dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>, Jakub Jelinek <jakub at redhat dot com>
- Cc: 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, 03 Jun 2014 17:17:19 +0400
- 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> <20140603064110 dot GS10386 at tucnak dot redhat dot com> <1401800801 dot 11815 dot 12 dot camel at otta>
> It adds -lasan "early", but after the libraries and
> object files that are explicitly added to the linker command.
> Since -lm is explicitly added to the linker command, the implicitly
> added -lasan comes after. The -v command is below.
Hm, -lasan manages to override user-specified -lm on gcc trunk for x64:
$ /tmp/gcc-bootstrap-and-regtest/build-orig/gcc/xgcc
-B/tmp/gcc-bootstrap-and-regtest/build-orig/gcc/
/home/ygribov/src/gcc-master/gcc/testsuite/c-c++-common/asan/asan-interface-1.c
-B/tmp/gcc-bootstrap-and-regtest/build-orig/x86_64-unknown-linux-gnu/./libsanitizer/
-B/tmp/gcc-bootstrap-and-regtest/build-orig/x86_64-unknown-linux-gnu/./libsanitizer/asan/
-L/tmp/gcc-bootstrap-and-regtest/build-orig/x86_64-unknown-linux-gnu/./libsanitizer/asan/.libs
-fsanitize=address -g
-I/home/ygribov/src/gcc-master/gcc/testsuite/../../libsanitizer/include
-fno-diagnostics-show-caret -fdiagnostics-color=never -O0 -lm -o
./asan-interface-1.exe -v
...
/tmp/gcc-bootstrap-and-regtest/build-orig/gcc/collect2 -plugin
/tmp/gcc-bootstrap-and-regtest/build-orig/gcc/liblto_plugin.so
-plugin-opt=/tmp/gcc-bootstrap-and-regtest/build-orig/gcc/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccZD4gPg.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ./asan-interface-1.exe
/usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o
/tmp/gcc-bootstrap-and-regtest/build-orig/gcc/crtbegin.o
-L/tmp/gcc-bootstrap-and-regtest/build-orig/x86_64-unknown-linux-gnu/./libsanitizer/asan/.libs
-L/tmp/gcc-bootstrap-and-regtest/build-orig/gcc
-L/tmp/gcc-bootstrap-and-regtest/build-orig/x86_64-unknown-linux-gnu/./libsanitizer
-L/tmp/gcc-bootstrap-and-regtest/build-orig/x86_64-unknown-linux-gnu/./libsanitizer/asan
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
/tmp/gcc-bootstrap-and-regtest/build-orig/x86_64-unknown-linux-gnu/./libsanitizer/asan/libasan_preinit.o
-lasan /tmp/ccgt1Kd9.o -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/tmp/gcc-bootstrap-and-regtest/build-orig/gcc/crtend.o
/usr/lib/x86_64-linux-gnu/crtn.o
-Y