Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src 1. Remove all the special handling of variables (-d -p -P -s...
details: https://anonhg.NetBSD.org/src/rev/c41c32375a3b
branches: trunk
changeset: 466650:c41c32375a3b
user: christos <christos%NetBSD.org@localhost>
date: Sun Dec 29 18:26:16 2019 +0000
description:
1. Remove all the special handling of variables (-d -p -P -s -S) that
were dealing with DBG (-d) LDSTATIC/NOPIE (-p), and the rest with
disabling/enabling sanitizers.
2. Use emalloc/estrdup for all the allocators instead of only some cases.
3. Add -V varspec which passes variables on the command line (as DBG
and LDSTATIC used to be passed before) instead of appending them
to the on-the-fly Makefile using -v varspec.
4. Change the distrib and rescue Makefiles to use -V instead of the removed
flags.
The motivation of this is to make variable handling consistent, less magical,
and remove the need for changing crunchgen each time we want to add disabling
an option by default.
(as proposed in tech-toolchain)
diffstat:
distrib/amd64/ramdisks/common/Makefile.ramdisk | 3 +-
distrib/arc/ramdisk/Makefile | 3 +-
distrib/bebox/ramdisk/Makefile | 3 +-
distrib/cobalt/ramdisk/Makefile | 3 +-
distrib/common/Makefile.crunch | 15 ++-
distrib/dreamcast/ramdisk/Makefile | 3 +-
distrib/emips/ramdisk/Makefile | 3 +-
distrib/evbppc/ramdisk/Makefile | 3 +-
distrib/ews4800mips/floppies/ramdisk/Makefile | 3 +-
distrib/hppa/ramdisk/Makefile | 3 +-
distrib/ibmnws/netboot/ramdisk/Makefile | 3 +-
distrib/landisk/ramdisk/Makefile | 3 +-
distrib/macppc/floppies/ramdisk/Makefile | 3 +-
distrib/miniroot/Makefile | 3 +-
distrib/mipsco/ramdisk/Makefile | 3 +-
distrib/newsmips/floppies/ramdisk/Makefile | 3 +-
distrib/ofppc/ramdisks/common/Makefile.ramdisk | 3 +-
distrib/pmax/ramdisk/Makefile | 3 +-
distrib/prep/floppies/ramdisk/Makefile | 3 +-
distrib/rs6000/ramdisk/Makefile | 3 +-
distrib/sandpoint/ramdisk/Makefile | 3 +-
distrib/sgimips/ramdisk/Makefile | 3 +-
distrib/sun2/miniroot/Makefile | 3 +-
distrib/sun3/miniroot/Makefile | 3 +-
rescue/Makefile | 10 +-
usr.bin/crunch/crunchgen/crunchgen.1 | 26 +--
usr.bin/crunch/crunchgen/crunchgen.c | 149 +++++++++++-------------
27 files changed, 123 insertions(+), 146 deletions(-)
diffs (truncated from 885 to 300 lines):
diff -r 8b4bd764e865 -r c41c32375a3b distrib/amd64/ramdisks/common/Makefile.ramdisk
--- a/distrib/amd64/ramdisks/common/Makefile.ramdisk Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/amd64/ramdisks/common/Makefile.ramdisk Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.ramdisk,v 1.14 2019/01/27 04:22:46 dholland Exp $
+# $NetBSD: Makefile.ramdisk,v 1.15 2019/12/29 18:26:16 christos Exp $
NOSANITIZER= # defined
@@ -11,7 +11,6 @@
WARNS= 1
DBG= -Os -fno-asynchronous-unwind-tables
-CRUNCHGEN_FLAGS= -d "${DBG}"
CRUNCHBIN= ramdiskbin
diff -r 8b4bd764e865 -r c41c32375a3b distrib/arc/ramdisk/Makefile
--- a/distrib/arc/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/arc/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2017/05/12 07:26:35 martin Exp $
+# $NetBSD: Makefile,v 1.27 2019/12/29 18:26:16 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -11,7 +11,6 @@
DBG= -Os -mmemcpy -fno-unwind-tables
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst.en
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= le
diff -r 8b4bd764e865 -r c41c32375a3b distrib/bebox/ramdisk/Makefile
--- a/distrib/bebox/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/bebox/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2017/01/24 18:04:01 christos Exp $
+# $NetBSD: Makefile,v 1.4 2019/12/29 18:26:16 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -11,7 +11,6 @@
DBG= -Os
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS=-d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst.en
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/cobalt/ramdisk/Makefile
--- a/distrib/cobalt/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/cobalt/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2017/07/18 23:12:24 christos Exp $
+# $NetBSD: Makefile,v 1.13 2019/12/29 18:26:16 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -11,7 +11,6 @@
DBG= -Os -mmemcpy
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst.en
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= le
diff -r 8b4bd764e865 -r c41c32375a3b distrib/common/Makefile.crunch
--- a/distrib/common/Makefile.crunch Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/common/Makefile.crunch Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.crunch,v 1.25 2014/02/01 21:05:54 matt Exp $
+# $NetBSD: Makefile.crunch,v 1.26 2019/12/29 18:26:16 christos Exp $
#
# Makefile snippet to build a crunchgen(1)ed binary from the provided lists
#
@@ -26,6 +26,17 @@
.if !defined(_MAKEFILE_CRUNCH_)
_MAKEFILE_CRUNCH_=1
+DBG?=-Os
+CRUNCHGEN_FLAGS?=\
+-V LDSTATIC=-static \
+-V DBG="${DBG}" \
+-V NOMAN= \
+-V NOLIBCSANITIZER= \
+-V NOSANITIZER= \
+-V NOPIE= \
+-V NOSSP= \
+-V NOFORT=
+
CRUNCHENV+= AWK=${TOOL_AWK:Q}
SMALLPROG?= 1
@@ -52,7 +63,7 @@
CRUNCHGEN != command -v ${TOOL_CRUNCHGEN:[-1]} || echo
${CRUNCHBIN}.mk: ${CRUNCHBIN}.conf ${CRUNCHGEN}
- ${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} -d ${DBG:Q} \
+ ${CRUNCHENV} ${TOOL_CRUNCHGEN} -f -D ${NETBSDSRCDIR} \
-L ${DESTDIR}/usr/lib -q ${CRUNCHGEN_FLAGS} ${CRUNCHBIN}.conf
${CRUNCHBIN}.conf: ${LISTS} ${PARSELISTDEP}
diff -r 8b4bd764e865 -r c41c32375a3b distrib/dreamcast/ramdisk/Makefile
--- a/distrib/dreamcast/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/dreamcast/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2017/01/24 18:04:01 christos Exp $
+# $NetBSD: Makefile,v 1.15 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -11,7 +11,6 @@
DBG= -Os
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list # ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= le
diff -r 8b4bd764e865 -r c41c32375a3b distrib/emips/ramdisk/Makefile
--- a/distrib/emips/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/emips/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2019/03/31 16:09:14 christos Exp $
+# $NetBSD: Makefile,v 1.6 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -12,7 +12,6 @@
DBG= -Os -mmemcpy
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/evbppc/ramdisk/Makefile
--- a/distrib/evbppc/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/evbppc/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2017/07/23 20:59:00 joerg Exp $
+# $NetBSD: Makefile,v 1.24 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -11,7 +11,6 @@
DBG= ${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS=-d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/ews4800mips/floppies/ramdisk/Makefile
--- a/distrib/ews4800mips/floppies/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/ews4800mips/floppies/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2019/09/04 12:10:00 martin Exp $
+# $NetBSD: Makefile,v 1.14 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -11,7 +11,6 @@
DBG= -Os -mmemcpy -fno-unwind-tables
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst.en
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/hppa/ramdisk/Makefile
--- a/distrib/hppa/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/hppa/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2019/11/04 00:59:05 christos Exp $
+# $NetBSD: Makefile,v 1.7 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -10,7 +10,6 @@
WARNS= 1
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/ibmnws/netboot/ramdisk/Makefile
--- a/distrib/ibmnws/netboot/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/ibmnws/netboot/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2017/01/24 18:04:03 christos Exp $
+# $NetBSD: Makefile,v 1.14 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -10,7 +10,6 @@
WARNS= 1
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/landisk/ramdisk/Makefile
--- a/distrib/landisk/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/landisk/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2017/01/24 18:04:03 christos Exp $
+# $NetBSD: Makefile,v 1.12 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -12,7 +12,6 @@
DBG= -Os
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= le
diff -r 8b4bd764e865 -r c41c32375a3b distrib/macppc/floppies/ramdisk/Makefile
--- a/distrib/macppc/floppies/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/macppc/floppies/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.50 2019/01/07 01:39:26 scole Exp $
+# $NetBSD: Makefile,v 1.51 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -15,7 +15,6 @@
DBG= -Os
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/miniroot/Makefile
--- a/distrib/miniroot/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/miniroot/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.68 2009/09/20 19:49:09 abs Exp $
+# $NetBSD: Makefile,v 1.69 2019/12/29 18:26:17 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -8,7 +8,6 @@
ARCHDIR= ${.CURDIR}/../${MACHINE}/miniroot
CRUNCHBIN= instbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${ARCHDIR}/list
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGE= miniroot.fs
diff -r 8b4bd764e865 -r c41c32375a3b distrib/mipsco/ramdisk/Makefile
--- a/distrib/mipsco/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/mipsco/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2017/01/24 18:04:03 christos Exp $
+# $NetBSD: Makefile,v 1.22 2019/12/29 18:26:18 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -12,7 +12,6 @@
DBG= -Os
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/newsmips/floppies/ramdisk/Makefile
--- a/distrib/newsmips/floppies/ramdisk/Makefile Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/newsmips/floppies/ramdisk/Makefile Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2019/02/07 04:33:58 mrg Exp $
+# $NetBSD: Makefile,v 1.36 2019/12/29 18:26:18 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -11,7 +11,6 @@
DBG= -Os -mmemcpy
CRUNCHBIN= ramdiskbin
-CRUNCHGEN_FLAGS= -d "${DBG}"
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= be
diff -r 8b4bd764e865 -r c41c32375a3b distrib/ofppc/ramdisks/common/Makefile.ramdisk
--- a/distrib/ofppc/ramdisks/common/Makefile.ramdisk Sun Dec 29 15:45:28 2019 +0000
+++ b/distrib/ofppc/ramdisks/common/Makefile.ramdisk Sun Dec 29 18:26:16 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.ramdisk,v 1.9 2018/12/24 20:11:22 mrg Exp $
+# $NetBSD: Makefile.ramdisk,v 1.10 2019/12/29 18:26:18 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
Home |
Main Index |
Thread Index |
Old Index