Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src As workaround for limitations in Clang's atomic lowering on ...
details: https://anonhg.NetBSD.org/src/rev/2d2c9597cef9
branches: trunk
changeset: 343827:2d2c9597cef9
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Feb 27 21:42:14 2016 +0000
description:
As workaround for limitations in Clang's atomic lowering on SPARC,
require v8+ for those files that need C++11 atomics.
diffstat:
doc/TODO.clang | 6 +++++-
external/bsd/libc++/lib/Makefile | 6 +++++-
external/bsd/llvm/lib/libLLVMSupport/Makefile | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diffs (55 lines):
diff -r 36cf9a449a2b -r 2d2c9597cef9 doc/TODO.clang
--- a/doc/TODO.clang Sat Feb 27 21:37:35 2016 +0000
+++ b/doc/TODO.clang Sat Feb 27 21:42:14 2016 +0000
@@ -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 @@
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 -r 36cf9a449a2b -r 2d2c9597cef9 external/bsd/libc++/lib/Makefile
--- a/external/bsd/libc++/lib/Makefile Sat Feb 27 21:37:35 2016 +0000
+++ b/external/bsd/libc++/lib/Makefile Sat Feb 27 21:42:14 2016 +0000
@@ -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 @@
LDFLAGS+= -Wl,-z,defs
+.if ${MACHINE_ARCH} == "sparc" || ${COMMON_MACHINE_ARCH:U} == "sparc"
+CXXFLAGS+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :}
+.endif
+
.include <bsd.lib.mk>
diff -r 36cf9a449a2b -r 2d2c9597cef9 external/bsd/llvm/lib/libLLVMSupport/Makefile
--- a/external/bsd/llvm/lib/libLLVMSupport/Makefile Sat Feb 27 21:37:35 2016 +0000
+++ b/external/bsd/llvm/lib/libLLVMSupport/Makefile Sat Feb 27 21:42:14 2016 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index