Thu Jun 7 15:59:27 2018 UTC ()
Pull up following revision(s) (requested by christos in ticket #834):

	usr.bin/make/var.c: revision 1.219
	share/mk/bsd.obj.mk: revision 1.52
	usr.sbin/crash/Makefile: revision 1.40
	share/mk/sys.mk: revision 1.131
	share/mk/bsd.sys.mk: revision 1.276
	share/mk/bsd.sys.mk: revision 1.277

Prevent 'make obj' creating an objdir inside an objdir. This happens the
second time we call 'make obj' in /usr/src/rescue with MAKEOBJDIR set.
XXX: pullup-8
 -
Need to delete ${DESTDIR} for lint
XXX: pullup-8
 -
Fix reproducible builds
XXX: pullup-8
 -
Also substitute ${X11SRCDIR} for the random seed for reproducible builds so
that the random seed is consistent.
XXX: pullup-8
 -
Since ${MAKE} converts $$ -> $ during parsing we need to put it back to
preserve the original variable value with :Q.
XXX: pullup-8
 -
Be more selective about remapping object directories otherwise we pick
objdump and objcopy with the regex.
XXX: pullup-8


(martin)
diff -r1.51 -r1.51.6.1 src/share/mk/bsd.obj.mk
diff -r1.271 -r1.271.4.1 src/share/mk/bsd.sys.mk
diff -r1.129 -r1.129.8.1 src/share/mk/sys.mk
diff -r1.215 -r1.215.4.1 src/usr.bin/make/var.c
diff -r1.36.4.1 -r1.36.4.2 src/usr.sbin/crash/Makefile

cvs diff -r1.51 -r1.51.6.1 src/share/mk/bsd.obj.mk (expand / switch to unified diff)

--- src/share/mk/bsd.obj.mk 2016/12/10 23:12:39 1.51
+++ src/share/mk/bsd.obj.mk 2018/06/07 15:59:27 1.51.6.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.obj.mk,v 1.51 2016/12/10 23:12:39 christos Exp $ 1# $NetBSD: bsd.obj.mk,v 1.51.6.1 2018/06/07 15:59:27 martin Exp $
2 2
3.if !defined(_BSD_OBJ_MK_) 3.if !defined(_BSD_OBJ_MK_)
4_BSD_OBJ_MK_=1 4_BSD_OBJ_MK_=1
5 5
6.include <bsd.own.mk> 6.include <bsd.own.mk>
7 7
8__curdir:= ${.CURDIR} 8__curdir:= ${.CURDIR}
9 9
10.if ${MKOBJ} == "no" 10.if ${MKOBJ} == "no"
11obj: 11obj:
12.else 12.else
13.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) 13.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
14.if defined(MAKEOBJDIRPREFIX) 14.if defined(MAKEOBJDIRPREFIX)
@@ -17,33 +17,35 @@ __objdir:= ${MAKEOBJDIRPREFIX}${__curdir @@ -17,33 +17,35 @@ __objdir:= ${MAKEOBJDIRPREFIX}${__curdir
17__objdir:= ${MAKEOBJDIR} 17__objdir:= ${MAKEOBJDIR}
18.endif 18.endif
19# MAKEOBJDIR and MAKEOBJDIRPREFIX are env variables supported 19# MAKEOBJDIR and MAKEOBJDIRPREFIX are env variables supported
20# by make(1). We simply mkdir -p the specified path. 20# by make(1). We simply mkdir -p the specified path.
21# If that fails - we do a mkdir to get the appropriate error message 21# If that fails - we do a mkdir to get the appropriate error message
22# before bailing out. 22# before bailing out.
23obj: 23obj:
24.if defined(MAKEOBJDIRPREFIX) 24.if defined(MAKEOBJDIRPREFIX)
25 @if [ ! -d ${MAKEOBJDIRPREFIX} ]; then \ 25 @if [ ! -d ${MAKEOBJDIRPREFIX} ]; then \
26 echo "MAKEOBJDIRPREFIX ${MAKEOBJDIRPREFIX} does not exist, bailing..."; \ 26 echo "MAKEOBJDIRPREFIX ${MAKEOBJDIRPREFIX} does not exist, bailing..."; \
27 exit 1; \ 27 exit 1; \
28 fi; 28 fi;
29.endif 29.endif
 30.if ${.CURDIR} == ${.OBJDIR}
30 @if [ ! -d ${__objdir} ]; then \ 31 @if [ ! -d ${__objdir} ]; then \
31 mkdir -p ${__objdir}; \ 32 mkdir -p ${__objdir}; \
32 if [ ! -d ${__objdir} ]; then \ 33 if [ ! -d ${__objdir} ]; then \
33 mkdir ${__objdir}; exit 1; \ 34 mkdir ${__objdir}; exit 1; \
34 fi; \ 35 fi; \
35 ${_MKSHMSG} " objdir ${__objdir}"; \ 36 ${_MKSHMSG} " objdir ${__objdir}"; \
36 fi 37 fi
 38.endif
37.else 39.else
38PAWD?= /bin/pwd 40PAWD?= /bin/pwd
39 41
40__objdirsuffix= ${OBJMACHINE:D.${MACHINE}${OBJMACHINE_ARCH:D-${MACHINE_ARCH}}} 42__objdirsuffix= ${OBJMACHINE:D.${MACHINE}${OBJMACHINE_ARCH:D-${MACHINE_ARCH}}}
41__objdir= obj${__objdirsuffix} 43__objdir= obj${__objdirsuffix}
42 44
43__usrobjdir= ${BSDOBJDIR}${USR_OBJMACHINE:D.${MACHINE}} 45__usrobjdir= ${BSDOBJDIR}${USR_OBJMACHINE:D.${MACHINE}}
44__usrobjdirpf= ${USR_OBJMACHINE:D:U${__objdirsuffix}} 46__usrobjdirpf= ${USR_OBJMACHINE:D:U${__objdirsuffix}}
45 47
46.if defined(BUILDID) 48.if defined(BUILDID)
47__objdir:= ${__objdir}.${BUILDID} 49__objdir:= ${__objdir}.${BUILDID}
48__usrobjdirpf:= ${__usrobjdirpf}.${BUILDID} 50__usrobjdirpf:= ${__usrobjdirpf}.${BUILDID}
49__need_objdir_target=yes 51__need_objdir_target=yes

cvs diff -r1.271 -r1.271.4.1 src/share/mk/bsd.sys.mk (expand / switch to unified diff)

--- src/share/mk/bsd.sys.mk 2017/04/20 09:29:11 1.271
+++ src/share/mk/bsd.sys.mk 2018/06/07 15:59:27 1.271.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.sys.mk,v 1.271 2017/04/20 09:29:11 ozaki-r Exp $ 1# $NetBSD: bsd.sys.mk,v 1.271.4.1 2018/06/07 15:59:27 martin Exp $
2# 2#
3# Build definitions used for NetBSD source tree builds. 3# Build definitions used for NetBSD source tree builds.
4 4
5.if !defined(_BSD_SYS_MK_) 5.if !defined(_BSD_SYS_MK_)
6_BSD_SYS_MK_=1 6_BSD_SYS_MK_=1
7 7
8.if !empty(.INCLUDEDFROMFILE:MMakefile*) 8.if !empty(.INCLUDEDFROMFILE:MMakefile*)
9error1: 9error1:
10 @(echo "bsd.sys.mk should not be included from Makefiles" >& 2; exit 1) 10 @(echo "bsd.sys.mk should not be included from Makefiles" >& 2; exit 1)
11.endif 11.endif
12.if !defined(_BSD_OWN_MK_) 12.if !defined(_BSD_OWN_MK_)
13error2: 13error2:
14 @(echo "bsd.own.mk must be included before bsd.sys.mk" >& 2; exit 1) 14 @(echo "bsd.own.mk must be included before bsd.sys.mk" >& 2; exit 1)
@@ -19,29 +19,32 @@ error2: @@ -19,29 +19,32 @@ error2:
19.export NETBSDSRCDIR DESTDIR X11SRCDIR 19.export NETBSDSRCDIR DESTDIR X11SRCDIR
20 20
21.if !empty(DESTDIR) 21.if !empty(DESTDIR)
22CPPFLAGS+= -Wp,-iremap,${DESTDIR}: 22CPPFLAGS+= -Wp,-iremap,${DESTDIR}:
23REPROFLAGS+= -fdebug-prefix-map=\$$DESTDIR= 23REPROFLAGS+= -fdebug-prefix-map=\$$DESTDIR=
24.endif 24.endif
25 25
26CPPFLAGS+= -Wp,-fno-canonical-system-headers 26CPPFLAGS+= -Wp,-fno-canonical-system-headers
27CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src 27CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
28CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc 28CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc
29REPROFLAGS+= -fdebug-prefix-map=\$$NETBSDSRCDIR=/usr/src 29REPROFLAGS+= -fdebug-prefix-map=\$$NETBSDSRCDIR=/usr/src
30REPROFLAGS+= -fdebug-prefix-map=\$$X11SRCDIR=/usr/xsrc 30REPROFLAGS+= -fdebug-prefix-map=\$$X11SRCDIR=/usr/xsrc
31LINTFLAGS+= -R${NETBSDSRCDIR}=/usr/src -R${X11SRCDIR}=/usr/xsrc 31LINTFLAGS+= -R${NETBSDSRCDIR}=/usr/src -R${X11SRCDIR}=/usr/xsrc
 32LINTFLAGS+= -R${DESTDIR}=
32 33
33REPROFLAGS+= -fdebug-regex-map='/usr/src/(.*)/obj.*=/usr/obj/\1' 34REPROFLAGS+= -fdebug-regex-map='/usr/src/(.*)/obj$$=/usr/obj/\1'
34REPROFLAGS+= -fdebug-regex-map='/usr/src/(.*)/obj.*/(.*)=/usr/obj/\1/\2' 35REPROFLAGS+= -fdebug-regex-map='/usr/src/(.*)/obj/(.*)=/usr/obj/\1/\2'
 36REPROFLAGS+= -fdebug-regex-map='/usr/src/(.*)/obj\..*=/usr/obj/\1'
 37REPROFLAGS+= -fdebug-regex-map='/usr/src/(.*)/obj\..*/(.*)=/usr/obj/\1/\2'
35 38
36CFLAGS+= ${REPROFLAGS} 39CFLAGS+= ${REPROFLAGS}
37CXXFLAGS+= ${REPROFLAGS} 40CXXFLAGS+= ${REPROFLAGS}
38.endif 41.endif
39 42
40# NetBSD sources use C99 style, with some GCC extensions. 43# NetBSD sources use C99 style, with some GCC extensions.
41CFLAGS+= ${${ACTIVE_CC} == "clang":? -std=gnu99 :} 44CFLAGS+= ${${ACTIVE_CC} == "clang":? -std=gnu99 :}
42CFLAGS+= ${${ACTIVE_CC} == "gcc":? -std=gnu99 :} 45CFLAGS+= ${${ACTIVE_CC} == "gcc":? -std=gnu99 :}
43CFLAGS+= ${${ACTIVE_CC} == "pcc":? -std=gnu99 :} 46CFLAGS+= ${${ACTIVE_CC} == "pcc":? -std=gnu99 :}
44 47
45.if defined(WARNS) 48.if defined(WARNS)
46CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-sign-compare -Wno-pointer-sign :} 49CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-sign-compare -Wno-pointer-sign :}
47.if ${WARNS} > 0 50.if ${WARNS} > 0

