Re: [PATCH v3] tools: perf: fix linker error when libelf config is disabled

From: Jiri Olsa
Date: Wed Jan 04 2017 - 12:38:26 EST


On Wed, Jan 04, 2017 at 05:30:02PM +0000, Sudeep Holla wrote:
> When libelf is disabled in the configuration, we get the following
> linker error:
> LINK libperf-jvmti.so
> ld: cannot find -lelf
> Makefile.perf:515: recipe for target 'libperf-jvmti.so' failed
>
> Jiri pointed out that both librt and libelf are not really required. So
> this patch fixes the linker error by getting rid of unwanted libraries
> in the linker stage.
>
> Fixes: 209045adc2bb ("perf tools: add JVMTI agent library")
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> Cc: Stephane Eranian <eranian@xxxxxxxxxx>
> Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>

Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

thanks,
jirka