diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-10-19 17:28:18 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-10-20 08:29:30 +0200 |
commit | 1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc (patch) | |
tree | 13ee3b6da82e5eb53a89bb881ccf3a7092dab9fe /Makefile | |
parent | 087b5f4dbb9e3f767a8afbb6c1001c509965940b (diff) | |
download | passt-1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc.tar passt-1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc.tar.gz passt-1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc.tar.bz2 passt-1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc.tar.lz passt-1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc.tar.xz passt-1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc.tar.zst passt-1a563a0cbd4926d0dfe9065a4fcd8771c5b292cc.zip |
passt: Address gcc 11 warnings
A mix of unchecked return values, a missing permission mask for
open(2) with O_CREAT, and some false positives from
-Wstringop-overflow and -Wmaybe-uninitialized.
Reported-by: Martin Hauke <mardnh@gmx.de>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -15,6 +15,20 @@ CFLAGS += -DPAGE_SIZE=$(shell getconf PAGE_SIZE) CFLAGS += -DNETNS_RUN_DIR=\"/run/netns\" CFLAGS += -DPASST_AUDIT_ARCH=AUDIT_ARCH_$(shell uname -m | tr [a-z] [A-Z]) +# On gcc 11.2, with -O2 and -flto, tcp_hash() and siphash_20b(), if inlined, +# seem to be hitting something similar to: +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78993 +# from the pointer arithmetic used from the tcp_tap_handler() path to get the +# remote connection address. +ifeq ($(shell $(CC) -dumpversion),11) +ifneq (,$(filter -flto%,$(CFLAGS))) +ifneq (,$(filter -O2,$(CFLAGS))) + CFLAGS += -DTCP_HASH_NOINLINE + CFLAGS += -DSIPHASH_20B_NOINLINE +endif +endif +endif + prefix ?= /usr/local all: passt pasta passt4netns qrap |