cvs diff -r1.129 -r1.129.8.1 src/share/mk/sys.mk (expand / switch to unified diff)

--- src/share/mk/sys.mk 2016/03/30 17:35:43 1.129
+++ src/share/mk/sys.mk 2018/06/07 15:59:27 1.129.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: sys.mk,v 1.129 2016/03/30 17:35:43 martin Exp $ 1# $NetBSD: sys.mk,v 1.129.8.1 2018/06/07 15:59:27 martin Exp $
2# @(#)sys.mk 8.2 (Berkeley) 3/21/94 2# @(#)sys.mk 8.2 (Berkeley) 3/21/94
3# 3#
4# This file contains the basic rules for make(1) and is read first 4# This file contains the basic rules for make(1) and is read first
5# Do not put conditionals that are set on different files here and 5# Do not put conditionals that are set on different files here and
6# expect them to work. 6# expect them to work.
7 7
8unix?= We run NetBSD. 8unix?= We run NetBSD.
9 9
10.SUFFIXES: .a .o .ln .s .S .c .cc .cpp .cxx .C .f .F .r .p .l .y .sh 10.SUFFIXES: .a .o .ln .s .S .c .cc .cpp .cxx .C .f .F .r .p .l .y .sh
11 11
12.LIBS: .a 12.LIBS: .a
13 13
14AR?= ar 14AR?= ar
@@ -42,27 +42,28 @@ LDFLAGS?= @@ -42,27 +42,28 @@ LDFLAGS?=
42COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c 42COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
43LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} 43LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
44 44
45# C Type Format data is required for DTrace 45# C Type Format data is required for DTrace
46CTFFLAGS ?= -g -L VERSION 46CTFFLAGS ?= -g -L VERSION
47CTFMFLAGS ?= -t -g -L VERSION 47CTFMFLAGS ?= -t -g -L VERSION
48 48
49CXX?= c++ 49CXX?= c++
50CXXFLAGS?= ${CFLAGS:N-Wno-traditional:N-Wstrict-prototypes:N-Wmissing-prototypes:N-Wno-pointer-sign:N-ffreestanding:N-std=gnu[0-9][0-9]:N-Wold-style-definition:N-Wno-format-zero-length} 50CXXFLAGS?= ${CFLAGS:N-Wno-traditional:N-Wstrict-prototypes:N-Wmissing-prototypes:N-Wno-pointer-sign:N-ffreestanding:N-std=gnu[0-9][0-9]:N-Wold-style-definition:N-Wno-format-zero-length}
51 51
52__ALLSRC1= ${empty(DESTDIR):?${.ALLSRC}:${.ALLSRC:S|^${DESTDIR}|^destdir|}} 52__ALLSRC1= ${empty(DESTDIR):?${.ALLSRC}:${.ALLSRC:S|^${DESTDIR}|^destdir|}}
53__ALLSRC2= ${empty(MAKEOBJDIR):?${__ALLSRC1}:${__ALLSRC1:S|^${MAKEOBJDIR}|^obj|}} 53__ALLSRC2= ${empty(MAKEOBJDIR):?${__ALLSRC1}:${__ALLSRC1:S|^${MAKEOBJDIR}|^obj|}}
54__ALLSRC3= ${empty(NETBSDSRCDIR):?${__ALLSRC2}:${__ALLSRC2:S|^${NETBSDSRCDIR}|^src|}} 54__ALLSRC3= ${empty(NETBSDSRCDIR):?${__ALLSRC2}:${__ALLSRC2:S|^${NETBSDSRCDIR}|^src|}}
55__BUILDSEED= ${BUILDSEED}/${__ALLSRC3:O}/${.TARGET} 55__ALLSRC4= ${empty(X11SRCDIR):?${__ALLSRC3}:${__ALLSRC3:S|^${X11SRCDIR}|^xsrc|}}
 56__BUILDSEED= ${BUILDSEED}/${__ALLSRC4:O}/${.TARGET}
