Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521AbdFNHcF (ORCPT ); Wed, 14 Jun 2017 03:32:05 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:36234 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753286AbdFNHcD (ORCPT ); Wed, 14 Jun 2017 03:32:03 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170613230854.112282-1-mka@chromium.org> <20170613230854.112282-2-mka@chromium.org> From: Arnd Bergmann Date: Wed, 14 Jun 2017 09:31:57 +0200 X-Google-Sender-Auth: Cq5rQRjQS_MCDwpYbo732Iq1uOg Message-ID: Subject: Re: [PATCH v2 1/4] kbuild: Add cc-option-raw macro To: Masahiro Yamada 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 Content-Length: 1581 Lines: 39 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. Arnd