lkml.org 
[lkml]   [2017]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 2/2] tools build: Take CC, AS, and LD from the command line
Hi

On Tue, Oct 3, 2017 at 8:06 PM, Guenter Roeck <groeck@google.com> wrote:
> On Tue, Oct 3, 2017 at 1:48 PM, Douglas Anderson <dianders@chromium.org> wrote:
>> If the top-level tools build is called to build a tool and is passed
>> CC, AS, or LD on the command line then someone wants to use a
>> different compiler, assembler, or linker. Let's honor that.
>>
>> This together with the change ("kbuild: Pass HOSTCC and similar to
>> tools Makefiles") allows us to properly get the HOST C Compiler used
>> when the main kernel Makefile calls into the tools.
>>
>> Signed-off-by: Douglas Anderson <dianders@chromium.org>
>> ---
>>
>> tools/scripts/Makefile.include | 22 ++++++++++++++++++++--
>> 1 file changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
>> index 9dc8f078a83c..00261848ec54 100644
>> --- a/tools/scripts/Makefile.include
>> +++ b/tools/scripts/Makefile.include
>> @@ -10,6 +10,20 @@ endif
>> endif
>> endif
>>
>> +SUBMAKE_ARGS :=
>> +
>> +# If CC, LD, or AR were passed on the command line, pass them through to the
>> +# command line of the sub-tools.
>> +ifeq ($(origin CC), command line)
>> + SUBMAKE_ARGS += "CC=$(CC)"
>> +endif
>> +ifeq ($(origin LD), command line)
>> + SUBMAKE_ARGS += "LD=$(LD)"
>> +endif
>> +ifeq ($(origin AR), command line)
>> + SUBMAKE_ARGS += "AR=$(ar)"
>
> s/ar/AR/ ?

Oops! I guess you can tell that I didn't test overriding AR, just CC and LD.

...it sounds as if my patch series was overall misguided anyway as per
<http://patchwork.kernel.org/patch/9983535>, so I won't plan to
re-spin. Thank you for the review, though!

-Doug

\
 
 \ /
  Last update: 2017-10-04 17:54    [W:0.610 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site