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.prog.mk,v rcsdiff: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.288 retrieving revision 1.297 diff -u -p -r1.288 -r1.297 --- src/share/mk/bsd.prog.mk 2014/03/02 22:22:05 1.288 +++ src/share/mk/bsd.prog.mk 2016/03/12 23:08:58 1.297 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.288 2014/03/02 22:22:05 christos Exp $ +# $NetBSD: bsd.prog.mk,v 1.297 2016/03/12 23:08:58 mrg Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -48,46 +48,46 @@ CLEANFILES+=strings @rm -f x.cc .endif -.if defined(MKPIE) && (${MKPIE} != "no") +.if defined(MKPIE) && (${MKPIE} != "no") && !defined(NOPIE) CFLAGS+= ${PIE_CFLAGS} AFLAGS+= ${PIE_AFLAGS} LDFLAGS+= ${PIE_LDFLAGS} .endif CFLAGS+= ${COPTS} -.if defined(MKDEBUG) && (${MKDEBUG} != "no") +.if ${MKDEBUG:Uno} != "no" && !defined(NODEBUG) CFLAGS+= -g .endif OBJCFLAGS+= ${OBJCOPTS} -MKDEP_SUFFIXES?= .o .ln +MKDEP_SUFFIXES?= .o .ln .d # CTF preserve debug symbols -.if defined(MKDTRACE) && (${MKDTRACE} != "no") && (${CFLAGS:M-g} != "") +.if (${MKCTF:Uno} != "no") && (${CFLAGS:M-g} != "") CTFFLAGS+= -g CTFMFLAGS+= -g -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 48 -CFLAGS+=-gdwarf-2 +.if defined(HAVE_GCC) +#CFLAGS+=-gdwarf-2 .endif .endif # ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o .ifndef LIBCRTBEGIN -LIBCRTBEGIN= ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGIN} +LIBCRTBEGIN= ${DESTDIR}/usr/lib/${MLIBDIR:D${MLIBDIR}/}crti.o ${_GCC_CRTBEGIN} .MADE: ${LIBCRTBEGIN} .endif .ifndef LIBCRTEND -LIBCRTEND= ${_GCC_CRTEND} ${DESTDIR}/usr/lib/crtn.o +LIBCRTEND= ${_GCC_CRTEND} ${DESTDIR}/usr/lib/${MLIBDIR:D${MLIBDIR}/}crtn.o .MADE: ${LIBCRTEND} .endif _SHLINKER= ${SHLINKDIR}/ld.elf_so .ifndef LIBCRT0 -LIBCRT0= ${DESTDIR}/usr/lib/crt0.o +LIBCRT0= ${DESTDIR}/usr/lib/${MLIBDIR:D${MLIBDIR}/}crt0.o .MADE: ${LIBCRT0} .endif .ifndef LIBCRTI -LIBCRTI= ${DESTDIR}/usr/lib/crti.o +LIBCRTI= ${DESTDIR}/usr/lib/${MLIBDIR:D${MLIBDIR}/}crti.o .MADE: ${LIBCRTI} .endif @@ -124,6 +124,7 @@ LIBCRTI= ${DESTDIR}/usr/lib/crti.o edit \ event \ expat \ + execinfo \ fetch \ fl \ form \ @@ -329,6 +330,7 @@ _CCLINK= ${CXX} ${_CCLINKFLAGS} .endif .if defined(RUMPPRG) +CPPFLAGS+= -D_KERNTYPES PROG= ${RUMPPRG} . ifndef CRUNCHEDPROG . if (${MKRUMP} != "no") @@ -432,7 +434,7 @@ _CCLINK.${_P}= ${CXX} ${_CCLINKFLAGS} BINDIR.${_P}?= ${BINDIR} PROGNAME.${_P}?= ${_P} -.if ${MKDEBUG} != "no" && !commands(${_P}) +.if ${MKDEBUG:Uno} != "no" && !defined(NODEBUG) && !commands(${_P}) _PROGDEBUG.${_P}:= ${PROGNAME.${_P}}.debug .endif