Module Name: src
Committed By: joerg
Date: Mon Oct 14 01:30:21 UTC 2013
Modified Files:
src/distrib/sets: sets.subr
src/distrib/sets/lists/comp: mi
src/lib/libc: Makefile
src/share/mk: bsd.lib.mk bsd.own.mk
Log Message:
Include compiler-rt and libunwind in libc for Clang/x86 builds.
To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/distrib/sets/sets.subr
cvs rdiff -u -r1.1841 -r1.1842 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.158 -r1.159 src/lib/libc/Makefile
cvs rdiff -u -r1.339 -r1.340 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.751 -r1.752 src/share/mk/bsd.own.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.153 src/distrib/sets/sets.subr:1.154
--- src/distrib/sets/sets.subr:1.153 Sun Sep 29 12:11:59 2013
+++ src/distrib/sets/sets.subr Mon Oct 14 01:30:21 2013
@@ -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 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g
# 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 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g
# ldap ${MKLDAP} != no
# lint ${MKLINT} != no
# libcxx ${MKLIBCXX} != no
+# libgcc ${USE_LIBGCC} != no
# libstdcxx ${MKLIBSTDCXX} != no
# lld ${MKLLD} != no
# lldb ${MKLLDB} != no
Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1841 src/distrib/sets/lists/comp/mi:1.1842
--- src/distrib/sets/lists/comp/mi:1.1841 Sat Oct 12 07:51:54 2013
+++ src/distrib/sets/lists/comp/mi Mon Oct 14 01:30:21 2013
@@ -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
Index: src/lib/libc/Makefile
diff -u src/lib/libc/Makefile:1.158 src/lib/libc/Makefile:1.159
--- src/lib/libc/Makefile:1.158 Tue Jul 30 15:28:47 2013
+++ src/lib/libc/Makefile Mon Oct 14 01:30:21 2013
@@ -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 @@ CPPFLAGS+= -D__BUILD_LEGACY
.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 @@ CPPFLAGS+= -D__BUILD_LEGACY
.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 @@ CSHLIBFLAGS+= -D_I18N_DYNAMIC
# force the dynamic linker to initialize libc first
SHLIB_SHFLAGS+= -Wl,-z,initfirst
+.if ${USE_LIBGCC} == "no"
+SHLIB_SHFLAGS+= -Wl,-z,defs
+.endif
Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.339 src/share/mk/bsd.lib.mk:1.340
--- src/share/mk/bsd.lib.mk:1.339 Thu Sep 12 17:14:20 2013
+++ src/share/mk/bsd.lib.mk Mon Oct 14 01:30:21 2013
@@ -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 @@ DPLIBC ?= ${DESTDIR}${LIBC_SO}
.endif
.else
LDLIBC ?= -nodefaultlibs
-.if ${LIB} == "c"
+.if ${USE_LIBGCC} == "yes" && ${LIB} == "c"
LDADD+= -lgcc
.endif
.endif
Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.751 src/share/mk/bsd.own.mk:1.752
--- src/share/mk/bsd.own.mk:1.751 Sun Sep 29 12:11:59 2013
+++ src/share/mk/bsd.own.mk Mon Oct 14 01:30:21 2013
@@ -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?= yes
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") || \