aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-09-14 15:49:32 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-09-22 16:53:35 +0200
commit6655625c30baf7100514c2f008512e72bae8f861 (patch)
tree302cb5824397101b1d11ab7a46042285413d47e4
parent512f5b1aab2a09faf8d63894ebadc8a2a96c6925 (diff)
downloadpasst-6655625c30baf7100514c2f008512e72bae8f861.tar
passt-6655625c30baf7100514c2f008512e72bae8f861.tar.gz
passt-6655625c30baf7100514c2f008512e72bae8f861.tar.bz2
passt-6655625c30baf7100514c2f008512e72bae8f861.tar.lz
passt-6655625c30baf7100514c2f008512e72bae8f861.tar.xz
passt-6655625c30baf7100514c2f008512e72bae8f861.tar.zst
passt-6655625c30baf7100514c2f008512e72bae8f861.zip
Makefile: Include seccomp.h in HEADERS and require it for static checkers
Targets running static checkers (cppcheck and clang-tidy) need seccomp.h, but the latter is not included in HEADERS. Add it. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 6805c23..c47a5f6 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ MANPAGES = passt.1 pasta.1 qrap.1
PASST_HEADERS = arch.h arp.h checksum.h conf.h dhcp.h dhcpv6.h icmp.h \
isolation.h lineread.h ndp.h netlink.h packet.h passt.h pasta.h \
pcap.h siphash.h tap.h tcp.h tcp_splice.h udp.h util.h
-HEADERS = $(PASST_HEADERS)
+HEADERS = $(PASST_HEADERS) seccomp.h
# On gcc 11.2, with -O2 and -flto, tcp_hash() and siphash_20b(), if inlined,
# seem to be hitting something similar to:
@@ -104,11 +104,11 @@ static: clean all
seccomp.h: $(PASST_SRCS) $(PASST_HEADERS)
@ EXTRA_SYSCALLS=$(EXTRA_SYSCALLS) ./seccomp.sh $^
-passt: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h
+passt: $(PASST_SRCS) $(HEADERS)
$(CC) $(FLAGS) $(CFLAGS) $(PASST_SRCS) -o passt $(LDFLAGS)
passt.avx2: FLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops
-passt.avx2: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h
+passt.avx2: $(PASST_SRCS) $(HEADERS)
$(CC) $(filter-out -O2,$(FLAGS) $(CFLAGS)) \
$(PASST_SRCS) -o passt.avx2 $(LDFLAGS)