]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/build: Use cc-option to validate stack alignment parameter
authorMatthias Kaehlcke <mka@chromium.org>
Thu, 17 Aug 2017 18:20:47 +0000 (11:20 -0700)
committerIngo Molnar <mingo@kernel.org>
Mon, 21 Aug 2017 07:53:15 +0000 (09:53 +0200)
commit9e8730b178a2472fca3123e909d6e69cc8127778
treee4da96e1435df6a1da12723ab0a23c1c99adfaab
parent8f91869766c00622b2eaa8ee567db4f333b78c1a
x86/build: Use cc-option to validate stack alignment parameter

With the following commit:

  8f91869766c0 ("x86/build: Fix stack alignment for CLang")

cc-option is only used to determine the name of the stack alignment option
supported by the compiler, but not to verify that the actual parameter
<option>=N is valid in combination with the other CFLAGS.

This causes problems (as reported by the kbuild robot) with older GCC versions
which only support stack alignment on a boundary of 16 bytes or higher.

Also use (__)cc_option to add the stack alignment option to CFLAGS to
make sure only valid options are added.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Bernhard.Rosenkranzer@linaro.org
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michael Davidson <md@google.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Hines <srhines@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dianders@chromium.org
Fixes: 8f91869766c0 ("x86/build: Fix stack alignment for CLang")
Link: http://lkml.kernel.org/r/20170817182047.176752-1-mka@chromium.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/Makefile