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 rcsdiff: /ftp/cvs/cvsroot/src/share/mk/bsd.lib.mk,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.338 retrieving revision 1.350 diff -u -p -r1.338 -r1.350 --- src/share/mk/bsd.lib.mk 2013/09/12 15:36:16 1.338 +++ src/share/mk/bsd.lib.mk 2014/04/09 16:29:08 1.350 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.338 2013/09/12 15:36:16 joerg Exp $ +# $NetBSD: bsd.lib.mk,v 1.350 2014/04/09 16:29:08 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -185,6 +185,9 @@ FFLAGS+= ${FOPTS} .if defined(CTFCONVERT) .if defined(CFLAGS) && !empty(CFLAGS:M*-g*) CTFFLAGS+= -g +.if defined(HAVE_GCC) && ${HAVE_GCC} >= 48 +#CFLAGS+= -gdwarf-2 +.endif .endif .endif @@ -439,7 +442,7 @@ ${_LIB}_combine.o: ${COMBINESRCS} ${_MKTARGET_COMPILE} ${COMPILE.c} -MD --combine ${.ALLSRC} -o ${.TARGET} .if defined(LIBSTRIPOBJS) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif CLEANFILES+= ${_LIB}_combine.d @@ -518,7 +521,7 @@ _YLSRCS= ${SRCS:M*.[ly]:C/\..$/.c/} ${YH realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} ${_LIB.so.debug} -MKARZERO?=no +MKARZERO?= ${MKREPRO:Uno} .if ${MKARZERO} == "yes" _ARFL=crsD @@ -589,7 +592,7 @@ DPLIBC ?= ${DESTDIR}${LIBC_SO} .endif .else LDLIBC ?= -nodefaultlibs -.if ${LIB} == "c" +.if ${HAVE_LIBGCC} == "yes" && ${LIB} == "c" LDADD+= -lgcc .endif .endif @@ -597,6 +600,13 @@ LDADD+= -lgcc .if ${LIBISCXX} != "no" LIBCC:= ${CXX} +. if ${MKLIBCXX} == "yes" +LIBDPLIBS+= c++ ${.CURDIR}/../../../../../external/bsd/libc++/lib +. elif defined(HAVE_GCC) && ${HAVE_GCC} == 4 +LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../gnu/lib/libstdc++-v3_4 +. else +LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3 +. endif .else LIBCC:= ${CC} .endif @@ -608,10 +618,11 @@ ${_LIB.so.full}: ${SOLIB} ${DPADD} ${DPL ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} ${_MKTARGET_BUILD} rm -f ${.TARGET} - ${LIBCC} ${LDLIBC} -Wl,-x -shared ${SHLIB_SHFLAGS} \ + ${LIBCC} ${LDLIBC} -shared ${SHLIB_SHFLAGS} \ ${_LDFLAGS.${_LIB}} -o ${.TARGET} ${_LIBLDOPTS} \ -Wl,--whole-archive ${SOLIB} \ -Wl,--no-whole-archive ${_LDADD.${_LIB}} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} # We don't use INSTALL_SYMLINK here because this is just # happening inside the build directory/objdir. XXX Why does # this spend so much effort on libraries that aren't live??? XXX