http://llvm.org/bugs/show_bug.cgi?id=13502
Bug #: 13502
Summary: clang++ compiles TLS code even when there is no TLS
support on the OS
Product: clang
Version: 3.1
Platform: Other
OS/Version: OpenBSD
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
While working on building mozilla with clang on OpenBSD, i realized that the
following code :
__thread bool tlsIsMainThread = false;
int main() {
return tlsIsMainThread;
}
(from http://mxr.mozilla.org/mozilla-central/source/configure.in#3611)
compiles with clang but fails to run, while it fails to compile on gcc, and for
a good reason : OpenBSD doesn't have thread-local-storage support (yet).
This is confusing the mozilla-central's configure.in into thinking TLS is
supported.
dawn:/tmp/ $g++ t.C
t.C:1: error: thread-local storage not supported for this target
dawn:/tmp/ $clang++ t.C
dawn:/tmp/ $./a.out
./a.out: unsupported TLS program header
Note sure it's a real bug...
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs