Browse Source

toolchain/gcc: use version 7.x for x86 by default

This is needed for retpoline support, which mitigates the spectre
attacks.

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 7 năm trước cách đây
mục cha
commit
7a97588bc6

+ 1 - 0
toolchain/gcc/Config.in

@@ -3,6 +3,7 @@
 choice
 choice
 	prompt "GCC compiler Version" if TOOLCHAINOPTS
 	prompt "GCC compiler Version" if TOOLCHAINOPTS
 	default GCC_USE_VERSION_7_1_ARC if arc
 	default GCC_USE_VERSION_7_1_ARC if arc
+	default GCC_USE_VERSION_7 if x86_64 || i386
 	default GCC_USE_VERSION_5
 	default GCC_USE_VERSION_5
 	help
 	help
 	  Select the version of gcc you wish to use.
 	  Select the version of gcc you wish to use.

+ 6 - 1
toolchain/gcc/Config.version

@@ -2,9 +2,14 @@ config GCC_VERSION_7_1_ARC
 	default y if (!TOOLCHAINOPTS && arc)
 	default y if (!TOOLCHAINOPTS && arc)
 	bool
 	bool
 
 
+config GCC_VERSION_7
+	default y if GCC_USE_VERSION_7
+	default y if x86_64 || i386
+	bool
+
 config GCC_VERSION
 config GCC_VERSION
 	string
 	string
 	default "arc-2017.09-release"   if GCC_VERSION_7_1_ARC
 	default "arc-2017.09-release"   if GCC_VERSION_7_1_ARC
 	default "6.3.0"         if GCC_USE_VERSION_6
 	default "6.3.0"         if GCC_USE_VERSION_6
-	default "7.3.0"         if GCC_USE_VERSION_7
+	default "7.3.0"         if GCC_VERSION_7
 	default "5.5.0"
 	default "5.5.0"