From 1b70b945fa69a7c82b8e16d7a6b63d960eb51944 Mon Sep 17 00:00:00 2001 From: Tobias Faller Date: Thu, 1 Jul 2021 19:05:18 +0200 Subject: [PATCH 1/2] Added workaround for incorrect null dereference warnings in GCC 11.1.0 --- vp_models.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vp_models.mk b/vp_models.mk index 4a9bfe8..6bbc94a 100644 --- a/vp_models.mk +++ b/vp_models.mk @@ -24,6 +24,15 @@ VP_COMP_DBG_LDFLAGS=-lpulpvp-debug VP_COMP_CFLAGS += -Werror -Wfatal-errors VP_COMP_LDFLAGS += -Werror -Wfatal-errors +# This workaround disables the -Werror for detected null pointer dereferences. +# This is only necessary in the case of a buggy detection where +# invalid warnings are issued that result in a fatal build error. +ifdef VP_WORKAROUND_NONNULL_BUG +VP_COMP_CFLAGS += -Wno-error=nonnull +VP_COMP_CPPFLAGS += -Wno-error=nonnull +VP_COMP_LDFLAGS += -Wno-error=nonnull +endif + ifdef VP_USE_SYSTEMC VP_COMP_CFLAGS += -D__VP_USE_SYSTEMC -I$(SYSTEMC_HOME)/include ifdef VP_USE_SYSTEMC_DRAMSYS From 076d1ccd5e2da91d1201957aebd71905c886a2c3 Mon Sep 17 00:00:00 2001 From: Tobias Faller Date: Sun, 4 Jul 2021 21:31:33 +0200 Subject: [PATCH 2/2] Changed workaround to be included by default --- vp_models.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/vp_models.mk b/vp_models.mk index 6bbc94a..ce109f2 100644 --- a/vp_models.mk +++ b/vp_models.mk @@ -27,11 +27,9 @@ VP_COMP_LDFLAGS += -Werror -Wfatal-errors # This workaround disables the -Werror for detected null pointer dereferences. # This is only necessary in the case of a buggy detection where # invalid warnings are issued that result in a fatal build error. -ifdef VP_WORKAROUND_NONNULL_BUG VP_COMP_CFLAGS += -Wno-error=nonnull VP_COMP_CPPFLAGS += -Wno-error=nonnull VP_COMP_LDFLAGS += -Wno-error=nonnull -endif ifdef VP_USE_SYSTEMC VP_COMP_CFLAGS += -D__VP_USE_SYSTEMC -I$(SYSTEMC_HOME)/include