public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Shuah Khan <skhan@linuxfoundation.org>, linux-kernel@vger.kernel.org
Cc: Thomas Renninger <trenn@suse.com>, Shuah Khan <shuah@kernel.org>,
	"John B. Wyatt IV" <jwyatt@redhat.com>,
	John Kacur <jkacur@redhat.com>, Peng Fan <peng.fan@nxp.com>,
	"open list:CPU POWER MONITORING SUBSYSTEM"
	<linux-pm@vger.kernel.org>
Subject: Re: [PATCH] pm: cpupower: Makefile: Fix cross compilation
Date: Fri, 22 Nov 2024 08:11:57 -0800	[thread overview]
Message-ID: <4823ecb4-d714-43a2-8fc0-dff7c9ff8a6d@broadcom.com> (raw)
In-Reply-To: <9d35ba5e-179e-4aef-b973-ad615489cfa4@linuxfoundation.org>



On 11/22/2024 7:25 AM, Shuah Khan wrote:
> On 11/20/24 21:43, Florian Fainelli wrote:
>> After f79473ed9220 ("pm: cpupower: Makefile: Allow overriding
>> cross-compiling env params") we would fail to cross compile cpupower in
>> buildroot which uses the recipe at [1] where only the CROSS variable is
>> being set.
>>
>> The issue here is the use of the lazy evaluation for all variables: CC,
>> LD, AR, STRIP, RANLIB, rather than just CROSS.
>>
>> [1]:
>> https://git.buildroot.net/buildroot/tree/package/linux-tools/linux- 
>> tool-cpupower.mk.in
>>
>> Fixes: f79473ed9220 ("pm: cpupower: Makefile: Allow overriding cross- 
>> compiling env params")
>> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
>> Change-Id: Id98f2c648c82c08044b7281714bc6a8e921629ad
>> ---
>>   tools/power/cpupower/Makefile | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/ 
>> Makefile
>> index 175004ce44b2..96bb1e5f3970 100644
>> --- a/tools/power/cpupower/Makefile
>> +++ b/tools/power/cpupower/Makefile
>> @@ -87,11 +87,11 @@ INSTALL_SCRIPT = ${INSTALL} -m 644
>>   # to something more interesting, like "arm-linux-".  If you want
>>   # to compile vs uClibc, that can be done here as well.
>>   CROSS ?= #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
>> -CC ?= $(CROSS)gcc
>> -LD ?= $(CROSS)gcc
>> -AR ?= $(CROSS)ar
>> -STRIP ?= $(CROSS)strip
>> -RANLIB ?= $(CROSS)ranlib
>> +CC = $(CROSS)gcc
>> +LD = $(CROSS)gcc
>> +AR = $(CROSS)ar
>> +STRIP = $(CROSS)strip
>> +RANLIB = $(CROSS)ranlib
>>   HOSTCC = gcc
>>   MKDIR = mkdir
> 
> Thank you for the patch. I will apply this once the merge window
> closes.

Thanks for taking a look, there is still an on-going discussion with 
Peng about how to best approach this, the discussion is here:

https://lore.kernel.org/all/PAXPR04MB84595BA5BEAE2D21F015036688232@PAXPR04MB8459.eurprd04.prod.outlook.com/

Let's wait until that settles before taking this patch, or Peng's.
-- 
Florian


  reply	other threads:[~2024-11-22 16:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21  4:43 [PATCH] pm: cpupower: Makefile: Fix cross compilation Florian Fainelli
2024-11-22 15:25 ` Shuah Khan
2024-11-22 16:11   ` Florian Fainelli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-29  1:20 Peng Fan (OSS)
2024-12-02 17:12 ` Florian Fainelli
2024-12-10  0:58   ` Shuah Khan
2025-01-07 18:56     ` Florian Fainelli
2025-01-07 20:38       ` Shuah Khan

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=4823ecb4-d714-43a2-8fc0-dff7c9ff8a6d@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=jkacur@redhat.com \
    --cc=jwyatt@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=trenn@suse.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