From 7c2f310f6dd8cf0ed249933eea7c643f2c311745 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 5 Dec 2020 02:21:58 +0000 Subject: [PATCH] Retire GNU_GREP_COMPAT knob This was introduced and then disabled by default primarily to avoid dealing with bugs in libgnuregex. rS363823 switched to using libregex for it, so let's just rip the option out now so we can make sure we're getting tested with libregex via bsdgrep. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D27476 --- share/mk/src.opts.mk | 1 - tools/build/options/WITHOUT_GNU_GREP_COMPAT | 3 --- tools/build/options/WITH_GNU_GREP_COMPAT | 4 ---- usr.bin/grep/Makefile | 3 --- usr.bin/grep/grep.c | 7 +------ 5 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 tools/build/options/WITHOUT_GNU_GREP_COMPAT delete mode 100644 tools/build/options/WITH_GNU_GREP_COMPAT diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 205a71bc39d..5a8d51d5a7f 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -208,7 +208,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DTRACE_TESTS \ EXPERIMENTAL \ - GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ LOADER_FIREWIRE \ diff --git a/tools/build/options/WITHOUT_GNU_GREP_COMPAT b/tools/build/options/WITHOUT_GNU_GREP_COMPAT deleted file mode 100644 index 037b9321589..00000000000 --- a/tools/build/options/WITHOUT_GNU_GREP_COMPAT +++ /dev/null @@ -1,3 +0,0 @@ -.\" $FreeBSD$ -Set this option to omit the gnu extensions to grep from being included in -BSD grep. diff --git a/tools/build/options/WITH_GNU_GREP_COMPAT b/tools/build/options/WITH_GNU_GREP_COMPAT deleted file mode 100644 index 7809177855b..00000000000 --- a/tools/build/options/WITH_GNU_GREP_COMPAT +++ /dev/null @@ -1,4 +0,0 @@ -.\" $FreeBSD$ -Set this option to include GNU extensions in -.Xr bsdgrep 1 -by linking against libgnuregex. diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index 41888904705..4ff56e342c6 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -60,10 +60,7 @@ MLINKS+= grep.1 egrep.1 \ grep.1 rgrep.1 .endif -.if ${MK_GNU_GREP_COMPAT} != "no" -CFLAGS+= -DWITH_GNU_COMPAT LIBADD+= regex -.endif HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index 576ea96d4f9..90d1c270f1f 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -62,8 +62,7 @@ const char *errstr[] = { /* 5*/ "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n", /* 6*/ "\t[--null] [pattern] [file ...]\n", /* 7*/ "Binary file %s matches\n", -/* 8*/ "%s (BSD grep) %s\n", -/* 9*/ "%s (BSD grep, GNU compatible) %s\n", +/* 8*/ "%s (BSD grep, GNU compatible) %s\n", }; /* Flags passed to regcomp() and regexec() */ @@ -555,11 +554,7 @@ main(int argc, char *argv[]) filebehave = FILE_MMAP; break; case 'V': -#ifdef WITH_GNU_COMPAT - printf(errstr[9], getprogname(), VERSION); -#else printf(errstr[8], getprogname(), VERSION); -#endif exit(0); case 'v': vflag = true;