Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754693AbdFNIdm (ORCPT ); Wed, 14 Jun 2017 04:33:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:40719 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754175AbdFNIcY (ORCPT ); Wed, 14 Jun 2017 04:32:24 -0400 Subject: Re: [PATCH v2 1/4] kbuild: Add cc-option-raw macro To: Arnd Bergmann , Masahiro Yamada References: <20170613230854.112282-1-mka@chromium.org> <20170613230854.112282-2-mka@chromium.org> Cc: Matthias Kaehlcke , 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 , =?UTF-8?Q?Bernhard_Rosenkr=c3=a4nzer?= , Peter Foley , Behan Webster , Douglas Anderson From: Michal Marek Message-ID: Date: Wed, 14 Jun 2017 10:32:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1746 Lines: 45 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 :). Michal