lkml.org 
[lkml]   [2018]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] tools: fix cross-compile var clobbering
From
Date
On 04/04/2018 06:20 AM, Jiri Slaby wrote:
> On 01/07/2018, 10:40 PM, Martin Kelly wrote:
>> From: Martin Kelly <martin@martingkelly.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.

\
 
 \ /
  Last update: 2018-04-04 18:32    [W:0.123 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site