lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Linux-v5.17-rc6] Building tools/perf with perl v5.34
Em Sun, Mar 06, 2022 at 05:00:22PM +0100, Sedat Dilek escreveu:
> On Sun, Mar 6, 2022 at 4:42 PM Jiri Olsa <olsajiri@gmail.com> wrote:
> > I'm getting some other lto related error:
> >
> > $ cat test-libperl.make.output
> > clang-13: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
> >

> I was thinking about syncing the flags for both feature test-perl and
> perf/libperl-support.

> tools/build/feature/Makefile
> tools/perf/Makefile.config

> So, I guess FLAGS_PERL_EMBED differs.

> For building perf '-ffat-lto-objects' is filtered-out...

> $ git grep ffat-lto-objects tools/perf/
> tools/perf/Makefile.config: PERL_EMBED_CCOPTS := $(filter-out
> -flto=auto -ffat-lto-objects, $(PERL_EMBED_CCOPTS))

Right, with the patch below I can build with clang 13. It would be nice
to have this defined into just one place, but for now, for 5.17 the
minimal fix is preferred, can you send a proper patch, s-o-b, etc?

- Arnaldo

diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 1480910c792e2cb3..869073cf84493083 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -218,6 +218,7 @@ PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
+PERL_EMBED_CCOPTS := $(filter-out -ffat-lto-objects, $(PERL_EMBED_CCOPTS))
FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)

$(OUTPUT)test-libperl.bin:
\
 
 \ /
  Last update: 2022-03-07 17:37    [W:0.042 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site