diff --git a/mk/flags.mk b/mk/flags.mk index 1326271f7..23e40abdf 100644 --- a/mk/flags.mk +++ b/mk/flags.mk @@ -35,6 +35,13 @@ YYFLAGS += -Wno-other # --debug --verbose LLFLAGS += LDFLAGS += $(MARCH) + +# do not cause the "free nonheap object"-waning to cause an error +# code generated by bison may cause gcc11 to errornously detect such a condition. +ifeq "$(CXX)" "g++" +CXXFLAGS += -Wno-free-nonheap-object +endif + # Add boost library search path. # This is the defualt installation location by home brew. ifeq "$(is_darwin)" "1"