Blame SOURCES/gcc12-Wno-format-security.patch

53dace
2022-01-07  Jakub Jelinek  <jakub@redhat.com>
53dace
53dace
	* Makefile.tpl (GOCFLAGS, GDCFLAGS): Filter out -Wformat-security.
53dace
	* Makefile.in: Regenerated.
53dace
53dace
2017-02-25  Jakub Jelinek  <jakub@redhat.com>
53dace
53dace
	* configure.ac: When adding -Wno-format, also add -Wno-format-security.
53dace
	* configure: Regenerated.
53dace
53dace
--- gcc/configure.ac.jj	2017-02-13 12:20:53.000000000 +0100
53dace
+++ gcc/configure.ac	2017-02-25 12:42:32.859175403 +0100
53dace
@@ -570,7 +570,7 @@ AC_ARG_ENABLE(build-format-warnings,
53dace
   AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
53dace
   [],[enable_build_format_warnings=yes])
53dace
 AS_IF([test $enable_build_format_warnings = no],
53dace
-      [wf_opt=-Wno-format],[wf_opt=])
53dace
+      [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
53dace
 ACX_PROG_CXX_WARNING_OPTS(
53dace
 	m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
53dace
 		       [-Wcast-qual $wf_opt])),
53dace
--- gcc/configure.jj	2017-02-13 12:20:52.000000000 +0100
53dace
+++ gcc/configure	2017-02-25 12:42:50.041946391 +0100
53dace
@@ -7077,7 +7077,7 @@ else
53dace
 fi
53dace
 
53dace
 if test $enable_build_format_warnings = no; then :
53dace
-  wf_opt=-Wno-format
53dace
+  wf_opt="-Wno-format -Wno-format-security"
53dace
 else
53dace
   wf_opt=
53dace
 fi
53dace
--- Makefile.tpl.jj	2021-12-30 15:12:42.188164847 +0100
53dace
+++ Makefile.tpl	2022-01-07 12:06:12.115550714 +0100
53dace
@@ -447,8 +447,8 @@ LDFLAGS = @LDFLAGS@
53dace
 LIBCFLAGS = $(CFLAGS)
53dace
 CXXFLAGS = @CXXFLAGS@
53dace
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
53dace
-GOCFLAGS = $(CFLAGS)
53dace
-GDCFLAGS = $(CFLAGS)
53dace
+GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
53dace
+GDCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
53dace
 
53dace
 # Pass additional PGO and LTO compiler options to the PGO build.
53dace
 BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS)
53dace
--- Makefile.in.jj	2021-12-30 15:12:42.188164847 +0100
53dace
+++ Makefile.in	2022-01-07 12:06:27.335334561 +0100
53dace
@@ -444,8 +444,8 @@ LDFLAGS = @LDFLAGS@
53dace
 LIBCFLAGS = $(CFLAGS)
53dace
 CXXFLAGS = @CXXFLAGS@
53dace
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
53dace
-GOCFLAGS = $(CFLAGS)
53dace
-GDCFLAGS = $(CFLAGS)
53dace
+GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
53dace
+GDCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
53dace
 
53dace
 # Pass additional PGO and LTO compiler options to the PGO build.
53dace
 BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS)