Re: [PATCH] x86/build: Use cc-option to validate stack alignment parameter

From: Ingo Molnar
Date: Mon Aug 21 2017 - 03:53:17 EST



* Matthias Kaehlcke <mka@xxxxxxxxxxxx> wrote:

> With 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 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.
>
> Fixes: 8f91869766c0 ("x86/build: Fix stack alignment for CLang")
> Signed-off-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>

I've added the kbuild-bot Reported-by tag to document (and credit) how this bug
was found.

Thanks,

Ingo