mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Kelly <martin@martingkelly.com>
To: Jiri Slaby <jslaby@suse.cz>, linux-kbuild@vger.kernel.org
Cc: "Tejun Heo" <tj@kernel.org>, "Li Zefan" <lizefan@huawei.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Robert Moore" <robert.moore@intel.com>,
	"Lv Zheng" <lv.zheng@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Valentina Manea" <valentina.manea.m@gmail.com>,
	"Shuah Khan" <shuahkh@osg.samsung.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"Mario Limonciello" <mario.limonciello@dell.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tools: fix cross-compile var clobbering
Date: Wed, 4 Apr 2018 09:31:37 -0700	[thread overview]
Message-ID: <54661ff7-5c2a-473b-e08c-1cd267353c03@martingkelly.com> (raw)
In-Reply-To: <cc9e8b57-b2e0-91a5-aa9f-9488c78a9860@suse.cz>

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.

  reply	other threads:[~2018-04-04 16:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 20:16 [PATCH] tools: fix cross-compile var export Martin Kelly
2018-01-07 16:11 ` Paul Gortmaker
2018-01-07 18:31   ` Martin Kelly
2018-01-07 18:51     ` Martin Kelly
2018-01-08 11:45       ` Dan Carpenter
2018-01-07 19:04     ` Paul Gortmaker
2018-01-07 21:43       ` Martin Kelly
2018-01-07 21:40 ` [PATCH v2] tools: fix cross-compile var clobbering Martin Kelly
2018-01-08 11:22   ` Mark Brown
2018-04-04 13:20   ` Jiri Slaby
2018-04-04 16:31     ` Martin Kelly [this message]
2018-04-24  7:43       ` [PATCH 1/1] tools: power/acpi, revert to LD = gcc Jiri Slaby
2018-04-24 16:38         ` Martin Kelly
2018-04-30  8:00         ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54661ff7-5c2a-473b-e08c-1cd267353c03@martingkelly.com \
    --to=martin@martingkelly.com \
    --cc=acme@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=hannes@cmpxchg.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jic23@kernel.org \
    --cc=jslaby@suse.cz \
    --cc=kys@microsoft.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=lv.zheng@intel.com \
    --cc=mario.limonciello@dell.com \
    --cc=mingo@redhat.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=rpurdie@rpsys.net \
    --cc=shuah@kernel.org \
    --cc=shuahkh@osg.samsung.com \
    --cc=sthemmin@microsoft.com \
    --cc=tj@kernel.org \
    --cc=valentina.manea.m@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®