Skip to content
Commit 989ceac7 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Ingo Molnar
Browse files

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: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/1436
Link: https://lkml.kernel.org/r/20210812183848.1519994-1-ndesaulniers@google.com
parent 36a21d51
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment