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

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