2011-04-07 15:03:35 +02:00
|
|
|
# $NetBSD: Makefile,v 1.4 2011/02/16 01:31:33 joerg Exp $
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 21:11:57 +02:00
|
|
|
# $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $
|
|
|
|
|
2014-05-06 06:22:01 +02:00
|
|
|
.include <src.opts.mk>
|
2011-05-25 03:04:12 +02:00
|
|
|
|
2021-12-14 15:31:30 +01:00
|
|
|
PACKAGE= runtime
|
HBSD: Introduce Control-Flow Integrity (CFI)
Control Flow Integrity, or CFI, is an exploit mitigation technique that
helps prevent attackers from modifying the behavior of a program and
jumping to undefined or arbitrary memory locations. Microsoft has
implemented a variant of CFI, which they term Control Flow Guard, or
CFG. The PaX team has spent the last few years perfecting their Return
Address Protection, RAP. CFI, CFG, and RAP all attempt to accomplish the
same goal, with RAP being the most complete and effective
implementation. Clang's CFI is stronger than Microsoft's CFG and PaX
Team's RAP is stronger than both CFI and CFG. RAP would be a great
addition to HardenedBSD; however, it requires a GPLv3 toolchain and is
patented.
HardenedBSD is excited to announce the integration of Clang's CFI into
base. CFI is enabled by default in HardenedBSD 12-CURRENT on amd64 and
can be disabled by setting WITHOUT_CFI in src.conf. CFI is not
applicable to architectures other than amd64.
Since CFI requires lld, this also sets ld.lld as the default linker on
amd64 and arm64.
Signed-off-by: Shawn Webb <shawn.webb@hardenedbsd.org>
Sponsored-by: SoldierX
2017-03-02 22:12:02 +01:00
|
|
|
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 21:11:57 +02:00
|
|
|
PROG= grep
|
2018-04-25 15:23:58 +02:00
|
|
|
MAN1= grep.1 zgrep.1
|
2011-10-05 11:56:43 +02:00
|
|
|
|
|
|
|
SRCS= file.c grep.c queue.c util.c
|
|
|
|
|
2018-04-25 15:23:58 +02:00
|
|
|
SCRIPTS= zgrep.sh
|
|
|
|
LINKS= ${BINDIR}/zgrep ${BINDIR}/zfgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/zegrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/bzgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/bzegrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/bzfgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/lzgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/lzegrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/lzfgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/xzgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/xzegrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/xzfgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/zstdgrep \
|
|
|
|
${BINDIR}/zgrep ${BINDIR}/zstdegrep \
|
2021-01-17 23:03:04 +01:00
|
|
|
${BINDIR}/zgrep ${BINDIR}/zstdfgrep
|
2018-04-25 15:23:58 +02:00
|
|
|
|
2020-12-22 22:36:40 +01:00
|
|
|
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
|
|
|
|
${BINDIR}/grep ${BINDIR}/fgrep \
|
|
|
|
${BINDIR}/grep ${BINDIR}/rgrep \
|
|
|
|
|
2018-04-25 15:23:58 +02:00
|
|
|
MLINKS= zgrep.1 zfgrep.1 \
|
|
|
|
zgrep.1 zegrep.1 \
|
|
|
|
zgrep.1 bzgrep.1 \
|
|
|
|
zgrep.1 bzegrep.1 \
|
|
|
|
zgrep.1 bzfgrep.1 \
|
|
|
|
zgrep.1 lzgrep.1 \
|
|
|
|
zgrep.1 lzegrep.1 \
|
|
|
|
zgrep.1 lzfgrep.1 \
|
|
|
|
zgrep.1 xzgrep.1 \
|
|
|
|
zgrep.1 xzegrep.1 \
|
|
|
|
zgrep.1 xzfgrep.1 \
|
|
|
|
zgrep.1 zstdgrep.1 \
|
|
|
|
zgrep.1 zstdegrep.1 \
|
|
|
|
zgrep.1 zstdfgrep.1
|
|
|
|
|
2020-12-22 22:36:40 +01:00
|
|
|
MLINKS+= grep.1 egrep.1 \
|
|
|
|
grep.1 fgrep.1 \
|
|
|
|
grep.1 rgrep.1
|
2015-07-26 02:11:04 +02:00
|
|
|
|
2020-12-22 22:36:40 +01:00
|
|
|
CFLAGS.gcc+= --param max-inline-insns-single=500
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 21:11:57 +02:00
|
|
|
|
2020-12-06 18:45:42 +01:00
|
|
|
.if !defined(BOOTSTRAPPING)
|
2020-08-04 04:47:24 +02:00
|
|
|
LIBADD+= regex
|
2020-12-06 18:45:42 +01:00
|
|
|
.endif
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 21:11:57 +02:00
|
|
|
|
2017-08-02 10:50:42 +02:00
|
|
|
HAS_TESTS=
|
2017-08-02 10:35:51 +02:00
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
2014-10-09 03:53:23 +02:00
|
|
|
|
2021-12-21 15:13:52 +01:00
|
|
|
NOCFI= yes
|
|
|
|
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 21:11:57 +02:00
|
|
|
.include <bsd.prog.mk>
|