56_CXXSEED?= ${BUILDSEED:D-frandom-seed=${__BUILDSEED:hash}} 57_CXXSEED?= ${BUILDSEED:D-frandom-seed=${__BUILDSEED:hash}}
57 58
58COMPILE.cc?= ${CXX} ${_CXXSEED} ${CXXFLAGS} ${CPPFLAGS} -c 59COMPILE.cc?= ${CXX} ${_CXXSEED} ${CXXFLAGS} ${CPPFLAGS} -c
59LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} 60LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
60 61
61OBJC?= ${CC} 62OBJC?= ${CC}
62OBJCFLAGS?= ${CFLAGS} 63OBJCFLAGS?= ${CFLAGS}
63COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c 64COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
64LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} 65LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
65 66
66CPP?= cpp 67CPP?= cpp
67CPPFLAGS?= 68CPPFLAGS?=
68 69

cvs diff -r1.215 -r1.215.4.1 src/usr.bin/make/var.c (expand / switch to unified diff)

--- src/usr.bin/make/var.c 2017/04/16 21:39:49 1.215
+++ src/usr.bin/make/var.c 2018/06/07 15:59:27 1.215.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: var.c,v 1.215 2017/04/16 21:39:49 riastradh Exp $ */ 1/* $NetBSD: var.c,v 1.215.4.1 2018/06/07 15:59:27 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990, 1993 4 * Copyright (c) 1988, 1989, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -59,34 +59,34 @@ @@ -59,34 +59,34 @@
59 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 59 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 60 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
61 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 61 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
62 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 62 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
63 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 63 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
64 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 64 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
65 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 65 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
66 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 66 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
67 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 67 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68 * SUCH DAMAGE. 68 * SUCH DAMAGE.
69 */ 69 */
70 70
71#ifndef MAKE_NATIVE 71#ifndef MAKE_NATIVE
72static char rcsid[] = "$NetBSD: var.c,v 1.215 2017/04/16 21:39:49 riastradh Exp $"; 72static char rcsid[] = "$NetBSD: var.c,v 1.215.4.1 2018/06/07 15:59:27 martin Exp $";
73#else 73#else
74#include <sys/cdefs.h> 74#include <sys/cdefs.h>
75#ifndef lint 75#ifndef lint
76#if 0 76#if 0
77static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; 77static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
78#else 78#else
79__RCSID("$NetBSD: var.c,v 1.215 2017/04/16 21:39:49 riastradh Exp $"); 79__RCSID("$NetBSD: var.c,v 1.215.4.1 2018/06/07 15:59:27 martin Exp $");
80#endif 80#endif
81#endif /* not lint */ 81#endif /* not lint */
82#endif 82#endif
83 83
84/*- 84/*-
85 * var.c -- 85 * var.c --
86 * Variable-handling functions 86 * Variable-handling functions
87 * 87 *
88 * Interface: 88 * Interface:
89 * Var_Set Set the value of a variable in the given 89 * Var_Set Set the value of a variable in the given
90 * context. The variable is created if it doesn't 90 * context. The variable is created if it doesn't
91 * yet exist. The value and variable name need not 91 * yet exist. The value and variable name need not
92 * be preserved. 92 * be preserved.
@@ -2336,26 +2336,28 @@ VarQuote(char *str) @@ -2336,26 +2336,28 @@ VarQuote(char *str)
2336 newline = "\\\n"; 2336 newline = "\\\n";
2337 nlen = strlen(newline); 2337 nlen = strlen(newline);
2338 2338
2339 Buf_Init(&buf, 0); 2339 Buf_Init(&buf, 0);
2340 2340
2341 for (; *str != '\0'; str++) { 2341 for (; *str != '\0'; str++) {
2342 if (*str == '\n') { 2342 if (*str == '\n') {
2343 Buf_AddBytes(&buf, nlen, newline); 2343 Buf_AddBytes(&buf, nlen, newline);
2344 continue; 2344 continue;
2345 } 2345 }
2346 if (isspace((unsigned char)*str) || ismeta((unsigned char)*str)) 2346 if (isspace((unsigned char)*str) || ismeta((unsigned char)*str))
2347 Buf_AddByte(&buf, '\\'); 2347 Buf_AddByte(&buf, '\\');
2348 Buf_AddByte(&buf, *str); 2348 Buf_AddByte(&buf, *str);
 2349 if (*str == '$')
 2350 Buf_AddBytes(&buf, 2, "\\$");
2349 } 2351 }
2350 2352
2351 str = Buf_Destroy(&buf, FALSE); 2353 str = Buf_Destroy(&buf, FALSE);
2352 if (DEBUG(VAR)) 2354 if (DEBUG(VAR))
2353 fprintf(debug_file, "QuoteMeta: [%s]\n", str); 2355 fprintf(debug_file, "QuoteMeta: [%s]\n", str);
2354 return str; 2356 return str;
2355} 2357}
2356 2358
2357/*- 2359/*-
2358 *----------------------------------------------------------------------- 2360 *-----------------------------------------------------------------------
2359 * VarHash -- 2361 * VarHash --
2360 * Hash the string using the MurmurHash3 algorithm. 2362 * Hash the string using the MurmurHash3 algorithm.
2361 * Output is computed using 32bit Little Endian arithmetic. 2363 * Output is computed using 32bit Little Endian arithmetic.

cvs diff -r1.36.4.1 -r1.36.4.2 src/usr.sbin/crash/Makefile (expand / switch to unified diff)

--- src/usr.sbin/crash/Makefile 2017/07/25 02:11:14 1.36.4.1
+++ src/usr.sbin/crash/Makefile 2018/06/07 15:59:27 1.36.4.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.36.4.1 2017/07/25 02:11:14 snj Exp $ 1# $NetBSD: Makefile,v 1.36.4.2 2018/06/07 15:59:27 martin Exp $
2 2
3PROG= crash 3PROG= crash
4MAN= crash.8 4MAN= crash.8
5RUMPKERNEL= yes # XXX: Avoid -mcmodel=kernel 5RUMPKERNEL= yes # XXX: Avoid -mcmodel=kernel
6 6
7CWARNFLAGS.clang+= -Wno-format 7CWARNFLAGS.clang+= -Wno-format
8 8
9LDADD+= -lutil -lkvm -ledit -lterminfo 9LDADD+= -lutil -lkvm -ledit -lterminfo
10DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO} 10DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO}
11 11
12.include <bsd.own.mk> 12.include <bsd.own.mk>
13 13
14# some ddb kernel components need limited modifications. for now, 14# some ddb kernel components need limited modifications. for now,
@@ -73,30 +73,38 @@ SRCS+=disassem.c cpufunc_asm.S @@ -73,30 +73,38 @@ SRCS+=disassem.c cpufunc_asm.S
73# crash main source 73# crash main source
74SRCS+= crash.c 74SRCS+= crash.c
75 75
76# arch.c 76# arch.c
77.PATH: ${.CURDIR}/arch 77.PATH: ${.CURDIR}/arch
78. if (exists(${.CURDIR}/arch/${MACHINE_FAMILY}.c)) 78. if (exists(${.CURDIR}/arch/${MACHINE_FAMILY}.c))
79SRCS+= ${MACHINE_FAMILY}.c 79SRCS+= ${MACHINE_FAMILY}.c
80. else 80. else
81SRCS+= generic.c 81SRCS+= generic.c
82. endif 82. endif
83 83
84COPTS.db_output.c += -Wno-format-nonliteral 84COPTS.db_output.c += -Wno-format-nonliteral
85 85
 86.if ${MKREPRO} == "yes"
 87. if ${MKREPRO_TIMESTAMP:U0} != 0
 88NVFLAGS+=-r ${MKREPRO_TIMESTAMP}
 89. else
 90NVFLAGS+=-R
 91. endif
 92.endif
 93
86# vers.c 94# vers.c
87SRCS+= vers.c 95SRCS+= vers.c
88vers.c: ${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS} 96vers.c: ${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS}
89 ${HOST_SH} ${S}/conf/newvers.sh -r -n 97 ${HOST_SH} ${S}/conf/newvers.sh ${NVFLAGS} -n -m ${MACHINE} -i CRASH
90CLEANFILES+= vers.c version 98CLEANFILES+= vers.c version
91 99
92.else # } { 100.else # } {
93 101
94SRCS+= unsupported.c 102SRCS+= unsupported.c
95 103
96.endif # } 104.endif # }
97 105
98.if ${MACHINE} == "sparc" \ 106.if ${MACHINE} == "sparc" \
99 || ${MACHINE} == "sparc64" 107 || ${MACHINE} == "sparc64"
100COPTS.kern_timeout.c += -Wno-stack-protector 108COPTS.kern_timeout.c += -Wno-stack-protector
101.endif 109.endif
102 110