x86/build: Remove stale cc-option checks
authorNick Desaulniers <ndesaulniers@google.com>
Thu, 12 Aug 2021 18:38:48 +0000 (11:38 -0700)
committerIngo Molnar <mingo@kernel.org>
Sun, 22 Aug 2021 08:24:27 +0000 (10:24 +0200)
commit989ceac799cb28a477304cdc9ee72995191c6378
tree65cf5fb719622c1b5ef7d1429203e1baddadc8d5
parent36a21d51725af2ce0700c6ebcb6b9594aac658a6
x86/build: Remove stale cc-option checks

cc-option, __cc-option, cc-option-yn, and cc-disable-warning all invoke
the compiler during build time, and can slow down the build when these
checks become stale for our supported compilers, whose minimally
supported versions increases over time.

See Documentation/process/changes.rst for the current supported minimal
versions (GCC 4.9+, clang 10.0.1+). Compiler version support for these
flags may be verified on godbolt.org.

The following flags are supported by all supported versions of GCC and
Clang. Remove their cc-option, __cc-option, and cc-option-yn tests.

  -Wno-address-of-packed-member
  -mno-avx
  -m32
  -mno-80387
  -march=k8
  -march=nocona
  -march=core2
  -march=atom
  -mtune=generic
  -mfentry

[ mingo: Fixed regression on GCC, via partial revert of the stack-boundary changes.  ]

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/1436
Link: https://lkml.kernel.org/r/20210812183848.1519994-1-ndesaulniers@google.com
arch/x86/Makefile