Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbdFTJVD (ORCPT ); Tue, 20 Jun 2017 05:21:03 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:33771 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752745AbdFTJU6 (ORCPT ); Tue, 20 Jun 2017 05:20:58 -0400 Date: Tue, 20 Jun 2017 11:20:54 +0200 From: Ingo Molnar To: Matthias Kaehlcke Cc: hpa@zytor.com, Thomas Gleixner , Ingo Molnar , "H . J . Lu" , David Woodhouse , Masahiro Yamada , Michal Marek , x86@kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Davidson , Greg Hackmann , Nick Desaulniers , Stephen Hines , Kees Cook , Arnd Bergmann , Bernhard.Rosenkranzer@linaro.org, Peter Foley , Behan Webster , Douglas Anderson Subject: Re: [PATCH v4 3/3] x86/build: Specify stack alignment for clang Message-ID: <20170620092054.7d2mgzx6cw3jvgji@gmail.com> References: <20170619183757.124992-1-mka@chromium.org> <20170619183757.124992-4-mka@chromium.org> <20170619204704.GP141096@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170619204704.GP141096@google.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 851 Lines: 27 * 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-coding the compiler name? > 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 available. > but I'm happy to respin the patch if you have another suggestion that is ok for > both of you. Please do. Thanks, Ingo