diff --git a/doc/TODO.clang b/doc/TODO.clang index dd3f1c6fddf0..79d383d209bd 100644 --- a/doc/TODO.clang +++ b/doc/TODO.clang @@ -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. diff --git a/external/bsd/libc++/lib/Makefile b/external/bsd/libc++/lib/Makefile index 4c5eb615c975..040ab1b719e4 100644 --- a/external/bsd/libc++/lib/Makefile +++ b/external/bsd/libc++/lib/Makefile @@ -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 diff --git a/external/bsd/llvm/lib/libLLVMSupport/Makefile b/external/bsd/llvm/lib/libLLVMSupport/Makefile index 057d45a2f2a6..9ae83cb8409c 100644 --- a/external/bsd/llvm/lib/libLLVMSupport/Makefile +++ b/external/bsd/llvm/lib/libLLVMSupport/Makefile @@ -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 .else