From 73d135a695cf59eb8ab6aafb59bfd281a7400203 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 25 Jan 2022 00:01:02 +0100 Subject: [PATCH] arch/Config.in.x86: drastically simplify the BR2_ARCH definition The BR2_ARCH definition is like this: * i486 for the i486 platform * i586 for a small number of platforms * i686 for all other x86 platforms when used in 32-bit, but we enumerate their entire list * x86_64 for all x86 64-bit platforms The list for i686 is long and needs to be extended everytime a new platform is added, with no added value. So this commit simplifies that by replacing this long list with just: default "i686" if BR2_i386 This works because Kconfig guarantees us that if an i386 platform matches an earlier case (i486 or one of the i586 platforms), the i486 and i586 earlier in the list will match. Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- arch/Config.in.x86 | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/arch/Config.in.x86 b/arch/Config.in.x86 index 0ba9ecbcea..a330d72f1d 100644 --- a/arch/Config.in.x86 +++ b/arch/Config.in.x86 @@ -311,30 +311,12 @@ config BR2_ARCH default "i686" if BR2_x86_c32 default "i586" if BR2_x86_winchip_c6 default "i586" if BR2_x86_winchip2 - default "i686" if BR2_x86_i686 - default "i686" if BR2_x86_pentium2 - default "i686" if BR2_x86_pentium3 - default "i686" if BR2_x86_pentium4 - default "i686" if BR2_x86_pentium_m - default "i686" if BR2_x86_pentiumpro - default "i686" if BR2_x86_prescott - default "i686" if BR2_x86_nocona && BR2_i386 - default "i686" if BR2_x86_core2 && BR2_i386 - default "i686" if BR2_x86_corei7 && BR2_i386 - default "i686" if BR2_x86_westmere && BR2_i386 - default "i686" if BR2_x86_corei7_avx && BR2_i386 - default "i686" if BR2_x86_core_avx2 && BR2_i386 - default "i686" if BR2_x86_atom && BR2_i386 - default "i686" if BR2_x86_silvermont && BR2_i386 - default "i686" if BR2_x86_opteron && BR2_i386 - default "i686" if BR2_x86_opteron_sse3 && BR2_i386 - default "i686" if BR2_x86_barcelona && BR2_i386 - default "i686" if BR2_x86_jaguar && BR2_i386 - default "i686" if BR2_x86_steamroller && BR2_i386 - default "i686" if BR2_x86_k6 - default "i686" if BR2_x86_k6_2 - default "i686" if BR2_x86_athlon - default "i686" if BR2_x86_athlon_4 + # We use the property of Kconfig that the first match of a + # list of default will be chosen. So the following entry will + # not match for all BR2_i386=y configurations, but only the + # ones that didn't match any of the previous cases (i486, + # i586). + default "i686" if BR2_i386 default "x86_64" if BR2_x86_64 config BR2_ENDIAN