As workaround for limitations in Clang's atomic lowering on SPARC,

require v8+ for those files that need C++11 atomics.
This commit is contained in:
joerg 2016-02-27 21:42:14 +00:00
parent a8ad0d2ad3
commit 24d50a40b3
3 changed files with 15 additions and 3 deletions

View File

@ -1,4 +1,4 @@
$NetBSD: TODO.clang,v 1.18 2016/02/27 18:50:39 joerg Exp $
$NetBSD: TODO.clang,v 1.19 2016/02/27 21:42:14 joerg Exp $
Hacks for the clang integration
-------------------------------
@ -14,3 +14,7 @@ macro (ab)use.
src/tests/lib/libc/sync disables tests for atomics shorter than 32bit on
SPARC64 due to missing codegen support.
src/external/bsd/llvm/lib/libLLVMSupport and src/external/bsd/libc++/lib
explicitly require -Wa,-Av8plus at the moment, because atomic ops are
always lowered to CAS.

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2016/01/05 13:07:46 christos Exp $
# $NetBSD: Makefile,v 1.9 2016/02/27 21:42:14 joerg Exp $
LIB= c++
WARNS= 4
@ -46,4 +46,8 @@ CWARNFLAGS.clang+= -Wno-error=implicit-exception-spec-mismatch
LDFLAGS+= -Wl,-z,defs
.if ${MACHINE_ARCH} == "sparc" || ${COMMON_MACHINE_ARCH:U} == "sparc"
CXXFLAGS+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :}
.endif
.include <bsd.lib.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.30 2015/01/29 20:41:36 joerg Exp $
# $NetBSD: Makefile,v 1.31 2016/02/27 21:42:14 joerg Exp $
LIB= LLVMSupport
@ -118,6 +118,10 @@ SRCS+= Host.inc \
CPPFLAGS.${src}+= -std=gnu99
.endfor
.if !defined(HOSTLIB) && ${MACHINE_ARCH} == "sparc"
COPTS.Atomic.cpp+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :}
.endif
.if defined(HOSTLIB)
.include <bsd.hostlib.mk>
.else