History

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.

Will Deacon committed 6 years ago

Commit 5429ef61 parent 8f3d9f36 files · +10 −13Browse files

Unified · Split

6 files
  1. Documentation/process/changes.rst +1 −1
  2. arch/arm/crypto/Kconfig +6 −6
  3. crypto/Kconfig +0 −1
  4. include/linux/compiler-gcc.h +2 −3
  5. init/Kconfig +0 −1
  6. scripts/gcc-plugins/Kconfig +1 −1
Documentation/process/changes.rst+1−1
@@ -29,7 +29,7 @@ you probably needn't concern yourself with pcmciautils. · 28 unmodified lines
29====================== =============== ========================================29====================== =============== ========================================
30 Program Minimal version Command to check the version30 Program Minimal version Command to check the version
31====================== =============== ========================================31====================== =============== ========================================
32GNU C 4.6 gcc --version32GNU C 4.8 gcc --version
33GNU make 3.81 make --version33GNU make 3.81 make --version
34binutils 2.23 ld -v34binutils 2.23 ld -v
35flex 2.5.35 flex --version35flex 2.5.35 flex --version
arch/arm/crypto/Kconfig+6−6
@@ -30,7 +30,7 @@ config CRYPTO_SHA1_ARM_NEON · 29 unmodified lines
30 30
31config CRYPTO_SHA1_ARM_CE31config CRYPTO_SHA1_ARM_CE
32 tristate "SHA1 digest algorithm (ARM v8 Crypto Extensions)"32 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
34 select CRYPTO_SHA1_ARM34 select CRYPTO_SHA1_ARM
35 select CRYPTO_HASH35 select CRYPTO_HASH
36 help36 help
@@ -39,7 +39,7 @@ config CRYPTO_SHA1_ARM_CE · 2 unmodified lines
39 39
40config CRYPTO_SHA2_ARM_CE40config CRYPTO_SHA2_ARM_CE
41 tristate "SHA-224/256 digest algorithm (ARM v8 Crypto Extensions)"41 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
43 select CRYPTO_SHA256_ARM43 select CRYPTO_SHA256_ARM
44 select CRYPTO_HASH44 select CRYPTO_HASH
45 help45 help
@@ -96,7 +96,7 @@ config CRYPTO_AES_ARM_BS · 50 unmodified lines
96 96
97config CRYPTO_AES_ARM_CE97config CRYPTO_AES_ARM_CE
98 tristate "Accelerated AES using ARMv8 Crypto Extensions"98 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
100 select CRYPTO_SKCIPHER100 select CRYPTO_SKCIPHER
101 select CRYPTO_LIB_AES101 select CRYPTO_LIB_AES
102 select CRYPTO_SIMD102 select CRYPTO_SIMD
@@ -106,7 +106,7 @@ config CRYPTO_AES_ARM_CE · 3 unmodified lines
106 106
107config CRYPTO_GHASH_ARM_CE107config CRYPTO_GHASH_ARM_CE
108 tristate "PMULL-accelerated GHASH using NEON/ARMv8 Crypto Extensions"108 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
110 select CRYPTO_HASH110 select CRYPTO_HASH
111 select CRYPTO_CRYPTD111 select CRYPTO_CRYPTD
112 select CRYPTO_GF128MUL112 select CRYPTO_GF128MUL
@@ -118,13 +118,13 @@ config CRYPTO_GHASH_ARM_CE · 5 unmodified lines
118 118
119config CRYPTO_CRCT10DIF_ARM_CE119config CRYPTO_CRCT10DIF_ARM_CE
120 tristate "CRCT10DIF digest algorithm using PMULL instructions"120 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
122 depends on CRC_T10DIF122 depends on CRC_T10DIF
123 select CRYPTO_HASH123 select CRYPTO_HASH
124 124
125config CRYPTO_CRC32_ARM_CE125config CRYPTO_CRC32_ARM_CE
126 tristate "CRC32(C) digest algorithm using CRC and/or PMULL instructions"126 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
128 depends on CRC32128 depends on CRC32
129 select CRYPTO_HASH129 select CRYPTO_HASH
130 130
crypto/Kconfig+0−1
@@ -316,7 +316,6 @@ config CRYPTO_AEGIS128 · 315 unmodified lines
316config CRYPTO_AEGIS128_SIMD316config CRYPTO_AEGIS128_SIMD
317 bool "Support SIMD acceleration for AEGIS-128"317 bool "Support SIMD acceleration for AEGIS-128"
318 depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)318 depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
319 depends on !ARM || CC_IS_CLANG || GCC_VERSION >= 40800
320 default y319 default y
321 320
322config CRYPTO_AEGIS128_AESNI_SSE2321config CRYPTO_AEGIS128_AESNI_SSE2
include/linux/compiler-gcc.h+2−3
@@ -10,7 +10,8 @@ · 9 unmodified lines
10 + __GNUC_MINOR__ * 100 \10 + __GNUC_MINOR__ * 100 \
11 + __GNUC_PATCHLEVEL__)11 + __GNUC_PATCHLEVEL__)
12 12
13#if GCC_VERSION < 4060013/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */
14#if GCC_VERSION < 40800
14# error Sorry, your compiler is too old - please upgrade it.15# error Sorry, your compiler is too old - please upgrade it.
15#endif16#endif
16 17
@@ -126,9 +127,7 @@ · 109 unmodified lines
126#if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__)127#if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__)
127#define __HAVE_BUILTIN_BSWAP32__128#define __HAVE_BUILTIN_BSWAP32__
128#define __HAVE_BUILTIN_BSWAP64__129#define __HAVE_BUILTIN_BSWAP64__
129#if GCC_VERSION >= 40800
130#define __HAVE_BUILTIN_BSWAP16__130#define __HAVE_BUILTIN_BSWAP16__
131#endif
132#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */131#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */
133 132
134#if GCC_VERSION >= 70000133#if GCC_VERSION >= 70000
init/Kconfig+0−1
@@ -1285,7 +1285,6 @@ config LD_DEAD_CODE_DATA_ELIMINATION · 1284 unmodified lines
1285 bool "Dead code and data elimination (EXPERIMENTAL)"1285 bool "Dead code and data elimination (EXPERIMENTAL)"
1286 depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION1286 depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1287 depends on EXPERT1287 depends on EXPERT
1288 depends on !(FUNCTION_TRACER && CC_IS_GCC && GCC_VERSION < 40800)
1289 depends on $(cc-option,-ffunction-sections -fdata-sections)1288 depends on $(cc-option,-ffunction-sections -fdata-sections)
1290 depends on $(ld-option,--gc-sections)1289 depends on $(ld-option,--gc-sections)
1291 help1290 help
scripts/gcc-plugins/Kconfig+1−1
@@ -8,7 +8,7 @@ config HAVE_GCC_PLUGINS · 7 unmodified lines
8menuconfig GCC_PLUGINS8menuconfig GCC_PLUGINS
9 bool "GCC plugins"9 bool "GCC plugins"
10 depends on HAVE_GCC_PLUGINS10 depends on HAVE_GCC_PLUGINS
11 depends on CC_IS_GCC && GCC_VERSION >= 4080011 depends on CC_IS_GCC
12 depends on $(success,$(srctree)/scripts/gcc-plugin.sh $(CC))12 depends on $(success,$(srctree)/scripts/gcc-plugin.sh $(CC))
13 default y13 default y
14 help14 help

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t