All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux-tools/perf: Respect TARGET_CFLAGS
Date: Sat, 27 Apr 2019 19:39:58 +0200	[thread overview]
Message-ID: <ed9e89cc-3f7e-1a05-0d1e-6c6da6a3eb38@mind.be> (raw)
In-Reply-To: <CY4PR1201MB01207D3F0C5E488EACEBA5DAA13E0@CY4PR1201MB0120.namprd12.prod.outlook.com>



On 26/04/2019 08:30, Alexey Brodkin wrote:
> Hi Arnout, Thomas,
> 
>> -----Original Message-----
>> From: Arnout Vandecappelle <arnout@mind.be>
>> Sent: Sunday, April 21, 2019 10:36 AM
>> To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>; Alexey Brodkin <abrodkin@synopsys.com>
>> Cc: buildroot at busybox.net; ARC Buildroot mailing list <arc-buildroot@synopsys.com>
>> Subject: Re: [Buildroot] [PATCH] linux-tools/perf: Respect TARGET_CFLAGS
>>
>>
>>
>> On 18/04/2019 11:43, Thomas Petazzoni wrote:
>>> Hello,
>>>
>>> On Thu, 18 Apr 2019 12:39:02 +0300
>>> Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:
>>>
>>>> perf uses its own build-system and doesn't respect externally set flags.
>>>> Let's force it to use target flags as perf utility is nothing but
>>>> an ordinary user-space application.
>>>>
>>>> This among other things is required to build perf for ARC700 for which
>>>> we pass "-matomic" via TARGET_ABI, see [1] for more details.
>>>>
>>>> [1] https://urldefense.proofpoint.com/v2/url?u=https-
>> 3A__patchwork.ozlabs.org_patch_1087471_&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7b
>> reS55ytWkhpk5R81I&m=eB4KQfsAGH4782y3faOnCUr3nb3xgbJBuMv3P9P6cxY&s=g7hFDq2PCWQQNFtfEGkCnU8PyqSm-NS-
>> FzrkT4QMA8c&e=
>>>>
>>>> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>>>> ---
>>>>  package/linux-tools/linux-tool-perf.mk.in | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in
>>>> index 80e00c3c56..e7565773c4 100644
>>>> --- a/package/linux-tools/linux-tool-perf.mk.in
>>>> +++ b/package/linux-tools/linux-tool-perf.mk.in
>>>> @@ -19,6 +19,7 @@ PERF_MAKE_FLAGS = \
>>>>  	JOBS=$(PARALLEL_JOBS) \
>>>>  	ARCH=$(PERF_ARCH) \
>>>>  	DESTDIR=$(TARGET_DIR) \
>>>> +	EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
>>>
>>> The change is OK, but I believe that if -matomic is really a
>>> core/important CFLAGS on ARC, then we should ideally pass it through
>>> the toolchain wrapper, so that we are sure it is always passed.
>>>
>>> Arnout, what do you think?
>>
>>  +1.
>>
>>  Thomas, last year we made a beginning of deciding what should go through the
>> wrapper and what through CFLAGS, but I'm not sure if we ever got to a conclusion?
> 
> So are we going to wait for some infrastructure changes or
> shall we first fix the problem at hand with broken perf build to ARC700?

 It's not really infrastructure changes. Rather, it is a better way to fix the
issue.

 You just need to move the -matomic from TARGET_ABI to TOOLCHAIN_WRAPPER_OPTS.

 The only tricky part is where that should be done. I think arch/arch.mk.arc
would be the right place. But that indeed requires an infrastructural change,
because the TOOLCHAIN_WRAPPER_OPTS = ... in toolchain-wrapper.mk has to change
into a +=.

 Regards,
 Arnout


 Regards,
 Arnout

  reply	other threads:[~2019-04-27 17:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18  9:39 [Buildroot] [PATCH] linux-tools/perf: Respect TARGET_CFLAGS Alexey Brodkin
2019-04-18  9:43 ` Thomas Petazzoni
2019-04-21  7:36   ` Arnout Vandecappelle
2019-04-26  6:30     ` Alexey Brodkin
2019-04-27 17:39       ` Arnout Vandecappelle [this message]
2019-04-27 17:56         ` Yann E. MORIN
2019-05-08 13:19           ` Alexey Brodkin
2019-05-08 14:31             ` Yann E. MORIN
2019-05-08 14:54               ` [Buildroot] [arc-buildroot] " Alexey Brodkin
2019-05-09 18:12                 ` Yann E. MORIN
2019-07-18 20:58 ` [Buildroot] " Yann E. MORIN

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=ed9e89cc-3f7e-1a05-0d1e-6c6da6a3eb38@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.