[Buildroot] [PATCH] linux-tools/perf: Respect TARGET_CFLAGS
arnout at mind.be
Sat Apr 27 17:39:58 UTC 2019
On 26/04/2019 08:30, Alexey Brodkin wrote:
> Hi Arnout, Thomas,
>> -----Original Message-----
>> From: Arnout Vandecappelle <arnout at mind.be>
>> Sent: Sunday, April 21, 2019 10:36 AM
>> To: Thomas Petazzoni <thomas.petazzoni at bootlin.com>; Alexey Brodkin <abrodkin at synopsys.com>
>> Cc: buildroot at busybox.net; ARC Buildroot mailing list <arc-buildroot at synopsys.com>
>> Subject: Re: [Buildroot] [PATCH] linux-tools/perf: Respect TARGET_CFLAGS
>> On 18/04/2019 11:43, Thomas Petazzoni wrote:
>>> On Thu, 18 Apr 2019 12:39:02 +0300
>>> Alexey Brodkin <Alexey.Brodkin at 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  for more details.
>>>>  https://urldefense.proofpoint.com/v2/url?u=https-
>>>> Signed-off-by: Alexey Brodkin <abrodkin at 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?
>> 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
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 +=.
More information about the buildroot