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

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