[llvm-bugs] [Bug 34044] New: undefined reference to '__atomic_is_lock_free' with libstdc++
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 3 06:49:50 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34044
Bug ID: 34044
Summary: undefined reference to '__atomic_is_lock_free' with
libstdc++
Product: clang
Version: 5.0
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: raj.khem at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Compile this sample with clang++ results in error while g++ works fine
#include <atomic>
#include <iostream>
struct Simple1 { int i; };
int main()
{
std::atomic<Simple1> s1;
std::cout << std::boolalpha << s1.is_lock_free() << '\n';
return 0;
}
clang++ test.cpp -std=c++11
(08-03 06:47)
/tmp/tmp.Ro4Nz5NMoq/test-5d79a3.o: In function
`std::atomic<Simple1>::is_lock_free() const':
test.cpp:(.text._ZNKSt6atomicI7Simple1E12is_lock_freeEv[_ZNKSt6atomicI7Simple1E12is_lock_freeEv]+0x1b):
undefined reference to `__atomic_is_lock_free'
if I use -stdlib=libc++ it links successfully, it seems to be only a problem
when
using libstdc++
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170803/5c8bc39c/attachment.html>
More information about the llvm-bugs
mailing list