[Bug driver/62105] sanitizer libraries in wrong command line position in link spec file
kcc at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 13 21:14:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62105
Kostya Serebryany <kcc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eugeni.stepanov at gmail dot com,
| |kcc at gcc dot gnu.org,
| |samsonov at google dot com
--- Comment #1 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
clang uses -whole-archive:
clang -fsanitize=thread a.cc -v
"/usr/bin/ld" -whole-archive
...lib/clang/3.5.0/lib/linux/libclang_rt.tsan-x86_64.a -no-whole-archive ...
I believe this is the only right thing to do.
Placing the tsan run-time after the objects will have other nasty side effects
(Alexey, Evgenyi may remember exactly which)
More information about the Gcc-bugs
mailing list