summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2018-03-23 20:20:04 +0000
committerian <ian@FreeBSD.org>2018-03-23 20:20:04 +0000
commit75e47fd878562851b056469f61758637b919bd3e (patch)
treeba5bd64e157470dbd88b01decb06c8ef6455b0e1
parent3392884117e3bf4bfcd14d9576e8c6177330caa4 (diff)
downloadFreeBSD-src-75e47fd878562851b056469f61758637b919bd3e.zip
FreeBSD-src-75e47fd878562851b056469f61758637b919bd3e.tar.gz
MFC r307656, r307659, r307674-r307675, r307679, r307683
Support for WITHOUT_GNU_DIFF and WITHOUT_GNU_GREP, plus manually regenerated src.conf.5, which seems to have picked up a couple changes beyond what was in this MFC. r307656: Put each SUBDIR on a separate line for ease of maintenance Additional patches to this file are in progress, and having each SUBDIR entry on a separate line makes it easier to change the order in which the patches are reviewed, tested, and applied. r307659: Switch gnu/usr.bin/Makefile to SUBDIR.${MK_*} optional subdir style r307674: Add knobs to make GNU diff and GNU grep optional This is added to facilitate experiments building FreeBSD without copyleft software. If WITHOUT_GNU_DIFF is set no /usr/bin/diff or /usr/bin/diff3 will be built. If WITHOUT_GNU_GREP is set then BSD grep will be installed as /usr/bin/bsdgrep or /usr/bin/grep, depending on the WITH_BSD_GREP knob. Reviewed by: brooks (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: Differential Revision: https://reviews.freebsd.org/D8288 r307675: Remove trailing whitespace from r307674 r307679: Build libgnuregex only if necessary for other components Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D8298 r307683: Correct typo in r307679: the variable is MK_GNU_GREP_COMPAT
-rw-r--r--gnu/lib/Makefile9
-rw-r--r--gnu/usr.bin/Makefile52
-rw-r--r--share/man/man5/src.conf.517
-rw-r--r--share/mk/src.opts.mk2
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc33
-rw-r--r--tools/build/options/WITHOUT_GNU_DIFF5
-rw-r--r--tools/build/options/WITHOUT_GNU_GREP3
7 files changed, 80 insertions, 41 deletions
diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile
index b77f9e3..3e4ee2b 100644
--- a/gnu/lib/Makefile
+++ b/gnu/lib/Makefile
@@ -2,7 +2,9 @@
.include <src.opts.mk>
-SUBDIR= csu libgcc libdialog libregex
+SUBDIR= csu
+SUBDIR+= libdialog
+SUBDIR+= libgcc
.if ${MK_GCC} != "no"
SUBDIR+= libgcov libgomp
@@ -20,6 +22,11 @@ SUBDIR+= tests
SUBDIR+= libreadline
.endif
+.if ${MK_GNU_DIFF} != "no" || ${MK_GNU_GREP} != "no" || \
+ ${MK_GNU_GREP_COMPAT} != "no" || ${MK_GDB} != "no"
+SUBDIR+= libregex
+.endif
+
# libsupc++ uses libstdc++ headers, although 'make includes' should
# have taken care of that already.
.if ${MK_GNUCXX} != "no"
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile
index 6ba9ef2..cdf4fe4 100644
--- a/gnu/usr.bin/Makefile
+++ b/gnu/usr.bin/Makefile
@@ -2,53 +2,27 @@
.include <src.opts.mk>
-SUBDIR= ${_binutils} \
- ${_cc} \
- diff \
- diff3 \
- ${_dtc} \
- ${_gdb} \
- ${_gperf} \
- grep \
- ${_groff} \
- ${_rcs} \
- ${_tests}
-
-SUBDIR_DEPEND_gdb= ${_binutils}
-
.if ${MK_CXX} != "no"
-.if ${MK_GCC} != "no"
-_gperf= gperf
-.endif
-.if ${MK_GROFF} != "no"
-_groff= groff
-.endif
-.endif
-
-.if ${MK_GPL_DTC} != "no"
-_dtc= dtc
-.endif
-
-.if ${MK_RCS} != "no"
-_rcs= rcs
+SUBDIR.${MK_GCC}+= gperf
+SUBDIR.${MK_GROFF}+= groff
.endif
-.if ${MK_TESTS} != "no"
-_tests= tests
-.endif
+SUBDIR.${MK_BINUTILS}+= binutils
+SUBDIR.${MK_DIALOG}+= dialog
.if ${MK_BINUTILS} != "no"
-_binutils= binutils
-.if ${MK_GDB} != "no"
-_gdb= gdb
-.endif
+SUBDIR.${MK_GDB}+= gdb
+SUBDIR_DEPEND_gdb= binutils
.endif
-.if ${MK_GCC} != "no"
-_cc= cc
-.endif
+SUBDIR.${MK_GCC}+= cc
+SUBDIR.${MK_GNU_DIFF}+= diff diff3
+SUBDIR.${MK_GNU_GREP}+= grep
+SUBDIR.${MK_GPL_DTC}+= dtc
+SUBDIR.${MK_RCS}+= rcs
+SUBDIR.${MK_TESTS}+= tests
-SUBDIR.${MK_DIALOG}+= dialog
+.info MK_GNU_DIFF=${MK_GNU_DIFF}
SUBDIR_PARALLEL=
diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
index 4f7660b..9830f1a 100644
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1,6 +1,6 @@
.\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
.\" $FreeBSD$
-.Dd January 8, 2018
+.Dd March 23, 2018
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -392,6 +392,8 @@ When set, it enforces these options:
.Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP
.It
.Va WITHOUT_GCC_BOOTSTRAP
+.It
+.Va WITHOUT_LLD_BOOTSTRAP
.El
.It Va WITHOUT_CRYPT
Set to not build any crypto code.
@@ -731,6 +733,14 @@ This is the default on platforms where gcc is the system compiler.
.Pp
This is a default setting on
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
+.It Va WITHOUT_GNU_DIFF
+Set to not build GNU
+.Xr diff 1
+and
+.Xr diff3 1 .
+.It Va WITHOUT_GNU_GREP
+Set to not build GNU
+.Xr grep 1 .
.It Va WITHOUT_GNU_GREP_COMPAT
Set this option to omit the gnu extensions to grep from being included in
BSD grep.
@@ -982,6 +992,11 @@ Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder).
.Pp
This is a default setting on
arm64/aarch64.
+.It Va WITH_LOADER_FIREWIRE
+Enable firewire support in /boot/loader and /boot/zfsloader on x86.
+This option is a nop on all other platforms.
+.It Va WITHOUT_LOADER_GELI
+Disable inclusion of GELI crypto support in the boot chain binaries.
.It Va WITHOUT_LOCALES
Set to not build localization files; see
.Xr locale 1 .
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index 9e277c3..eee4139 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -100,6 +100,8 @@ __DEFAULT_YES_OPTIONS = \
GCOV \
GDB \
GNU \
+ GNU_DIFF \
+ GNU_GREP \
GNU_GREP_COMPAT \
GPIO \
GPL_DTC \
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 8c9d6af..2502c78 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -2442,6 +2442,39 @@ OLD_FILES+=usr/share/man/man3/gpio_pin_tristate.3.gz
OLD_FILES+=usr/share/man/man8/gpioctl.8.gz
.endif
+.if ${MK_GNU_DIFF} == no
+OLD_FILES+=usr/bin/diff
+OLD_FILES+=usr/bin/diff3
+OLD_FILES+=usr/share/man/man1/diff.1.gz
+OLD_FILES+=usr/share/man/man1/diff3.1.gz
+OLD_FILES+=usr/share/man/man7/diff.7.gz
+.endif
+
+.if ${MK_GNU_GREP} == no
+OLD_FILES+=usr/bin/gnugrep
+OLD_FILES+=usr/share/man/man1/gnugrep.1.gz
+.if ${MK_BSD_GREP} == no
+OLD_FILES+=usr/bin/bzgrep
+OLD_FILES+=usr/bin/bzegrep
+OLD_FILES+=usr/bin/bzfgrep
+OLD_FILES+=usr/bin/egrep
+OLD_FILES+=usr/bin/fgrep
+OLD_FILES+=usr/bin/grep
+OLD_FILES+=usr/bin/zegrep
+OLD_FILES+=usr/bin/zfgrep
+OLD_FILES+=usr/bin/zgrep
+OLD_FILES+=usr/share/man/man1/bzegrep.1.gz
+OLD_FILES+=usr/share/man/man1/bzfgrep.1.gz
+OLD_FILES+=usr/share/man/man1/bzgrep.1.gz
+OLD_FILES+=usr/share/man/man1/egrep.1.gz
+OLD_FILES+=usr/share/man/man1/fgrep.1.gz
+OLD_FILES+=usr/share/man/man1/grep.1.gz
+OLD_FILES+=usr/share/man/man1/zegrep.1.gz
+OLD_FILES+=usr/share/man/man1/zfgrep.1.gz
+OLD_FILES+=usr/share/man/man1/zgrep.1.gz
+.endif
+.endif
+
# Also includes vgrind(1)
.if ${MK_GROFF} == no
OLD_FILES+=usr/bin/addftinfo
diff --git a/tools/build/options/WITHOUT_GNU_DIFF b/tools/build/options/WITHOUT_GNU_DIFF
new file mode 100644
index 0000000..de8667f
--- /dev/null
+++ b/tools/build/options/WITHOUT_GNU_DIFF
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build GNU
+.Xr diff 1
+and
+.Xr diff3 1 .
diff --git a/tools/build/options/WITHOUT_GNU_GREP b/tools/build/options/WITHOUT_GNU_GREP
new file mode 100644
index 0000000..1bb7d4a
--- /dev/null
+++ b/tools/build/options/WITHOUT_GNU_GREP
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build GNU
+.Xr grep 1 .
OpenPOWER on IntegriCloud