diff options
author | Andi Kleen | 2015-08-12 15:48:37 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo | 2015-08-13 14:49:11 -0300 |
commit | 7aec51cbf0646cc15d719b08caea931576dc7f2a (patch) | |
tree | d502a6428c71a423e907dfd0285da24ede731bc7 /tools/build | |
parent | a897b5f0393a8a05d230c9248dc5324fb30720a0 (diff) |
perf tools: Support static linking with libdw
The Fedora 22 version of libdw requires a couple of extra libraries to
link. With a dynamic link the dependencies are pulled in automatically,
but this doesn't work for static linking. Add the needed libraries
explicitely to the feature probe and the Makefile.
v2: Explicitly check for static linking and only add the dependencies
when -static is set. This is to avoid regressions on Arnaldo's system.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1439419717-20601-1-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build')
-rw-r--r-- | tools/build/feature/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 1c0d69f44552..74ca42093d70 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -70,8 +70,13 @@ test-libelf.bin: test-glibc.bin: $(BUILD) +DWARFLIBS := -ldw +ifeq ($(findstring -static,${LDFLAGS}),-static) +DWARFLIBS += -lelf -lebl -lz -llzma -lbz2 +endif + test-dwarf.bin: - $(BUILD) -ldw + $(BUILD) $(DWARFLIBS) test-libelf-mmap.bin: $(BUILD) -lelf |