@@ -244,18 +244,16 @@ INCLUDE += $(LIBTIRPC_CFLAGS)
244244# Compilation options. Perhaps some of these should come from Makefile.inc? (CXXFLAGS now does)
245245INTEGER_OVERFLOW_FLAGS := -fwrapv
246246OPT := -Os $(INTEGER_OVERFLOW_FLAGS )
247- DEBUG := $(DEBUG ) -g -Wall -Wno-stringop-truncation
248- CFLAGS := $(INCLUDE ) $(OPT ) $(DEBUG ) $(EXTRA_DEBUG ) -DULAPI -std=gnu99 -fgnu89-inline -Werror=implicit-function-declaration $(CFLAGS ) $(CPPFLAGS )
249- CXXFLAGS := $(INCLUDE ) $(EXTRA_DEBUG ) -DULAPI $(DEBUG ) $(OPT ) -Woverloaded-virtual $(CXXFLAGS ) $(CPPFLAGS )
250- CXXFLAGS += $(call cxx-option, -Wno-psabi)
251- CXXFLAGS += $(call cxx-option, -std=gnu++11, -std=gnu++0x)
247+ DEBUG := $(DEBUG ) -g -Werror -Werror=all -Wstringop-truncation -Wno-stringop-truncation
248+ CFLAGS := $(INCLUDE ) $(OPT ) $(DEBUG ) $(EXTRA_DEBUG ) -DULAPI -std=gnu11 -Werror=implicit-function-declaration $(CFLAGS ) $(CPPFLAGS )
249+ CXXFLAGS := $(INCLUDE ) $(EXTRA_DEBUG ) -DULAPI $(DEBUG ) $(OPT ) -Werror=overloaded-virtual $(CXXFLAGS ) $(CPPFLAGS )
250+ CXXFLAGS += -std=gnu++17
252251# In Debian 11, any inclusion of <boost/python.hpp> leads to several
253252# diagnostics from included headers about deprecated features. LinuxCNC does
254253# not directly use these deprecated features, but it does use boost::python.
255254# Silence the warnings just when they occur in files using boost/python.hpp by
256255# adding SILENCE_BOOST_INTERNAL_DIAGNOSTICS_FLAGS to the object's EXTRAFLAGS
257256SILENCE_BOOST_INTERNAL_DIAGNOSTICS_FLAGS = -DBOOST_ALLOW_DEPRECATED_HEADERS=1 -DBOOST_BIND_GLOBAL_PLACEHOLDERS=1
258-
259257CFLAGS += $(TOOL_NML_FLAG )
260258CXXFLAGS += $(TOOL_NML_FLAG )
261259
@@ -877,7 +875,7 @@ EXTRA_CFLAGS := $(filter-out -ffast-math,$(RTFLAGS)) -D__MODULE__ -I$(BASEPWD)/.
877875 -I$(BASEPWD ) /emc/nml_intf -I$(BASEPWD ) /emc/kinematics -I$(BASEPWD ) /emc/tp -I$(BASEPWD ) /emc/motion \
878876 -DSEQUENTIAL_SUPPORT -DHAL_SUPPORT -DDYNAMIC_PLCSIZE -DRT_SUPPORT -DOLD_TIMERS_MONOS_SUPPORT -DMODBUS_IO_MASTER \
879877 -fno-fast-math $(call cc-option,-mieee-fp) -fno-unsafe-math-optimizations \
880- -Wframe -larger-than=2560 -Wno-declaration-after-statement \
878+ -Werror=frame -larger-than=2560 -Wno-declaration-after-statement \
881879 $(INTEGER_OVERFLOW_FLAGS )
882880ifneq ($(KERNELRELEASE ) ,)
883881ifeq ($(RTARCH ) :$(RTAI ) :$(filter $(RTFLAGS ) ,-msse) ,x86_64:3:)
0 commit comments