aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/stackleak_plugin.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-12-02 22:49:29 +0900
committerKees Cook <keescook@chromium.org>2020-12-04 14:09:41 -0800
commitaf2d22254e8ee4558d3803372735c0b4f6046cd2 (patch)
treeb9644c9f4aaf14ec391b781fa37555800145986a /scripts/gcc-plugins/stackleak_plugin.c
parentLinux 5.10-rc6 (diff)
downloadlinux-dev-af2d22254e8ee4558d3803372735c0b4f6046cd2.tar.xz
linux-dev-af2d22254e8ee4558d3803372735c0b4f6046cd2.zip
gcc-plugins: remove code for GCC versions older than 4.9
Documentation/process/changes.rst says the minimal GCC version is 4.9. Hence, BUILDING_GCC_VERSION is greater than or equal to 4009. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20201202134929.99883-1-masahiroy@kernel.org
Diffstat (limited to 'scripts/gcc-plugins/stackleak_plugin.c')
-rw-r--r--scripts/gcc-plugins/stackleak_plugin.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/gcc-plugins/stackleak_plugin.c b/scripts/gcc-plugins/stackleak_plugin.c
index 48e141e07956..e9db7dcb3e5f 100644
--- a/scripts/gcc-plugins/stackleak_plugin.c
+++ b/scripts/gcc-plugins/stackleak_plugin.c
@@ -80,10 +80,8 @@ static bool is_alloca(gimple stmt)
if (gimple_call_builtin_p(stmt, BUILT_IN_ALLOCA))
return true;
-#if BUILDING_GCC_VERSION >= 4007
if (gimple_call_builtin_p(stmt, BUILT_IN_ALLOCA_WITH_ALIGN))
return true;
-#endif
return false;
}
@@ -322,7 +320,7 @@ static void remove_stack_tracking_gcall(void)
/* Delete the stackleak_track_stack() call */
delete_insn_and_edges(insn);
-#if BUILDING_GCC_VERSION >= 4007 && BUILDING_GCC_VERSION < 8000
+#if BUILDING_GCC_VERSION < 8000
if (GET_CODE(next) == NOTE &&
NOTE_KIND(next) == NOTE_INSN_CALL_ARG_LOCATION) {
insn = next;