-fsanitize=thread fails to link; needs -ltsan
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When passing -fsanitize=thread to gcc, it fails to pass -ltsan through to the linker, causing linking to fail.
For example:
> gcc -std=c99 -fsanitize=thread -fPIC -pie -o epoll_test epoll_test.c
/tmp/cc8yFwPg.o: In function `main':
epoll_test.
epoll_test.
epoll_test.
epoll_test.
epoll_test.
epoll_test.
epoll_test.
epoll_test.
epoll_test.
/tmp/cc8yFwPg.
/tmp/cc8yFwPg.o: In function `main':
epoll_test.
/tmp/cc8yFwPg.o: In function `_GLOBAL_
epoll_test.
collect2: error: ld returned 1 exit status
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: gcc 4:4.9.2-1ubuntu1
ProcVersionSign
Uname: Linux 3.18.0-9-generic x86_64
ApportVersion: 2.15.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Jan 22 16:13:08 2015
InstallationDate: Installed on 2013-08-06 (533 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to vivid on 2013-08-06 (533 days ago)
Related branches
- Mir CI Bot: Approve (continuous-integration)
- Chris Halse Rogers: Approve
- Daniel van Vugt: Approve
- Cemil Azizoglu (community): Approve
-
Diff: 11 lines (+1/-0)1 file modifiedCMakeLists.txt (+1/-0)
affects: | gcc-defaults (Ubuntu) → gcc-5 (Ubuntu) |
Status changed to 'Confirmed' because the bug affects multiple users.