[PATCH] gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement

Thorsten Blum posted 1 patch 1 month, 2 weeks ago
scripts/gcc-plugins/randomize_layout_plugin.c | 4 ----
1 file changed, 4 deletions(-)
[PATCH] gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement
Posted by Thorsten Blum 1 month, 2 weeks ago
Since the kernel currently requires GCC 5.1 as a minimum, remove the
unnecessary GCC version >= 4.7 check.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 scripts/gcc-plugins/randomize_layout_plugin.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/scripts/gcc-plugins/randomize_layout_plugin.c b/scripts/gcc-plugins/randomize_layout_plugin.c
index 746ff2d272f2..5694df3da2e9 100644
--- a/scripts/gcc-plugins/randomize_layout_plugin.c
+++ b/scripts/gcc-plugins/randomize_layout_plugin.c
@@ -19,10 +19,6 @@
 #include "gcc-common.h"
 #include "randomize_layout_seed.h"
 
-#if BUILDING_GCC_MAJOR < 4 || (BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR < 7)
-#error "The RANDSTRUCT plugin requires GCC 4.7 or newer."
-#endif
-
 #define ORIG_TYPE_NAME(node) \
 	(TYPE_NAME(TYPE_MAIN_VARIANT(node)) != NULL_TREE ? ((const unsigned char *)IDENTIFIER_POINTER(TYPE_NAME(TYPE_MAIN_VARIANT(node)))) : (const unsigned char *)"anonymous")
 
-- 
2.45.2
Re: [PATCH] gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement
Posted by Kees Cook 1 month, 2 weeks ago
On Tue, 23 Jul 2024 18:53:31 +0200, Thorsten Blum wrote:
> Since the kernel currently requires GCC 5.1 as a minimum, remove the
> unnecessary GCC version >= 4.7 check.
> 
> 

Applied to for-linus/hardening, thanks!

[1/1] gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement
      https://git.kernel.org/kees/c/f3e65520c0b7

Take care,

-- 
Kees Cook