lkml.org 
[lkml]   [2014]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/9] perf, tools: fix BFD detection on opensuse
On Sat, Jan 11, 2014 at 11:42:51AM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> opensuse libbfd requires -lz -liberty to build. Add those
> to the BFD feature detection.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/config/Makefile | 2 +-
> tools/perf/config/feature-checks/Makefile | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
> index 01dd43d..d86d33c 100644
> --- a/tools/perf/config/Makefile
> +++ b/tools/perf/config/Makefile
> @@ -478,7 +478,7 @@ else
> endif
>
> ifeq ($(feature-libbfd), 1)
> - EXTLIBS += -lbfd
> + EXTLIBS += -lbfd -lz -liberty
> endif

ok, Fedora is using linker script in place of libbfd.so which
adds those anyway..

---
[jolsa@krava perf]$ cat /usr/lib64/libbfd.so
/* GNU ld script */

/* Ensure this .so library will not be used by a link for a different format
on a multi-architecture system. */
OUTPUT_FORMAT(elf64-x86-64)

/* The libz dependency is unexpected by legacy build scripts. */
/* The libdl dependency is for plugin support. (BZ 889134) */
INPUT ( /usr/lib64/libbfd.a -liberty -lz -ldl )
---

we also need to check and probably get rid of follow up settings of
EXTLIBS which seems useless now:

...
ifneq ($(feature-libbfd), 1)
$(call feature_check,liberty)
ifeq ($(feature-liberty), 1)
EXTLIBS += -lbfd -liberty
else
$(call feature_check,liberty-z)
ifeq ($(feature-liberty-z), 1)
EXTLIBS += -lbfd -liberty -lz
...

jirka


\
 
 \ /
  Last update: 2014-01-12 16:41    [W:0.115 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site