[Bug 220822] Missing libatomic.a for clang?

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 15 13:07:12 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220822

Danilo G. Baio <dbaio at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dbaio at freebsd.org

--- Comment #7 from Danilo G. Baio <dbaio at freebsd.org> ---

I am getting this error when building dns/knot2 only in FreeBSD 12 i386, clang
6.0.0, pr #227620.

./.libs/libknotd.a(libknotd_la-query_module.o): In function
`knotd_mod_stats_incr':
query_module.c:(.text+0x9d0): undefined reference to `__atomic_fetch_add_8'
./.libs/libknotd.a(libknotd_la-query_module.o): In function
`knotd_mod_stats_decr':
query_module.c:(.text+0xa80): undefined reference to `__atomic_fetch_sub_8'
./.libs/libknotd.a(libknotd_la-query_module.o): In function
`knotd_mod_stats_store':
query_module.c:(.text+0xb30): undefined reference to `__atomic_store_8'
cc: error: linker command failed with exit code 1 (use -v to see invocation)

------------------------------------------------------------------------
root at 12-i386-head:~ # gcc6 -dM -E -x c /dev/null | grep LLONG_LOCK
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1

root at 12-i386-head:~ # clang -dM -E -x c /dev/null | grep LLONG_LOCK
#define __CLANG_ATOMIC_LLONG_LOCK_FREE 1
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1

root at 12-i386-head:~ # clang --version
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM
6.0.0)
------------------------------------------------------------------------

root at 11-i386-head:~ # gcc6 -dM -E -x c /dev/null | grep LLONG_LOCK
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1

root at 11-i386-head:~ # clang -dM -E -x c /dev/null | grep LLONG_LOCK
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1

root at 11-i386-head:~ # clang --version
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM
4.0.0)
------------------------------------------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-toolchain mailing list