Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src On ARM, force compiling some files in libc++ and LLVM's supp...



details:   https://anonhg.NetBSD.org/src/rev/f6fdd86002a4
branches:  trunk
changeset: 326009:f6fdd86002a4
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jan 15 21:14:54 2014 +0000

description:
On ARM, force compiling some files in libc++ and LLVM's support library
with -march=armv6 to get native atomics as we currently lack the
fallback symbols in libgcc and libc.

diffstat:

 doc/TODO.clang                                |  14 +++++++++-----
 external/bsd/libc++/lib/Makefile              |  16 +++++++++++++++-
 external/bsd/llvm/lib/libLLVMSupport/Makefile |  11 ++++++++++-
 3 files changed, 34 insertions(+), 7 deletions(-)

diffs (77 lines):

diff -r df323551b369 -r f6fdd86002a4 doc/TODO.clang
--- a/doc/TODO.clang    Wed Jan 15 21:12:57 2014 +0000
+++ b/doc/TODO.clang    Wed Jan 15 21:14:54 2014 +0000
@@ -1,11 +1,15 @@
-$NetBSD: TODO.clang,v 1.5 2014/01/08 20:34:45 joerg Exp $
+$NetBSD: TODO.clang,v 1.6 2014/01/15 21:14:54 joerg Exp $
 
 Hacks for the clang integration
 -------------------------------
 
 "-no-integrated-as" in src/sys/arch/amd64 and src/sys/arch/i386
-to compensate for the missing .code16 support in LLVM MC
-and slightly different encoding of the lock stubs.
+to compensate for the missing .code16 support in LLVM MC.
 
-Various places use NOCLANGERROR or CWARNFLAGS.clang to disable errors or
-warnings.
+LLVM PR 18273 and -no-integrated-as as workaround:
+    src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
+    src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile
+
+Missing atomic support in ARM libgcc, -march=armv6 "workaround":
+    src/external/bsd/libc++/lib
+    src/external/bsd/lllvm/lib/libLLVMSupport
diff -r df323551b369 -r f6fdd86002a4 external/bsd/libc++/lib/Makefile
--- a/external/bsd/libc++/lib/Makefile  Wed Jan 15 21:12:57 2014 +0000
+++ b/external/bsd/libc++/lib/Makefile  Wed Jan 15 21:14:54 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2013/11/12 16:39:39 joerg Exp $
+#      $NetBSD: Makefile,v 1.5 2014/01/15 21:14:55 joerg Exp $
 
 LIB=           c++
 WARNS=         4
@@ -46,4 +46,18 @@
 
 LDADD+=        -Wl,-z,defs
 
+.if !empty(MACHINE_ARCH:M*arm*)
+# Missing __sync_fetch_and_add_4
+# Missing __sync_lock_test_and_set_4
+# Missing __sync_val_compare_and_swap_4
+# Missing __atomic_fetch_add_4
+COPTS.ios.cpp+= -march=armv6
+COPTS.locale.cpp+= -march=armv6
+COPTS.memory.cpp+= -march=armv6
+COPTS.new.cpp+= -march=armv6
+COPTS.rt_exception.cc+= -march=armv6
+COPTS.rt_guard.cc+= -march=armv6
+COPTS.stdexcept.cpp+= -march=armv6
+.endif
+
 .include <bsd.lib.mk>
diff -r df323551b369 -r f6fdd86002a4 external/bsd/llvm/lib/libLLVMSupport/Makefile
--- a/external/bsd/llvm/lib/libLLVMSupport/Makefile     Wed Jan 15 21:12:57 2014 +0000
+++ b/external/bsd/llvm/lib/libLLVMSupport/Makefile     Wed Jan 15 21:14:54 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.23 2014/01/05 16:38:07 joerg Exp $
+#      $NetBSD: Makefile,v 1.24 2014/01/15 21:14:55 joerg Exp $
 
 LIB=   LLVMSupport
 
@@ -116,6 +116,15 @@
 CPPFLAGS.${src}+=      -std=gnu99
 .endfor
 
+.if !defined(HOSTLIB) && !empty(MACHINE_ARCH:M*arm*)
+# Missing __sync_fetch_and_add_4
+# Missing __sync_fetch_and_sub_4
+# Missing __sync_lock_test_and_set_4
+# Missing __sync_val_compare_and_swap_4
+# Missing __atomic_fetch_add_4
+COPTS.Atomic.cpp+= -march=armv6
+.endif
+
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
 .else



Home | Main Index | Thread Index | Old Index