[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Apr 2018 09:31:37 -0700
From: Martin Kelly <martin@...tingkelly.com>
To: Jiri Slaby <jslaby@...e.cz>, linux-kbuild@...r.kernel.org
Cc: Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
Johannes Weiner <hannes@...xchg.org>,
Linus Walleij <linus.walleij@...aro.org>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Jonathan Cameron <jic23@...nel.org>,
Pali Rohár <pali.rohar@...il.com>,
Richard Purdie <rpurdie@...ys.net>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Robert Moore <robert.moore@...el.com>,
Lv Zheng <lv.zheng@...el.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Mark Brown <broonie@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Valentina Manea <valentina.manea.m@...il.com>,
Shuah Khan <shuahkh@....samsung.com>,
Shuah Khan <shuah@...nel.org>,
Mario Limonciello <mario.limonciello@...l.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tools: fix cross-compile var clobbering
On 04/04/2018 06:20 AM, Jiri Slaby wrote:
> On 01/07/2018, 10:40 PM, Martin Kelly wrote:
>> From: Martin Kelly <martin@...tingkelly.com>
> ...
>> --- a/tools/power/acpi/Makefile.config
>> +++ b/tools/power/acpi/Makefile.config
>> @@ -56,9 +56,6 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
>> # to compile vs uClibc, that can be done here as well.
>> CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
>> CROSS_COMPILE ?= $(CROSS)
>> -CC = $(CROSS_COMPILE)gcc
>> -LD = $(CROSS_COMPILE)gcc
>
> This one makes difference -- acpi is special. This used to be:
> LD = gcc
>
> Now it is:
> LD = ld
>
> And due to that, we get:
> ld: unrecognized option '-D_LINUX'
>
> Should we do:
> LD = $(CC)
>
> or fix this elsewhere differently?
>
> thanks,
>
Yes, I think LD = $(CC) should work. $(CC) will be defaulted to
$(CROSS_COMPILE)gcc due to the call to $(call
allow-override,CC,$(CROSS_COMPILE)gcc) in
tools/scripts/Makefile.include. The allow-override function will
correctly handle env and command-line settings.
This will clobber any special $(LD) settings that the user has set, but
that was true as well for the acpi Makefile before this patch.
Powered by blists - more mailing lists