File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ INCLUDE += $(LIBTIRPC_CFLAGS)
252252# Compilation options. Perhaps some of these should come from Makefile.inc? (CXXFLAGS now does)
253253INTEGER_OVERFLOW_FLAGS := -fwrapv
254254OPT := -Os $(INTEGER_OVERFLOW_FLAGS )
255- DEBUG := $(DEBUG ) -g -Wall -Wno-stringop-truncation - D_FORTIFY_SOURCE=2
255+ DEBUG := $(DEBUG ) -g -Wall -D_FORTIFY_SOURCE=2
256256CFLAGS := $(INCLUDE ) $(OPT ) $(DEBUG ) $(EXTRA_DEBUG ) -DULAPI -std=gnu11 -Werror=implicit-function-declaration $(CFLAGS ) $(CPPFLAGS )
257257CXXFLAGS := $(INCLUDE ) $(EXTRA_DEBUG ) -DULAPI $(DEBUG ) $(OPT ) -Werror=overloaded-virtual $(CXXFLAGS ) $(CPPFLAGS )
258258CXXFLAGS += -std=gnu++17
Original file line number Diff line number Diff line change @@ -408,6 +408,14 @@ elif ! test `$CC -dumpversion | cut -d '.' -f 1` -gt 2 ; then
408408 AC_MSG_ERROR ( [ Compilers older than gcc 3.x are no longer supported] )
409409fi
410410
411+ # Set flags for C and C++ if supported
412+ for commonflag in -Wno-stringop-truncation ; do
413+ if echo "int main() { return 0;}" | $CC -Werror $commonflag -E - > /dev/null; then
414+ CFLAGS="$CFLAGS $flag"
415+ CXXFLAGS="$CXXFLAGS $flag"
416+ fi
417+ done
418+
411419AC_MSG_CHECKING ( [ for usability of linux/hidraw.h] )
412420AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
413421#include <sys/ioctl.h>
You can’t perform that action at this time.
0 commit comments