1
0
Fork 0
mirror of https://gitlab.postmarketos.org/postmarketOS/pmaports.git synced 2025-07-23 23:05:10 +03:00
pmaports/cross/gcc-x86/0006-Enable-Wformat-and-Wformat-security-by-default.patch
Oliver Smith d4c110d809
cross/gcc-*: upgrade to 14.3.0-r1
Done with pmb MR 2521. I've verified that gcc-aarch64 builds and the
following packages can be cross compiled from aarch64 to x86_64:

* hello-world
* iskey
* pbsplash
* gcc-x86_64

Related: https://gitlab.postmarketos.org/postmarketOS/continuous-testing/upstream-compat/-/blob/master/docs/how-to-fix-upstream-compat-errors.md#gcc-

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6587
[ci:skip-build]: already built successfully in CI
2025-06-01 15:09:21 +02:00

29 lines
1.3 KiB
Diff

From bb25e8489384504cd59e4a2538720863da1fb29c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:47:43 +0000
Subject: [PATCH 06/35] Enable -Wformat and -Wformat-security by default.
---
gcc/c-family/c.opt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -774,7 +774,7 @@ Warn about function calls with format strings that write past the end
of the destination region.
Wformat-security
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
Warn about possible security problems with format functions.
Wformat-signedness
@@ -799,7 +799,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
Warn about zero-length formats.
Wformat=
-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
Warn about printf/scanf/strftime/strfmon format string anomalies.
Wframe-address