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
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+6−6
@@ -30,7 +30,7 @@ config CRYPTO_SHA1_ARM_NEON · 29 unmodified lines
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 · 2 unmodified lines
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 · 50 unmodified lines
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 · 3 unmodified lines
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 · 5 unmodified lines
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+0−1
@@ -316,7 +316,6 @@ config CRYPTO_AEGIS128 · 315 unmodified lines
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+2−3
@@ -10,7 +10,8 @@ · 9 unmodified lines
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 @@ · 109 unmodified lines
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+0−1
@@ -1285,7 +1285,6 @@ config LD_DEAD_CODE_DATA_ELIMINATION · 1284 unmodified lines
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+1−1
@@ -8,7 +8,7 @@ config HAVE_GCC_PLUGINS · 7 unmodified lines
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

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