diff --git a/kernel.spec b/kernel.spec index 36287d2..70fbc0a 100644 --- a/kernel.spec +++ b/kernel.spec @@ -181,6 +181,9 @@ Patch101: perf-xmlto-skip-validation.patch # http://bugs.rosalinux.ru/show_bug.cgi?id=6459 Patch102: audit-make-it-less-verbose.patch +# May help when building with GCC 8+. +Patch105: perf-silence-format-warnings-gcc8.patch + # Increase vmalloc area, https://bugs.mageia.org/show_bug.cgi?id=904 Patch106: x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch diff --git a/perf-silence-format-warnings-gcc8.patch b/perf-silence-format-warnings-gcc8.patch new file mode 100644 index 0000000..be9f57a --- /dev/null +++ b/perf-silence-format-warnings-gcc8.patch @@ -0,0 +1,19 @@ +perf: Silence two kinds of format warnings from GCC 8 + +perf may be fixed properly in the newer kernel versions but for now, it is +easier to just silence -Werror=format-overflow and -Werror=format-truncation. +--- + +diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config +index 3ec1969b6d3e..3d924b43db4f 100644 +--- a/tools/perf/Makefile.config ++++ b/tools/perf/Makefile.config +@@ -203,6 +203,7 @@ CFLAGS += -funwind-tables + CFLAGS += -Wall + CFLAGS += -Wextra + CFLAGS += -std=gnu99 ++CFLAGS += -Wno-format-truncation -Wno-format-overflow + + CXXFLAGS += -std=gnu++11 -fno-exceptions -fno-rtti + CXXFLAGS += -Wall +--