Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752362AbdFNQiR (ORCPT ); Wed, 14 Jun 2017 12:38:17 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:35843 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750AbdFNQiP (ORCPT ); Wed, 14 Jun 2017 12:38:15 -0400 Date: Wed, 14 Jun 2017 09:38:13 -0700 From: Matthias Kaehlcke To: Michal Marek Cc: Arnd Bergmann , Masahiro Yamada , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "H . J . Lu" , David Woodhouse , X86 ML , Linux Kbuild mailing list , Linux Kernel Mailing List , Michael Davidson , Greg Hackmann , Nick Desaulniers , Stephen Hines , Kees Cook , Bernhard =?utf-8?Q?Rosenkr=C3=A4nzer?= , Peter Foley , Behan Webster , Douglas Anderson Subject: Re: [PATCH v2 1/4] kbuild: Add cc-option-raw macro Message-ID: <20170614163813.GM141096@google.com> References: <20170613230854.112282-1-mka@chromium.org> <20170613230854.112282-2-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2088 Lines: 49 El Wed, Jun 14, 2017 at 10:32:20AM +0200 Michal Marek ha dit: > Dne 14.6.2017 v 09:31 Arnd Bergmann napsal(a): > > On Wed, Jun 14, 2017 at 3:27 AM, Masahiro Yamada > > wrote: > >> 2017-06-14 8:08 GMT+09:00 Matthias Kaehlcke : > >>> cc-option uses KBUILD_CFLAGS and KBUILD_CPPFLAGS when it determines > >>> whether an option is supported or not. This is fine for options used to > >>> build the kernel itself, however some components like the x86 boot code > >>> use a different set of flags. > >>> > >>> Add the new macro cc-option-raw which serves the same purpose as > >>> cc-option but has additional parameters. One parameter is the compiler > >>> with which the check should be performed, the other the compiler options > >>> to be used instead KBUILD_C*FLAGS. The compiler parameter allows other > >>> macros like hostcc-option to be implemented on top of cc-option-raw. > >>> > >>> Also rework cc-option to make use of cc-option-raw. > >>> > >>> Suggested-by: Arnd Bergmann > >>> Suggested-by: Masahiro Yamada > >>> Signed-off-by: Matthias Kaehlcke > >>> --- > >>> Changes in v2: > >>> - Changed macro name from Add cc-option-no-kbuild to cc-option-raw > >>> - Added compiler as parameter to the macro > >>> - Reworked cc-option to make use of cc-option-raw > >>> - Updated commit message > >>> > >>> scripts/Kbuild.include | 9 +++++++-- > >>> 1 file changed, 7 insertions(+), 2 deletions(-) > >>> > >> > >> Acked-by: Masahiro Yamada > >> (if nothing better pops up) > > > > Acked-by: Arnd Bergmann > > Acked-by: Michal Marek > > > > Regarding the naming, __cc-option might be better than cc-option-raw, > > but the current version is fine too. > > I have no strong opinion either way :). I'm going to change it to __cc-option since there is a slight preference for it and I have to respin the series anyway. I'll wait a bit for feedback from the x86 folks before sending the new version.