diff options
| author | rmind <rmind@NetBSD.org> | 2012-08-01 23:24:28 +0000 |
|---|---|---|
| committer | rmind <rmind@NetBSD.org> | 2012-08-01 23:24:28 +0000 |
| commit | 6bbc4ef3003da47e2dd164e487d6e5dd5163b693 (patch) | |
| tree | 93e7a134ad5aa7274b17423bd0a016d4a64acebc /sys/modules | |
| parent | e2a5eda78e8d6fbfd0fb4271b9661d208b308660 (diff) | |
Add BPF JIT compiler, currently supporting amd64 and i386. Code obtained
from FreeBSD. Also, make few BPF fixes and simplifications while here.
Note that bpf_jit_enable is false for now.
OK dyoung@, some feedback from matt@
Diffstat (limited to 'sys/modules')
| -rw-r--r-- | sys/modules/bpf/Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/modules/bpf/Makefile b/sys/modules/bpf/Makefile index 742b6ae408e..a0e6df39eb2 100644 --- a/sys/modules/bpf/Makefile +++ b/sys/modules/bpf/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/01/25 22:21:28 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2012/08/01 23:24:29 rmind Exp $ # .include "../Makefile.inc" @@ -10,4 +10,16 @@ KMOD= bpf # inseparable from bpfilter?) SRCS= bpf.c bpf_filter.c +.PATH: ${S}/arch/${MACHINE}/${MACHINE} +.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} +.PATH: ${S}/arch/${MACHINE_CPU}/${MACHINE_CPU} + +.if (exists(${S}/arch/${MACHINE}/${MACHINE}/bpf_jit_machdep.c)) || \ + (exists(${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c) || \ + (exists(${S}/arch/${MACHINE_CPU}/${MACHINE_CPU}/bpf_jit_machdep.c)) +SRCS+= bpf_jit.c +SRCS+= bpf_jit_machdep.c +CPPFLAGS+= -DBPF_JIT +.endif + .include <bsd.kmodule.mk> |
