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

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