Skip to content
  • Matthias Kaehlcke's avatar
    x86/build: Use cc-option to validate stack alignment parameter · 9e8730b1
    Matthias Kaehlcke authored and Ingo Molnar's avatar Ingo Molnar committed
    With the following commit:
    
      8f918697
    
     ("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: default avatarkbuild test robot <fengguang.wu@intel.com>
    Signed-off-by: default avatarMatthias 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: 8f918697 ("x86/build: Fix stack alignment for CLang")
    Link: http://lkml.kernel.org/r/20170817182047.176752-1-mka@chromium.org
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    9e8730b1