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

2017-06-21 Thread Ingo Molnar
* Matthias Kaehlcke wrote: > El Tue, Jun 20, 2017 at 11:20:54AM +0200 Ingo Molnar ha dit: > > > > > * Matthias Kaehlcke 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 thi

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

2017-06-20 Thread Matthias Kaehlcke
El Tue, Jun 20, 2017 at 11:20:54AM +0200 Ingo Molnar ha dit: > > * Matthias Kaehlcke 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

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

2017-06-20 Thread Ingo Molnar
* Matthias Kaehlcke 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-codin

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

2017-06-19 Thread Matthias Kaehlcke
El Mon, Jun 19, 2017 at 01:17:03PM -0700 h...@zytor.com ha dit: > On June 19, 2017 11:37:57 AM PDT, Matthias Kaehlcke wrote: > >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 wi

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

2017-06-19 Thread hpa
On June 19, 2017 11:37:57 AM PDT, Matthias Kaehlcke wrote: >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

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

2017-06-19 Thread Matthias Kaehlcke
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