aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim/Makefile
diff options
context:
space:
mode:
authorJakub Kicinski2018-01-23 11:22:54 -0800
committerDavid S. Miller2018-01-23 20:24:31 -0500
commit7c5db7e7292f7f3244f895e7fa301dcff647e07e (patch)
treecbd37f35387938e891ba140be8abbd9874904d98 /drivers/net/netdevsim/Makefile
parentcaf952288d715df32b2e70c64506849287844fe4 (diff)
netdevsim: don't compile BPF code if syscall not enabled
We should not compile netdevsim/bpf.c if BPF syscall is not enabled. Otherwise bpf core would have to provide wrappers for all functions offload drivers may call, even though system will never see a BPF object. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/Makefile')
-rw-r--r--drivers/net/netdevsim/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/netdevsim/Makefile b/drivers/net/netdevsim/Makefile
index 074ddebbc41d..09388c06171d 100644
--- a/drivers/net/netdevsim/Makefile
+++ b/drivers/net/netdevsim/Makefile
@@ -4,4 +4,8 @@ obj-$(CONFIG_NETDEVSIM) += netdevsim.o
netdevsim-objs := \
netdev.o \
- bpf.o \
+
+ifeq ($(CONFIG_BPF_SYSCALL),y)
+netdevsim-objs += \
+ bpf.o
+endif