Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Include compiler-rt and libunwind in libc for Clang/x86 builds.
details: https://anonhg.NetBSD.org/src/rev/1e058fb4ce52
branches: trunk
changeset: 790476:1e058fb4ce52
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Oct 14 01:30:21 2013 +0000
description:
Include compiler-rt and libunwind in libc for Clang/x86 builds.
diffstat:
distrib/sets/lists/comp/mi | 3 ++-
distrib/sets/sets.subr | 5 +++--
lib/libc/Makefile | 11 ++++++++++-
share/mk/bsd.lib.mk | 4 ++--
share/mk/bsd.own.mk | 8 +++++++-
5 files changed, 24 insertions(+), 7 deletions(-)
diffs (119 lines):
diff -r d88baea7e967 -r 1e058fb4ce52 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Mon Oct 14 01:14:57 2013 +0000
+++ b/distrib/sets/lists/comp/mi Mon Oct 14 01:30:21 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1841 2013/10/12 07:51:54 njoly Exp $
+# $NetBSD: mi,v 1.1842 2013/10/14 01:30:21 joerg Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2779,6 +2779,7 @@
./usr/include/ulimit.h comp-c-include
./usr/include/unctrl.h comp-c-include
./usr/include/unistd.h comp-c-include
+./usr/include/unwind.h comp-c-include !libgcc
./usr/include/usb.h comp-obsolete obsolete
./usr/include/usbhid.h comp-c-include
./usr/include/util.h comp-c-include
diff -r d88baea7e967 -r 1e058fb4ce52 distrib/sets/sets.subr
--- a/distrib/sets/sets.subr Mon Oct 14 01:14:57 2013 +0000
+++ b/distrib/sets/sets.subr Mon Oct 14 01:30:21 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.153 2013/09/29 12:11:59 joerg Exp $
+# $NetBSD: sets.subr,v 1.154 2013/10/14 01:30:21 joerg Exp $
#
#
@@ -179,7 +179,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.153 2013/09/29 12:11:59 joerg Exp $
+# # $NetBSD: sets.subr,v 1.154 2013/10/14 01:30:21 joerg Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@@ -229,6 +229,7 @@
# ldap ${MKLDAP} != no
# lint ${MKLINT} != no
# libcxx ${MKLIBCXX} != no
+# libgcc ${USE_LIBGCC} != no
# libstdcxx ${MKLIBSTDCXX} != no
# lld ${MKLLD} != no
# lldb ${MKLLDB} != no
diff -r d88baea7e967 -r 1e058fb4ce52 lib/libc/Makefile
--- a/lib/libc/Makefile Mon Oct 14 01:14:57 2013 +0000
+++ b/lib/libc/Makefile Mon Oct 14 01:30:21 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.158 2013/07/30 15:28:47 joerg Exp $
+# $NetBSD: Makefile,v 1.159 2013/10/14 01:30:21 joerg Exp $
# @(#)Makefile 8.2 (Berkeley) 2/3/94
#
# All library objects contain sccsid strings by default; they may be
@@ -63,6 +63,9 @@
.include "${.CURDIR}/db/Makefile.inc"
.include "${.CURDIR}/citrus/Makefile.inc"
.include "${.CURDIR}/compat-43/Makefile.inc"
+.if ${USE_LIBGCC} == "no"
+.include "${.CURDIR}/compiler_rt/Makefile.inc"
+.endif
.include "${.CURDIR}/dlfcn/Makefile.inc"
.include "${.CURDIR}/gdtoa/Makefile.inc"
.include "${.CURDIR}/gen/Makefile.inc"
@@ -96,6 +99,9 @@
.include "${.CURDIR}/time/Makefile.inc"
.include "${.CURDIR}/tls/Makefile.inc"
.include "${.CURDIR}/sys/Makefile.inc"
+.if ${USE_LIBGCC} == "no"
+.include "${NETBSDSRCDIR}/sys/lib/libunwind/Makefile.inc"
+.endif
.include "${.CURDIR}/uuid/Makefile.inc"
.if (${MKYP} != "no")
.include "${.CURDIR}/yp/Makefile.inc"
@@ -146,3 +152,6 @@
# force the dynamic linker to initialize libc first
SHLIB_SHFLAGS+= -Wl,-z,initfirst
+.if ${USE_LIBGCC} == "no"
+SHLIB_SHFLAGS+= -Wl,-z,defs
+.endif
diff -r d88baea7e967 -r 1e058fb4ce52 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk Mon Oct 14 01:14:57 2013 +0000
+++ b/share/mk/bsd.lib.mk Mon Oct 14 01:30:21 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.339 2013/09/12 17:14:20 joerg Exp $
+# $NetBSD: bsd.lib.mk,v 1.340 2013/10/14 01:30:21 joerg Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@@ -589,7 +589,7 @@
.endif
.else
LDLIBC ?= -nodefaultlibs
-.if ${LIB} == "c"
+.if ${USE_LIBGCC} == "yes" && ${LIB} == "c"
LDADD+= -lgcc
.endif
.endif
diff -r d88baea7e967 -r 1e058fb4ce52 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk Mon Oct 14 01:14:57 2013 +0000
+++ b/share/mk/bsd.own.mk Mon Oct 14 01:30:21 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.751 2013/09/29 12:11:59 joerg Exp $
+# $NetBSD: bsd.own.mk,v 1.752 2013/10/14 01:30:21 joerg Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -65,6 +65,12 @@
USE_COMPILERCRTSTUFF?= no
.endif
+.if ${MKLLVM:Uno} == "yes" && (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
+USE_LIBGCC?= no
+.else
+USE_LIBGCC?= yes
+.endif
+
HAVE_GDB?= 7
.if (${MACHINE_ARCH} == "alpha") || \
Home |
Main Index |
Thread Index |
Old Index