All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Raise the minimum GCC version to 5.2
@ 2021-05-01 15:15 ` Masahiro Yamada
  0 siblings, 0 replies; 146+ messages in thread
From: Masahiro Yamada @ 2021-05-01 15:15 UTC (permalink / raw)
  To: linux-kernel, Linus Torvalds
  Cc: linux-kbuild, Arnd Bergmann, Greg Kroah-Hartman, Will Deacon,
	Miguel Ojeda, Catalin Marinas, Masahiro Yamada, Albert Ou,
	Benjamin Herrenschmidt, Jonathan Corbet, Michael Ellerman,
	Palmer Dabbelt, Paul Mackerras, Paul Walmsley, linux-arm-kernel,
	linux-doc, linux-riscv, linuxppc-dev

The current minimum GCC version is 4.9 except ARCH=arm64 requiring
GCC 5.1.

When we discussed last time, we agreed to raise the minimum GCC version
to 5.1 globally. [1]

I'd like to propose GCC 5.2 to clean up arch/powerpc/Kconfig as well.

This commit updates the minimum versions in scripts/min-tool-version.sh
and Documentation/process/changes.rst with trivial code cleanups.

More cleanups will be possible as follow-up patches, but this one must
be agreed and applied to the mainline first.

[1]: https://lore.kernel.org/lkml/CAHk-=wjHTpG+gMx9vqrZgo8Uw0NqA2kNjS87o63Zv3=WG2K3zA@mail.gmail.com/

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

I'd like Linus to pick up this patch
if there is no objection.


 Documentation/process/changes.rst | 2 +-
 arch/arm64/Kconfig                | 2 +-
 arch/powerpc/Kconfig              | 2 +-
 arch/riscv/Kconfig                | 2 +-
 include/linux/compiler-gcc.h      | 6 +-----
 lib/Kconfig.debug                 | 2 +-
 scripts/min-tool-version.sh       | 8 +-------
 7 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index dac17711dc11..cf104a8d1850 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -29,7 +29,7 @@ you probably needn't concern yourself with pcmciautils.
 ====================== ===============  ========================================
         Program        Minimal version       Command to check the version
 ====================== ===============  ========================================
-GNU C                  4.9              gcc --version
+GNU C                  5.2              gcc --version
 Clang/LLVM (optional)  10.0.1           clang --version
 GNU make               3.81             make --version
 binutils               2.23             ld -v
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7f2a80091337..fae9514dabab 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -78,7 +78,7 @@ config ARM64
 	select ARCH_SUPPORTS_LTO_CLANG_THIN
 	select ARCH_SUPPORTS_CFI_CLANG
 	select ARCH_SUPPORTS_ATOMIC_RMW
-	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && (GCC_VERSION >= 50000 || CC_IS_CLANG)
+	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
 	select ARCH_SUPPORTS_NUMA_BALANCING
 	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
 	select ARCH_WANT_DEFAULT_BPF_JIT
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1e6230bea09d..10dc47eac122 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -212,7 +212,7 @@ config PPC
 	select HAVE_FUNCTION_ERROR_INJECTION
 	select HAVE_FUNCTION_GRAPH_TRACER
 	select HAVE_FUNCTION_TRACER
-	select HAVE_GCC_PLUGINS			if GCC_VERSION >= 50200   # plugin support on gcc <= 5.1 is buggy on PPC
+	select HAVE_GCC_PLUGINS
 	select HAVE_GENERIC_VDSO
 	select HAVE_HW_BREAKPOINT		if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
 	select HAVE_IDE
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 4515a10c5d22..748a5b37a0e5 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -226,7 +226,7 @@ config ARCH_RV32I
 config ARCH_RV64I
 	bool "RV64I"
 	select 64BIT
-	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000
+	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && CC_IS_GCC
 	select HAVE_DYNAMIC_FTRACE if MMU
 	select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
 	select HAVE_FTRACE_MCOUNT_RECORD
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 5d97ef738a57..3608189dfc29 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -98,10 +98,8 @@
 
 #if GCC_VERSION >= 70000
 #define KASAN_ABI_VERSION 5
-#elif GCC_VERSION >= 50000
+#else
 #define KASAN_ABI_VERSION 4
-#elif GCC_VERSION >= 40902
-#define KASAN_ABI_VERSION 3
 #endif
 
 #if __has_attribute(__no_sanitize_address__)
@@ -122,9 +120,7 @@
 #define __no_sanitize_undefined
 #endif
 
-#if GCC_VERSION >= 50100
 #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
-#endif
 
 /*
  * Turn individual warnings and errors on and off locally, depending
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 678c13967580..0d0ed298905d 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -284,7 +284,7 @@ config DEBUG_INFO_DWARF4
 
 config DEBUG_INFO_DWARF5
 	bool "Generate DWARF Version 5 debuginfo"
-	depends on GCC_VERSION >= 50000 || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502)))
+	depends on CC_IS_GCC || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502)))
 	depends on !DEBUG_INFO_BTF
 	help
 	  Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh
index d22cf91212b0..d5d0d26b8e7d 100755
--- a/scripts/min-tool-version.sh
+++ b/scripts/min-tool-version.sh
@@ -17,13 +17,7 @@ binutils)
 	echo 2.23.0
 	;;
 gcc)
-	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293
-	# https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk
-	if [ "$SRCARCH" = arm64 ]; then
-		echo 5.1.0
-	else
-		echo 4.9.0
-	fi
+	echo 5.2.0
 	;;
 icc)
 	# temporary
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 146+ messages in thread

end of thread, other threads:[~2021-05-15  7:29 UTC | newest]

Thread overview: 146+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 15:15 [PATCH] Raise the minimum GCC version to 5.2 Masahiro Yamada
2021-05-01 15:15 ` Masahiro Yamada
2021-05-01 15:15 ` Masahiro Yamada
2021-05-01 15:15 ` Masahiro Yamada
2021-05-01 15:52 ` Miguel Ojeda
2021-05-01 15:52   ` Miguel Ojeda
2021-05-01 15:52   ` Miguel Ojeda
2021-05-01 15:52   ` Miguel Ojeda
2021-05-01 17:38   ` Christophe Leroy
2021-05-01 17:38     ` Christophe Leroy
2021-05-01 17:38     ` Christophe Leroy
2021-05-01 17:38     ` Christophe Leroy
2021-05-02  2:41   ` Joe Perches
2021-05-02  2:41     ` Joe Perches
2021-05-02  2:41     ` Joe Perches
2021-05-02  2:41     ` Joe Perches
2021-05-02 18:30     ` Segher Boessenkool
2021-05-02 18:30       ` Segher Boessenkool
2021-05-02 18:30       ` Segher Boessenkool
2021-05-02 18:30       ` Segher Boessenkool
2021-05-02 20:00       ` Joe Perches
2021-05-02 20:00         ` Joe Perches
2021-05-02 20:00         ` Joe Perches
2021-05-02 20:00         ` Joe Perches
2021-05-02 20:32         ` Segher Boessenkool
2021-05-02 20:32           ` Segher Boessenkool
2021-05-02 20:32           ` Segher Boessenkool
2021-05-02 20:32           ` Segher Boessenkool
2021-05-02 21:05           ` Ali Kaasinen
2021-05-02 21:05             ` Ali Kaasinen
2021-05-02 21:05             ` Ali Kaasinen
2021-05-02 21:05             ` Ali Kaasinen
2021-05-02 21:08           ` Linus Torvalds
2021-05-02 21:08             ` Linus Torvalds
2021-05-02 21:08             ` Linus Torvalds
2021-05-02 21:08             ` Linus Torvalds
2021-05-02 22:30             ` Matthew Wilcox
2021-05-02 22:30               ` Matthew Wilcox
2021-05-02 22:30               ` Matthew Wilcox
2021-05-02 22:30               ` Matthew Wilcox
2021-05-03  7:34               ` Alexander Dahl
2021-05-03  7:34                 ` Alexander Dahl
2021-05-03  7:34                 ` Alexander Dahl
2021-05-03  7:34                 ` Alexander Dahl
2021-05-03  8:54                 ` Joe Perches
2021-05-03  8:54                   ` Joe Perches
2021-05-03  8:54                   ` Joe Perches
2021-05-03  8:54                   ` Joe Perches
2021-05-03  9:25                 ` Arnd Bergmann
2021-05-03  9:25                   ` Arnd Bergmann
2021-05-03  9:25                   ` Arnd Bergmann
2021-05-03  9:25                   ` Arnd Bergmann
2021-05-03 12:20                   ` David Laight
2021-05-03 12:20                     ` David Laight
2021-05-03 12:20                     ` David Laight
2021-05-03 13:10                     ` Miguel Ojeda
2021-05-03 13:10                       ` Miguel Ojeda
2021-05-03 13:10                       ` Miguel Ojeda
2021-05-03 13:10                       ` Miguel Ojeda
2021-05-04  5:30                   ` Alexander Dahl
2021-05-04  5:30                     ` Alexander Dahl
2021-05-04  5:30                     ` Alexander Dahl
2021-05-04  5:30                     ` Alexander Dahl
2021-05-04  6:33                     ` Christophe Leroy
2021-05-04  6:33                       ` Christophe Leroy
2021-05-04  6:33                       ` Christophe Leroy
2021-05-04 12:07                     ` Arnd Bergmann
2021-05-04 12:07                       ` Arnd Bergmann
2021-05-04 12:07                       ` Arnd Bergmann
2021-05-04 12:07                       ` Arnd Bergmann
2021-05-04 13:25                   ` Andy Shevchenko
2021-05-04 13:25                     ` Andy Shevchenko
2021-05-04 13:25                     ` Andy Shevchenko
2021-05-04 13:25                     ` Andy Shevchenko
2021-05-03 11:35               ` Arnd Bergmann
2021-05-03 11:35                 ` Arnd Bergmann
2021-05-03 11:35                 ` Arnd Bergmann
2021-05-03 11:35                 ` Arnd Bergmann
2021-05-03  9:49             ` Kirill A. Shutemov
2021-05-03  9:49               ` Kirill A. Shutemov
2021-05-03  9:49               ` Kirill A. Shutemov
2021-05-03  9:49               ` Kirill A. Shutemov
2021-05-02 21:23           ` Joe Perches
2021-05-02 21:23             ` Joe Perches
2021-05-02 21:23             ` Joe Perches
2021-05-02 21:23             ` Joe Perches
2021-05-03  0:44             ` Segher Boessenkool
2021-05-03  0:44               ` Segher Boessenkool
2021-05-03  0:44               ` Segher Boessenkool
2021-05-03  0:44               ` Segher Boessenkool
2021-05-03  9:57               ` Arnd Bergmann
2021-05-03  9:57                 ` Arnd Bergmann
2021-05-03  9:57                 ` Arnd Bergmann
2021-05-03  9:57                 ` Arnd Bergmann
2021-05-04  7:56     ` Ben Dooks
2021-05-04  7:56       ` Ben Dooks
2021-05-04  7:56       ` Ben Dooks
2021-05-04  7:56       ` Ben Dooks
2021-05-04  8:38       ` Miguel Ojeda
2021-05-04  8:38         ` Miguel Ojeda
2021-05-04  8:38         ` Miguel Ojeda
2021-05-04  8:38         ` Miguel Ojeda
2021-05-04  9:22         ` Michal Suchánek
2021-05-04  9:22           ` Michal Suchánek
2021-05-04  9:22           ` Michal Suchánek
2021-05-04  9:22           ` Michal Suchánek
2021-05-04 12:09           ` Miguel Ojeda
2021-05-04 12:09             ` Miguel Ojeda
2021-05-04 12:09             ` Miguel Ojeda
2021-05-04 12:09             ` Miguel Ojeda
2021-05-04 12:17             ` Michal Suchánek
2021-05-04 12:17               ` Michal Suchánek
2021-05-04 12:17               ` Michal Suchánek
2021-05-04 12:17               ` Michal Suchánek
2021-05-04 12:26               ` Christophe Leroy
2021-05-04 12:26                 ` Christophe Leroy
2021-05-04 12:26                 ` Christophe Leroy
2021-05-04 12:26                 ` Christophe Leroy
2021-05-02 18:37 ` Segher Boessenkool
2021-05-02 18:37   ` Segher Boessenkool
2021-05-02 18:37   ` Segher Boessenkool
2021-05-02 18:37   ` Segher Boessenkool
2021-05-03  6:16 ` Christophe Leroy
2021-05-03  6:16   ` Christophe Leroy
2021-05-03  6:16   ` Christophe Leroy
2021-05-03  6:16   ` Christophe Leroy
2021-05-04  2:13   ` Masahiro Yamada
2021-05-04  2:13     ` Masahiro Yamada
2021-05-04  2:13     ` Masahiro Yamada
2021-05-04  2:13     ` Masahiro Yamada
2021-05-04 13:18   ` Andy Shevchenko
2021-05-04 13:18     ` Andy Shevchenko
2021-05-04 13:18     ` Andy Shevchenko
2021-05-04 13:18     ` Andy Shevchenko
2021-05-03 12:27 ` David Sterba
2021-05-03 12:27   ` David Sterba
2021-05-03 12:27   ` David Sterba
2021-05-03 12:27   ` David Sterba
2021-05-15  7:14 ` Pavel Machek
2021-05-15  7:14   ` Pavel Machek
2021-05-15  7:14   ` Pavel Machek
2021-05-15  7:14   ` Pavel Machek
2021-05-15  7:27   ` Joe Perches
2021-05-15  7:27     ` Joe Perches
2021-05-15  7:27     ` Joe Perches
2021-05-15  7:27     ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.