From a52b0bb1d2db8eb6a8337a606c7069b9d4407d1b Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 30 Mar 2020 20:05:09 +0000 Subject: [PATCH] drop GDB_LIBEXEC option (now always true) In-tree gdb is essentially obsolete. We kept it for sparc64 (because gdb in ports lacked sparc64 support) and as a fallback for crashinfo. gdb was installed to /libexec on all archs other than sparc64, where the WITHOUT_GDB_LIBEXEC option was default, with gdb installed to /usr/bin. With sparc64's retirement WITH_GDB_LIBEXEC became the default for all architectures, but it was still possible to set it off and install gdb into /usr/bin. As the next step in gdb's retirement, remove the option and install gdb only into /libexec as the crashinfo fallback. We expect users to install the gdb port or package for debugging. The in-tree gdb lacks support for a number of supported architectures and does not support contemporary DWARF debug info. Reviewed by: jhb (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24227 --- ObsoleteFiles.inc | 8 ++++++++ gnu/usr.bin/gdb/Makefile | 6 ------ gnu/usr.bin/gdb/Makefile.inc | 2 +- share/mk/src.opts.mk | 1 - tools/build/mk/OptionalObsoleteFiles.inc | 11 +---------- tools/build/options/WITHOUT_GDB_LIBEXEC | 5 ----- tools/build/options/WITH_GDB_LIBEXEC | 10 ---------- 7 files changed, 10 insertions(+), 33 deletions(-) delete mode 100644 tools/build/options/WITHOUT_GDB_LIBEXEC delete mode 100644 tools/build/options/WITH_GDB_LIBEXEC diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 3474068a9979..5f0067243f1e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20200330: GDB_LIBEXEC option retired (always true) +OLD_FILES+=usr/bin/gdb +OLD_FILES+=usr/bin/gdbserver +OLD_FILES+=usr/bin/kgdb +OLD_FILES+=usr/share/man/man1/gdb.1.gz +OLD_FILES+=usr/share/man/man1/gdbserver.1.gz +OLD_FILES+=usr/share/man/man1/kgdb.1.gz + # 20200327: OCF refactoring OLD_FILES+=usr/share/man/man9/crypto_find_driver.9 OLD_FILES+=usr/share/man/man9/crypto_register.9 diff --git a/gnu/usr.bin/gdb/Makefile b/gnu/usr.bin/gdb/Makefile index c9564c232a3c..114c335fd0fd 100644 --- a/gnu/usr.bin/gdb/Makefile +++ b/gnu/usr.bin/gdb/Makefile @@ -4,10 +4,4 @@ SUBDIR= libgdb gdb kgdb -.if ${MK_GDB_LIBEXEC} == "no" -.if exists(${.CURDIR}/gdbserver/reg-${MACHINE_CPUARCH}.c) -SUBDIR+=gdbserver -.endif -.endif - .include diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc index 68e7a6c3b986..097975de3128 100644 --- a/gnu/usr.bin/gdb/Makefile.inc +++ b/gnu/usr.bin/gdb/Makefile.inc @@ -58,7 +58,7 @@ GENSRCS+= nm.h tm.h CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H} GDB_SUFFIX= -${TARGET_ARCH} MAN= -.elif ${MK_GDB_LIBEXEC} != "no" +.else BINDIR?= /usr/libexec MAN= .endif diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 0c836c72b72c..08cc821df0e9 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -106,7 +106,6 @@ __DEFAULT_YES_OPTIONS = \ FTP \ GAMES \ GDB \ - GDB_LIBEXEC \ GNU_DIFF \ GNU_GREP \ GOOGLETEST \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 9f02de5396e9..11a5ce3648c5 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2282,16 +2282,7 @@ OLD_FILES+=usr/bin/llvm-profdata OLD_FILES+=usr/share/man/man1/llvm-cov.1.gz .endif -.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == yes -OLD_FILES+=usr/bin/gdb -OLD_FILES+=usr/bin/gdbserver -OLD_FILES+=usr/bin/kgdb -OLD_FILES+=usr/share/man/man1/gdb.1.gz -OLD_FILES+=usr/share/man/man1/gdbserver.1.gz -OLD_FILES+=usr/share/man/man1/kgdb.1.gz -.endif - -.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == no +.if ${MK_GDB} == no OLD_FILES+=usr/libexec/gdb OLD_FILES+=usr/libexec/kgdb .endif diff --git a/tools/build/options/WITHOUT_GDB_LIBEXEC b/tools/build/options/WITHOUT_GDB_LIBEXEC deleted file mode 100644 index 4fbe30cb846e..000000000000 --- a/tools/build/options/WITHOUT_GDB_LIBEXEC +++ /dev/null @@ -1,5 +0,0 @@ -.\" $FreeBSD$ -Set to install -.Xr gdb 1 -into -.Pa /usr/bin . diff --git a/tools/build/options/WITH_GDB_LIBEXEC b/tools/build/options/WITH_GDB_LIBEXEC deleted file mode 100644 index 7ba0bf1d9508..000000000000 --- a/tools/build/options/WITH_GDB_LIBEXEC +++ /dev/null @@ -1,10 +0,0 @@ -.\" $FreeBSD$ -Set to install -.Xr gdb 1 -into -.Pa /usr/libexec . -This permits -.Xr gdb 1 -to be used as a fallback for -.Xr crashinfo 8 -if a newer version is not installed.