Revert "Switch to PCRE grep."
This reverts commit 90a018a87a605de6ad3550861143f1a5f7917570.
Not a clean revert because things have changed slightly, and I'm sticking
with the egrep/fgrep shell scripts for now.
Bug: http://b/111849261
Bug: https://bugs.exim.org/show_bug.cgi?id=2294
Test: manual
Change-Id: I72ae637c84f0eb1c2b5291db73ebff1628d54110
diff --git a/toolbox/Android.bp b/toolbox/Android.bp
index fc51705..e75e4af 100644
--- a/toolbox/Android.bp
+++ b/toolbox/Android.bp
@@ -60,3 +60,20 @@
defaults: ["toolbox_defaults"],
srcs: ["r.c"],
}
+
+// We build BSD grep separately (but see http://b/111849261).
+cc_binary {
+ name: "grep",
+ defaults: ["toolbox_defaults"],
+ srcs: [
+ "upstream-netbsd/usr.bin/grep/fastgrep.c",
+ "upstream-netbsd/usr.bin/grep/file.c",
+ "upstream-netbsd/usr.bin/grep/grep.c",
+ "upstream-netbsd/usr.bin/grep/queue.c",
+ "upstream-netbsd/usr.bin/grep/util.c",
+ ],
+
+ sanitize: {
+ integer_overflow: false,
+ },
+}