Skip to content

Commit 5429ef6

Browse files
committed
compiler/gcc: Raise minimum GCC version for kernel builds to 4.8
It is very rare to see versions of GCC prior to 4.8 being used to build the mainline kernel. These old compilers are also know to have codegen issues which can lead to silent miscompilation: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 Raise the minimum GCC version for kernel build to 4.8 and remove some tautological Kconfig dependencies as a consequence. Cc: Masahiro Yamada <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 8f3d9f3 commit 5429ef6

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

Documentation/process/changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ you probably needn't concern yourself with pcmciautils.
2929
====================== =============== ========================================
3030
Program Minimal version Command to check the version
3131
====================== =============== ========================================
32-
GNU C 4.6 gcc --version
32+
GNU C 4.8 gcc --version
3333
GNU make 3.81 make --version
3434
binutils 2.23 ld -v
3535
flex 2.5.35 flex --version

arch/arm/crypto/Kconfig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ config CRYPTO_SHA1_ARM_NEON
3030

3131
config CRYPTO_SHA1_ARM_CE
3232
tristate "SHA1 digest algorithm (ARM v8 Crypto Extensions)"
33-
depends on KERNEL_MODE_NEON && (CC_IS_CLANG || GCC_VERSION >= 40800)
33+
depends on KERNEL_MODE_NEON
3434
select CRYPTO_SHA1_ARM
3535
select CRYPTO_HASH
3636
help
@@ -39,7 +39,7 @@ config CRYPTO_SHA1_ARM_CE
3939

4040
config CRYPTO_SHA2_ARM_CE
4141
tristate "SHA-224/256 digest algorithm (ARM v8 Crypto Extensions)"
42-
depends on KERNEL_MODE_NEON && (CC_IS_CLANG || GCC_VERSION >= 40800)
42+
depends on KERNEL_MODE_NEON
4343
select CRYPTO_SHA256_ARM
4444
select CRYPTO_HASH
4545
help
@@ -96,7 +96,7 @@ config CRYPTO_AES_ARM_BS
9696

9797
config CRYPTO_AES_ARM_CE
9898
tristate "Accelerated AES using ARMv8 Crypto Extensions"
99-
depends on KERNEL_MODE_NEON && (CC_IS_CLANG || GCC_VERSION >= 40800)
99+
depends on KERNEL_MODE_NEON
100100
select CRYPTO_SKCIPHER
101101
select CRYPTO_LIB_AES
102102
select CRYPTO_SIMD
@@ -106,7 +106,7 @@ config CRYPTO_AES_ARM_CE
106106

107107
config CRYPTO_GHASH_ARM_CE
108108
tristate "PMULL-accelerated GHASH using NEON/ARMv8 Crypto Extensions"
109-
depends on KERNEL_MODE_NEON && (CC_IS_CLANG || GCC_VERSION >= 40800)
109+
depends on KERNEL_MODE_NEON
110110
select CRYPTO_HASH
111111
select CRYPTO_CRYPTD
112112
select CRYPTO_GF128MUL
@@ -118,13 +118,13 @@ config CRYPTO_GHASH_ARM_CE
118118

119119
config CRYPTO_CRCT10DIF_ARM_CE
120120
tristate "CRCT10DIF digest algorithm using PMULL instructions"
121-
depends on KERNEL_MODE_NEON && (CC_IS_CLANG || GCC_VERSION >= 40800)
121+
depends on KERNEL_MODE_NEON
122122
depends on CRC_T10DIF
123123
select CRYPTO_HASH
124124

125125
config CRYPTO_CRC32_ARM_CE
126126
tristate "CRC32(C) digest algorithm using CRC and/or PMULL instructions"
127-
depends on KERNEL_MODE_NEON && (CC_IS_CLANG || GCC_VERSION >= 40800)
127+
depends on KERNEL_MODE_NEON
128128
depends on CRC32
129129
select CRYPTO_HASH
130130

crypto/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ config CRYPTO_AEGIS128
316316
config CRYPTO_AEGIS128_SIMD
317317
bool "Support SIMD acceleration for AEGIS-128"
318318
depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
319-
depends on !ARM || CC_IS_CLANG || GCC_VERSION >= 40800
320319
default y
321320

322321
config CRYPTO_AEGIS128_AESNI_SSE2

include/linux/compiler-gcc.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
+ __GNUC_MINOR__ * 100 \
1111
+ __GNUC_PATCHLEVEL__)
1212

13-
#if GCC_VERSION < 40600
13+
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */
14+
#if GCC_VERSION < 40800
1415
# error Sorry, your compiler is too old - please upgrade it.
1516
#endif
1617

@@ -126,9 +127,7 @@
126127
#if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__)
127128
#define __HAVE_BUILTIN_BSWAP32__
128129
#define __HAVE_BUILTIN_BSWAP64__
129-
#if GCC_VERSION >= 40800
130130
#define __HAVE_BUILTIN_BSWAP16__
131-
#endif
132131
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */
133132

134133
#if GCC_VERSION >= 70000

init/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,6 @@ config LD_DEAD_CODE_DATA_ELIMINATION
12851285
bool "Dead code and data elimination (EXPERIMENTAL)"
12861286
depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
12871287
depends on EXPERT
1288-
depends on !(FUNCTION_TRACER && CC_IS_GCC && GCC_VERSION < 40800)
12891288
depends on $(cc-option,-ffunction-sections -fdata-sections)
12901289
depends on $(ld-option,--gc-sections)
12911290
help

scripts/gcc-plugins/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ config HAVE_GCC_PLUGINS
88
menuconfig GCC_PLUGINS
99
bool "GCC plugins"
1010
depends on HAVE_GCC_PLUGINS
11-
depends on CC_IS_GCC && GCC_VERSION >= 40800
11+
depends on CC_IS_GCC
1212
depends on $(success,$(srctree)/scripts/gcc-plugin.sh $(CC))
1313
default y
1414
help

0 commit comments

Comments
 (0)