diff options
| author | Kees Cook <keescook@chromium.org> | 2023-08-07 09:41:19 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-27 10:38:28 +0200 |
| commit | 69df3bdb274f9b8c1abf9c714440522bfb4a178b (patch) | |
| tree | 1516ee6126908a9d3264ed2a58a891ed8d76905a /scripts | |
| parent | 88d2aa8774917940baa0d7ea878abda493c6e785 (diff) | |
gcc-plugins: Rename last_stmt() for GCC 14+
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>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/gcc-plugins/gcc-common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h index 9ad76b7f3f10..0907ab19202a 100644 --- a/scripts/gcc-plugins/gcc-common.h +++ b/scripts/gcc-plugins/gcc-common.h @@ -977,4 +977,8 @@ static inline void debug_gimple_stmt(const_gimple s) #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 |
