Module Name:    src
Committed By:   joerg
Date:           Sat Feb 27 21:42:14 UTC 2016

Modified Files:
        src/doc: TODO.clang
        src/external/bsd/libc++/lib: Makefile
        src/external/bsd/llvm/lib/libLLVMSupport: Makefile

Log Message:
As workaround for limitations in Clang's atomic lowering on SPARC,
require v8+ for those files that need C++11 atomics.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/doc/TODO.clang
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/libc++/lib/Makefile
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/llvm/lib/libLLVMSupport/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/TODO.clang
diff -u src/doc/TODO.clang:1.18 src/doc/TODO.clang:1.19
--- src/doc/TODO.clang:1.18	Sat Feb 27 18:50:39 2016
+++ src/doc/TODO.clang	Sat Feb 27 21:42:14 2016
@@ -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.

Index: src/external/bsd/libc++/lib/Makefile
diff -u src/external/bsd/libc++/lib/Makefile:1.8 src/external/bsd/libc++/lib/Makefile:1.9
--- src/external/bsd/libc++/lib/Makefile:1.8	Tue Jan  5 13:07:46 2016
+++ src/external/bsd/libc++/lib/Makefile	Sat Feb 27 21:42:14 2016
@@ -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-e
 
 LDFLAGS+=	-Wl,-z,defs
 
+.if ${MACHINE_ARCH} == "sparc" || ${COMMON_MACHINE_ARCH:U} == "sparc"
+CXXFLAGS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+.endif
+
 .include <bsd.lib.mk>

Index: src/external/bsd/llvm/lib/libLLVMSupport/Makefile
diff -u src/external/bsd/llvm/lib/libLLVMSupport/Makefile:1.30 src/external/bsd/llvm/lib/libLLVMSupport/Makefile:1.31
--- src/external/bsd/llvm/lib/libLLVMSupport/Makefile:1.30	Thu Jan 29 20:41:36 2015
+++ src/external/bsd/llvm/lib/libLLVMSupport/Makefile	Sat Feb 27 21:42:14 2016
@@ -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

Reply via email to