From: Sedat Dilek <sedat.dilek@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Ian Rogers <irogers@google.com>,
Sedat Dilek <sedat.dilek@gmail.com>, Leo Yan <leo.yan@linaro.org>,
John Keeping <john@metanate.com>,
Michael Petlan <mpetlan@redhat.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Cc: Jiri Olsa <olsajiri@gmail.com>,
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Subject: [PATCH 5.17] tools: feature/test-libperl.c: Sync PERL_EMBED_CCOPTS with perf
Date: Fri, 11 Mar 2022 06:44:55 +0100 [thread overview]
Message-ID: <20220311054455.5911-1-sedat.dilek@gmail.com> (raw)
When trying to build perf with a LLVM/Clang toolchain people see errors
when testing for libperl feature.
Jiri reports:
> 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]
>
The reason is PERL_EMBED_CCOPTS is defined in two places:
tools/build/feature/Makefile
tools/perf/Makefile.config
As a result FLAGS_PERL_EMBED is set differently.
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))
Sync PERL_EMBED_CCOPTS in tools/build/feature/Makefile to fix this.
For a minimal fix for Linux v5.17 this here was preferred by Arnaldo.
Link: https://lore.kernel.org/lkml/CA+icZUWHd4VTKNwBtuxt9-fHoiYV+Q7tQ809Cn83k8sbQ_uNHw@mail.gmail.com/
Reported-by: Jiri Olsa <olsajiri@gmail.com>
Reported-by: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Suggested-by: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
Changes v1->v2:
- Fix some typos and use lore link as requested by Nick
- Add credits for Nick
tools/build/feature/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 1480910c792e..869073cf8449 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:
--
2.35.1
reply other threads:[~2022-03-11 5:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220311054455.5911-1-sedat.dilek@gmail.com \
--to=sedat.dilek@gmail.com \
--cc=acme@redhat.com \
--cc=arnaldo.melo@gmail.com \
--cc=irogers@google.com \
--cc=john@metanate.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mpetlan@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=olsajiri@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®