summaryrefslogtreecommitdiff
path: root/util/crossgcc/patches/gcc-14.1.0_libcpp.patch
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2024-04-06 05:32:25 +0000
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2024-05-15 01:53:34 +0000
commitacdd8dd14d498834589d5e5bda6c9f3d5f5860d8 (patch)
tree0b15d221c6c46fda728b2550630f95e2d7aabf33 /util/crossgcc/patches/gcc-14.1.0_libcpp.patch
parente885aa5a05a24dc3bd3f1fffc0d55aa08ed43d5a (diff)
util/crossgcc: Update GCC from 13.2 to 14.1.0
Change-Id: Idf5912d1fcdfabab7fe006b7e0cd4ebd25c07d09 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81683 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/crossgcc/patches/gcc-14.1.0_libcpp.patch')
-rw-r--r--util/crossgcc/patches/gcc-14.1.0_libcpp.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/util/crossgcc/patches/gcc-14.1.0_libcpp.patch b/util/crossgcc/patches/gcc-14.1.0_libcpp.patch
new file mode 100644
index 0000000000..2b0c95338f
--- /dev/null
+++ b/util/crossgcc/patches/gcc-14.1.0_libcpp.patch
@@ -0,0 +1,56 @@
+GCC with `-Wformat-security -Werror=format-security` hardening options enabled
+by default rejects some codes in libcpp. This patch fixes them.
+
+--- gcc-8.3.0/libcpp/expr.cc.bak 2020-09-11 15:44:45.770000000 +0900
++++ gcc-8.3.0/libcpp/expr.cc 2020-09-11 15:46:22.370000000 +0900
+@@ -794,10 +794,10 @@
+
+ if (CPP_OPTION (pfile, c99))
+ cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
+- 0, message);
++ 0, "%s", message);
+ else
+ cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
+- virtual_location, 0, message);
++ virtual_location, 0, "%s", message);
+ }
+
+ result |= CPP_N_INTEGER;
+--- gcc-8.3.0/libcpp/macro.cc.bak 2020-09-11 16:01:42.550000000 +0900
++++ gcc-8.3.0/libcpp/macro.cc 2020-09-11 16:03:47.850000000 +0900
+@@ -160,7 +160,7 @@
+ if (m_state == 2 && token->type == CPP_PASTE)
+ {
+ cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc,
+- vaopt_paste_error);
++ "%s", vaopt_paste_error);
+ return ERROR;
+ }
+ /* Advance states before further considering this token, in
+@@ -189,7 +189,7 @@
+ if (was_paste)
+ {
+ cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc,
+- vaopt_paste_error);
++ "%s", vaopt_paste_error);
+ return ERROR;
+ }
+
+@@ -3361,7 +3361,7 @@
+ function-like macros, but not at the end. */
+ if (following_paste_op)
+ {
+- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
++ cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
+ goto out;
+ }
+ if (!vaopt_tracker.completed ())
+@@ -3374,7 +3374,7 @@
+ function-like macros, but not at the beginning. */
+ if (macro->count == 1)
+ {
+- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
++ cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
+ goto out;
+ }
+