Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/share/mk/bsd.lib.mk,v retrieving revision 1.310 retrieving revision 1.310.2.2 diff -u -p -r1.310 -r1.310.2.2 --- src/share/mk/bsd.lib.mk 2010/12/08 01:57:22 1.310 +++ src/share/mk/bsd.lib.mk 2011/02/17 11:59:27 1.310.2.2 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.310 2010/12/08 01:57:22 joerg Exp $ +# $NetBSD: bsd.lib.mk,v 1.310.2.2 2011/02/17 11:59:27 bouyer Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -64,7 +64,8 @@ DPADD+= ${LIBDO.${_lib}}/lib${_lib}.so MKDEP_SUFFIXES?= .o .po .pico .go .ln # Use purely kernel private headers in rump builds -.if !defined(RUMPKERNEL) +# Skip NetBSD headers for the toolchain builds +.if !defined(RUMPKERNEL) && !defined(HOSTLIB) .if empty(CPPFLAGS:M-nostdinc) CPPFLAGS+= ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include} .endif @@ -535,10 +536,14 @@ _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}$ # -Xl,-nostdlib is not enough because we want to tell the compiler-driver not # to add standard libraries, not the linker. .if !defined(LIB) +.if !empty(LIBC_SO) DPLIBC ?= ${DESTDIR}${LIBC_SO} +.endif .else .if ${LIB} != "c" && ${LIB:Mgcc*} == "" +.if !empty(LIBC_SO) DPLIBC ?= ${DESTDIR}${LIBC_SO} +.endif .else LDLIBC ?= -nodefaultlibs .if ${LIB} == "c"