mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz
Current libbfd feature test unconditionally links against -liberty and -lz.
While it's required on some systems (e.g. opensuse), it's completely
unnecessary on the others, where only -lbdf is sufficient (debian).
This patch streamlines (and renames) the following feature checks:
feature-libbfd - only link against -lbfd (debian),
see commit 2cf9040714 ("perf tools: Fix bfd
dependency libraries detection")
feature-libbfd-liberty - link against -lbfd and -liberty
feature-libbfd-liberty-z - link against -lbfd, -liberty and -lz (opensuse),
see commit 280e7c48c3 ("perf tools: fix BFD
detection on opensuse")
(feature-liberty{,-z} were renamed to feature-libbfd-liberty{,z}
for clarity)
The main motivation is to fix this feature test for bpftool which is
currently broken on debian (libbfd feature shows OFF, but we still
unconditionally link against -lbfd and it works).
Tested on debian with only -lbfd installed (without -liberty); I'd
appreciate if somebody on the other systems can test this new detection
method.
Signed-off-by: Stanislav Fomichev <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Mathieu Poirier <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/4dfc634cfcfb236883971b5107cf3c28ec8a31be.1542328222.git.sdf@google.com
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
5ce29d522e
commit
14541b1e7e
3 changed files with 30 additions and 28 deletions
|
|
@ -82,8 +82,8 @@ FEATURE_TESTS_EXTRA := \
|
|||
cplus-demangle \
|
||||
hello \
|
||||
libbabeltrace \
|
||||
liberty \
|
||||
liberty-z \
|
||||
libbfd-liberty \
|
||||
libbfd-liberty-z \
|
||||
libunwind-debug-frame \
|
||||
libunwind-debug-frame-arm \
|
||||
libunwind-debug-frame-aarch64 \
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ FILES= \
|
|||
test-libbfd.bin \
|
||||
test-disassembler-four-args.bin \
|
||||
test-reallocarray.bin \
|
||||
test-liberty.bin \
|
||||
test-liberty-z.bin \
|
||||
test-libbfd-liberty.bin \
|
||||
test-libbfd-liberty-z.bin \
|
||||
test-cplus-demangle.bin \
|
||||
test-libelf.bin \
|
||||
test-libelf-getphdrnum.bin \
|
||||
|
|
@ -210,7 +210,7 @@ $(OUTPUT)test-libpython-version.bin:
|
|||
$(BUILD)
|
||||
|
||||
$(OUTPUT)test-libbfd.bin:
|
||||
$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
|
||||
$(BUILD) -DPACKAGE='"perf"' -lbfd -ldl
|
||||
|
||||
$(OUTPUT)test-disassembler-four-args.bin:
|
||||
$(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes
|
||||
|
|
@ -218,10 +218,10 @@ $(OUTPUT)test-disassembler-four-args.bin:
|
|||
$(OUTPUT)test-reallocarray.bin:
|
||||
$(BUILD)
|
||||
|
||||
$(OUTPUT)test-liberty.bin:
|
||||
$(OUTPUT)test-libbfd-liberty.bin:
|
||||
$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
|
||||
|
||||
$(OUTPUT)test-liberty-z.bin:
|
||||
$(OUTPUT)test-libbfd-liberty-z.bin:
|
||||
$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
|
||||
|
||||
$(OUTPUT)test-cplus-demangle.bin:
|
||||
|
|
|
|||
Loading…
Reference in a new issue