Re: [PATCH v4 3/3] x86/build: Specify stack alignment for clang

From: Ingo Molnar
Date: Tue Jun 20 2017 - 05:21:06 EST

* Matthias Kaehlcke <mka@xxxxxxxxxxxx> wrote:

> Ingo didn't like the duplication and suggested the use of a variable, which
> kinda implies a check for the compiler name.

I don't think it implies that: why cannot cc_stack_align_opt probe for the
compiler option and use whichever is available, without hard-coding the compiler

> I also think this is a cleaner solution. [...]

I concur with hpa: hard-coding compiler is awfully fragile and ugly as well.

With the proper probing of compiler options it will be possible for compilers to
consolidate their options, and it would be possible for a third compiler to use a
mixture of GCC and Clang options. With hard-coding none of that flexibility is

> but I'm happy to respin the patch if you have another suggestion that is ok for
> both of you.

Please do.