projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3d46e1
)
gcc-plugins: Rename last_stmt() for GCC 14+
author
Kees Cook
<keescook@chromium.org>
Mon, 7 Aug 2023 16:41:19 +0000
(09:41 -0700)
committer
Kees Cook
<keescook@chromium.org>
Fri, 11 Aug 2023 06:10:09 +0000
(23:10 -0700)
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>
scripts/gcc-plugins/gcc-common.h
patch
|
blob
|
history
diff --git
a/scripts/gcc-plugins/gcc-common.h
b/scripts/gcc-plugins/gcc-common.h
index 84c730da36dd3ff54027f6b449f82843b59c1dbb..1ae39b9f4a95effebba186e43ed2c9ce755a7f5f 100644
(file)
--- 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