From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754379AbdFNHpI (ORCPT ); Wed, 14 Jun 2017 03:45:08 -0400 Received: from conssluserg-03.nifty.com ([210.131.2.82]:63787 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750757AbdFNHpG (ORCPT ); Wed, 14 Jun 2017 03:45:06 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com v5E7iqQX014718 X-Nifty-SrcIP: [209.85.213.171] MIME-Version: 1.0 In-Reply-To: References: <20170613230854.112282-1-mka@chromium.org> <20170613230854.112282-2-mka@chromium.org> From: Masahiro Yamada Date: Wed, 14 Jun 2017 16:44:51 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/4] kbuild: Add cc-option-raw macro To: Arnd Bergmann Cc: Matthias Kaehlcke , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "H . J . Lu" , David Woodhouse , Michal Marek , X86 ML , Linux Kbuild mailing list , Linux Kernel Mailing List , Michael Davidson , Greg Hackmann , Nick Desaulniers , Stephen Hines , Kees Cook , =?UTF-8?Q?Bernhard_Rosenkr=C3=A4nzer?= , Peter Foley , Behan Webster , Douglas Anderson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, 2017-06-14 16:31 GMT+09:00 Arnd Bergmann : > 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 > > Regarding the naming, __cc-option might be better than cc-option-raw, > but the current version is fine too. Thank you for your suggestion. Yes, double-underscore prefix is often used in the kernel coding, so I like your idea. I will leave it up to Matthias, though. Either will be fine for me. Thanks! -- Best Regards Masahiro Yamada