Linux Hardening
 help / color / mirror / Atom feed
* [PATCH 4.19 01/33] gcc-plugins: Rename last_stmt() for GCC 14+
       [not found] <20240725142728.511303502@linuxfoundation.org>
@ 2024-07-25 14:36 ` Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2024-07-25 14:36 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, patches, linux-hardening, Kees Cook,
	Thomas Meyer

4.19-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kees Cook <keescook@chromium.org>

commit 2e3f65ccfe6b0778b261ad69c9603ae85f210334 upstream.

In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a helper
macro to handle the renaming.

Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 scripts/gcc-plugins/gcc-common.h |    4 ++++
 1 file changed, 4 insertions(+)

--- a/scripts/gcc-plugins/gcc-common.h
+++ b/scripts/gcc-plugins/gcc-common.h
@@ -977,4 +977,8 @@ static inline void debug_gimple_stmt(con
 #define SET_DECL_MODE(decl, mode)	DECL_MODE(decl) = (mode)
 #endif
 
+#if BUILDING_GCC_VERSION >= 14000
+#define last_stmt(x)			last_nondebug_stmt(x)
+#endif
+
 #endif



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-25 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240725142728.511303502@linuxfoundation.org>
2024-07-25 14:36 ` [PATCH 4.19 01/33] gcc-plugins: Rename last_stmt() for GCC 14+ Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox