From: Jiri Olsa <jolsa@redhat.com>
To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: "jolsa@kernel.org" <jolsa@kernel.org>,
"acme@redhat.com" <acme@redhat.com>,
"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
David Carrillo-Cisneros <davidcc@google.com>
Subject: Re: perf jvmti: unconditionally links against -lelf
Date: Wed, 12 Apr 2017 12:19:53 +0200 [thread overview]
Message-ID: <20170412101953.GB14409@krava> (raw)
In-Reply-To: <1491991105.4510.25.camel@synopsys.com>
On Wed, Apr 12, 2017 at 09:58:26AM +0000, Alexey Brodkin wrote:
> Hi Jiri,
>
> Just tried to cross-compile perf with pretty bare-minimal toolchain
> which has no libelf installed for the target (for the record I used
> SNPS ARC pre-built arc-2016.09 tools) like that:
> --------------->8------------
> make NO_LIBELF=1
> --------------->8------------
>
> And got the following build failure:
> --------------->8------------
> LINK libperf-jvmti.so
> .../2016.09-uclibc-archs/bin/../lib/gcc/arc-snps-linux-uclibc/6.2.1/../../../../arc-snps-linux-uclibc/bin/ld: cannot find -lelf
> --------------->8------------
>
> First I was surprised because I intentionally disabled usage of libelf
> but after some grepping figured out jvmti is linked against libelf
> regardless any settings, see:
> --------------->8------------
> $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
> $(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
> endif
> --------------->8------------
>
> This comes from commit d4dfdf00d43e ("perf jvmti: Plug compilation into perf build").
>
> I'm not really sure what could be the best solution to the problem I see.
> If libelf is a real must for jvmti then probably we may force set NO_JVMTI=1
> if NO_LIBELF=1 is passed on the command line.
>
> At least the following builds perf for me without issues:
> --------------->8------------
> make NO_LIBELF=1 NO_JVMTI=1
> --------------->8------------
hi,
incidently, David just posted patch for this ;-)
http://marc.info/?l=linux-kernel&m=149197980107421&w=2
should be merged soon
jirka
next prev parent reply other threads:[~2017-04-12 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 9:58 perf jvmti: unconditionally links against -lelf Alexey Brodkin
2017-04-12 10:19 ` Jiri Olsa [this message]
2017-04-12 11:52 ` Alexey Brodkin
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=20170412101953.GB14409@krava \
--to=jolsa@redhat.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=davidcc@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
/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