aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-09-09 17:26:44 +0000
committerEd Maste <emaste@FreeBSD.org>2018-09-09 17:26:44 +0000
commit2c208ed867fb021766bf70f9a8e62ed6a0d34c6a (patch)
tree695999f7d0b8e544c67056dbec6cb0ef3a05fe93 /sbin
parent7a8d26613918887296503ab39c06ba605f7880dd (diff)
downloadsrc-2c208ed867fb021766bf70f9a8e62ed6a0d34c6a.tar.gz
src-2c208ed867fb021766bf70f9a8e62ed6a0d34c6a.zip
Allow dhclient and ping to build WITHOUT_DYNAMICROOT
dhclient and ping normally use libcasper services. These are not available in statically-linked binaries, so when WITHOUT_DYNAMICROOT is set disable libcasper use, as with rescue builds. Also emit a warning as it's undesirable to build this way. Reported by: Michael Dexter Reviewed by: rgrimes Tested by: Michael Dexter Approved by: re (kib) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17074
Notes
Notes: svn path=/head/; revision=338543
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/Makefile4
-rw-r--r--sbin/ping/Makefile4
2 files changed, 6 insertions, 2 deletions
diff --git a/sbin/dhclient/Makefile b/sbin/dhclient/Makefile
index dbba0d41226a..99b749eb720f 100644
--- a/sbin/dhclient/Makefile
+++ b/sbin/dhclient/Makefile
@@ -44,7 +44,9 @@ MAN= dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-options.5 \
dhclient-script.8
LIBADD= util
-.if ${MK_CASPER} != "no" && !defined(RESCUE)
+.if ${MK_DYNAMICROOT} == "no"
+.warning ${PROG} built without libcasper support
+.elif ${MK_CASPER} != "no" && !defined(RESCUE)
LIBADD+= casper
LIBADD+= cap_syslog
CFLAGS+=-DWITH_CASPER
diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile
index 12f00ffe5d1f..8308528ad2e9 100644
--- a/sbin/ping/Makefile
+++ b/sbin/ping/Makefile
@@ -11,7 +11,9 @@ BINMODE=4555
WARNS?= 3
LIBADD= m
-.if ${MK_CASPER} != "no" && !defined(RESCUE)
+.if ${MK_DYNAMICROOT} == "no"
+.warning ${PROG} built without libcasper support
+.elif ${MK_CASPER} != "no" && !defined(RESCUE)
LIBADD+= casper
LIBADD+= cap_dns
CFLAGS+=-DWITH_CASPER