summarylogtreecommitdiffstats
path: root/Workaround-for-format-security.patch
blob: 38f2f14d746bfd03d2eeb819b7108d723eef0785 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 68cc2334bce1dee833a5a42d95a3b66d63fb0b51 Mon Sep 17 00:00:00 2001
From: Joey Dumont <joey.dumont@gmail.com>
Date: Tue, 1 Jun 2021 06:52:21 -0400
Subject: [PATCH] Workaround for Werror=format-security.

---
 gcc/configure    | 2 +-
 gcc/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/configure b/gcc/configure
index 55b84b942..319219398 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -6635,7 +6635,7 @@ else
 fi
 
 if test $enable_build_format_warnings = no; then :
-  wf_opt=-Wno-format
+  wf_opt=-Wno-format -Wno-format-security
 else
   wf_opt=
 fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 4bda5318c..81f883d67 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -478,7 +478,7 @@ AC_ARG_ENABLE(build-format-warnings,
   AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
   [],[enable_build_format_warnings=yes])
 AS_IF([test $enable_build_format_warnings = no],
-      [wf_opt=-Wno-format],[wf_opt=])
+      [wf_opt=-Wno-format -Wno-format-security],[wf_opt=])
 ACX_PROG_CXX_WARNING_OPTS(
 	m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual $wf_opt])), [loose_warn])
 ACX_PROG_CC_WARNING_OPTS(
-- 
2.31.1