On Sat, Jan 11, 2014 at 11:42:51AM -0800, Andi Kleen wrote:
> From: Andi Kleen <a...@linux.intel.com>
> 
> opensuse libbfd requires -lz -liberty to build. Add those
> to the BFD feature detection.
> 
> Signed-off-by: Andi Kleen <a...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to