diff options
| author | Kees Cook <keescook@chromium.org> | 2023-08-07 19:41:19 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-25 10:49:07 +0300 |
| commit | aa2a5eeb7602366f5c858e948fdbc403d9f27802 (patch) | |
| tree | 8225625acbf2ebf611bb6609d85bebd7d83465eb /scripts | |
| parent | d7eda72e59bbf3ed592db7ff0fd8c246c73149a8 (diff) | |
| download | linux-aa2a5eeb7602366f5c858e948fdbc403d9f27802.tar.xz | |
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 84c730da36dd..1ae39b9f4a95 100644 --- a/scripts/gcc-plugins/gcc-common.h +++ b/scripts/gcc-plugins/gcc-common.h @@ -440,4 +440,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 |
