diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build/Makefile.feature | 4 | ||||
-rw-r--r-- | tools/build/feature/Makefile | 10 | ||||
-rw-r--r-- | tools/perf/Makefile.config | 44 |
3 files changed, 30 insertions, 28 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index d47b8f73e2e7..5467c6bf9ceb 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature | |||
@@ -82,8 +82,8 @@ FEATURE_TESTS_EXTRA := \ | |||
82 | cplus-demangle \ | 82 | cplus-demangle \ |
83 | hello \ | 83 | hello \ |
84 | libbabeltrace \ | 84 | libbabeltrace \ |
85 | liberty \ | 85 | libbfd-liberty \ |
86 | liberty-z \ | 86 | libbfd-liberty-z \ |
87 | libunwind-debug-frame \ | 87 | libunwind-debug-frame \ |
88 | libunwind-debug-frame-arm \ | 88 | libunwind-debug-frame-arm \ |
89 | libunwind-debug-frame-aarch64 \ | 89 | libunwind-debug-frame-aarch64 \ |
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 2dbcc0d00f52..7ceb4441b627 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile | |||
@@ -17,8 +17,8 @@ FILES= \ | |||
17 | test-libbfd.bin \ | 17 | test-libbfd.bin \ |
18 | test-disassembler-four-args.bin \ | 18 | test-disassembler-four-args.bin \ |
19 | test-reallocarray.bin \ | 19 | test-reallocarray.bin \ |
20 | test-liberty.bin \ | 20 | test-libbfd-liberty.bin \ |
21 | test-liberty-z.bin \ | 21 | test-libbfd-liberty-z.bin \ |
22 | test-cplus-demangle.bin \ | 22 | test-cplus-demangle.bin \ |
23 | test-libelf.bin \ | 23 | test-libelf.bin \ |
24 | test-libelf-getphdrnum.bin \ | 24 | test-libelf-getphdrnum.bin \ |
@@ -210,7 +210,7 @@ $(OUTPUT)test-libpython-version.bin: | |||
210 | $(BUILD) | 210 | $(BUILD) |
211 | 211 | ||
212 | $(OUTPUT)test-libbfd.bin: | 212 | $(OUTPUT)test-libbfd.bin: |
213 | $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl | 213 | $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl |
214 | 214 | ||
215 | $(OUTPUT)test-disassembler-four-args.bin: | 215 | $(OUTPUT)test-disassembler-four-args.bin: |
216 | $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes | 216 | $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes |
@@ -218,10 +218,10 @@ $(OUTPUT)test-disassembler-four-args.bin: | |||
218 | $(OUTPUT)test-reallocarray.bin: | 218 | $(OUTPUT)test-reallocarray.bin: |
219 | $(BUILD) | 219 | $(BUILD) |
220 | 220 | ||
221 | $(OUTPUT)test-liberty.bin: | 221 | $(OUTPUT)test-libbfd-liberty.bin: |
222 | $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty | 222 | $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty |
223 | 223 | ||
224 | $(OUTPUT)test-liberty-z.bin: | 224 | $(OUTPUT)test-libbfd-liberty-z.bin: |
225 | $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz | 225 | $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz |
226 | 226 | ||
227 | $(OUTPUT)test-cplus-demangle.bin: | 227 | $(OUTPUT)test-cplus-demangle.bin: |
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 07c1857c3d7a..b441c88cafa1 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config | |||
@@ -702,18 +702,20 @@ endif | |||
702 | 702 | ||
703 | ifeq ($(feature-libbfd), 1) | 703 | ifeq ($(feature-libbfd), 1) |
704 | EXTLIBS += -lbfd | 704 | EXTLIBS += -lbfd |
705 | else | ||
706 | # we are on a system that requires -liberty and (maybe) -lz | ||
707 | # to link against -lbfd; test each case individually here | ||
705 | 708 | ||
706 | # call all detections now so we get correct | 709 | # call all detections now so we get correct |
707 | # status in VF output | 710 | # status in VF output |
708 | $(call feature_check,liberty) | 711 | $(call feature_check,libbfd-liberty) |
709 | $(call feature_check,liberty-z) | 712 | $(call feature_check,libbfd-liberty-z) |
710 | $(call feature_check,cplus-demangle) | ||
711 | 713 | ||
712 | ifeq ($(feature-liberty), 1) | 714 | ifeq ($(feature-libbfd-liberty), 1) |
713 | EXTLIBS += -liberty | 715 | EXTLIBS += -lbfd -liberty |
714 | else | 716 | else |
715 | ifeq ($(feature-liberty-z), 1) | 717 | ifeq ($(feature-libbfd-liberty-z), 1) |
716 | EXTLIBS += -liberty -lz | 718 | EXTLIBS += -lbfd -liberty -lz |
717 | endif | 719 | endif |
718 | endif | 720 | endif |
719 | endif | 721 | endif |
@@ -723,24 +725,24 @@ ifdef NO_DEMANGLE | |||
723 | else | 725 | else |
724 | ifdef HAVE_CPLUS_DEMANGLE_SUPPORT | 726 | ifdef HAVE_CPLUS_DEMANGLE_SUPPORT |
725 | EXTLIBS += -liberty | 727 | EXTLIBS += -liberty |
726 | CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT | ||
727 | else | 728 | else |
728 | ifneq ($(feature-libbfd), 1) | 729 | ifeq ($(filter -liberty,$(EXTLIBS)),) |
729 | ifneq ($(feature-liberty), 1) | 730 | $(call feature_check,cplus-demangle) |
730 | ifneq ($(feature-liberty-z), 1) | 731 | |
731 | # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT | 732 | # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT |
732 | # or any of 'bfd iberty z' trinity | 733 | # or any of 'bfd iberty z' trinity |
733 | ifeq ($(feature-cplus-demangle), 1) | 734 | ifeq ($(feature-cplus-demangle), 1) |
734 | EXTLIBS += -liberty | 735 | EXTLIBS += -liberty |
735 | CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT | 736 | else |
736 | else | 737 | msg := $(warning No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling) |
737 | msg := $(warning No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling) | 738 | CFLAGS += -DNO_DEMANGLE |
738 | CFLAGS += -DNO_DEMANGLE | ||
739 | endif | ||
740 | endif | ||
741 | endif | 739 | endif |
742 | endif | 740 | endif |
743 | endif | 741 | endif |
742 | |||
743 | ifneq ($(filter -liberty,$(EXTLIBS)),) | ||
744 | CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT | ||
745 | endif | ||
744 | endif | 746 | endif |
745 | 747 | ||
746 | ifneq ($(filter -lbfd,$(EXTLIBS)),) | 748 | ifneq ($(filter -lbfd,$(EXTLIBS)),) |