]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86/build: Specify stack alignment for clang
authorMatthias Kaehlcke <mka@chromium.org>
Wed, 21 Jun 2017 23:28:05 +0000 (16:28 -0700)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 25 Jun 2017 03:56:52 +0000 (12:56 +0900)
commitd77698df39a512911586834d303275ea5fda74d0
tree308192621eece4e013a58d7da9a6d93262963788
parent032a2c4f65a2f81c93e161a11197ba19bc14a909
x86/build: Specify stack alignment for clang

For gcc stack alignment is configured with -mpreferred-stack-boundary=N,
clang has the option -mstack-alignment=N for that purpose. Use the same
alignment as with gcc.

If the alignment is not specified clang assumes an alignment of
16 bytes, as required by the standard ABI. However as mentioned in
d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if
supported") the standard kernel entry on x86-64 leaves the stack
on an 8-byte boundary, as a consequence clang will keep the stack
misaligned.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/x86/Makefile