[lkml]   [2019]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 22/43] perf build: Add missing FEATURE_CHECK_LDFLAGS-libcrypto
From: Arnaldo Carvalho de Melo <>

When the libcrypto feature test was added we forgot to add its
FEATURE_CHECK_LDFLAGS pointing to the library needed to link with the
test-all.bin feature test fast path binary, so even when it was
introduced we got this:

$ cat /tmp/build/perf/feature/test-all.make.output
/usr/bin/ld: /tmp/ccjKeJJU.o: in function `main_test_libcrypto':
/home/acme/git/perf/tools/build/feature/test-libcrypto.c:10: undefined reference to `MD5_Init'
/usr/bin/ld: /home/acme/git/perf/tools/build/feature/test-libcrypto.c:11: undefined reference to `MD5_Update'
/usr/bin/ld: /home/acme/git/perf/tools/build/feature/test-libcrypto.c:12: undefined reference to `MD5_Final'
/usr/bin/ld: /home/acme/git/perf/tools/build/feature/test-libcrypto.c:14: undefined reference to `SHA1'
collect2: error: ld returned 1 exit status
$ cat /tmp/build/perf/feature/test-libcrypto.
test-libcrypto.bin test-libcrypto.d test-libcrypto.make.output
$ cat /tmp/build/perf/feature/test-libcrypto.make.output

Fix it, so that we keep the fast path, which, at this point, will fail
with the unwind-ARCH feature tests, that will be fixed in a followup

$ make -C tools/perf O=/tmp/build/perf
... libcrypto: [ on ]
$ cat /tmp/build/perf/feature/test-all.make.output
$ ldd /tmp/build/perf/feature/test-all.bin | grep libcrypto => /lib64/ (0x00007f9892805000)
$ grep libcrypto /tmp/build/perf/FEATURE-DUMP

With the unwind-ARCH tests fixed, we now finally manage to get
test-all.bin built and linked with the features it tests, among them the
ones fixed in this patchkit:

$ ldd /tmp/build/perf/feature/test-all.bin | egrep 'unwind|crypto' => /lib64/ (0x00007f95cf2b8000) => /lib64/ (0x00007f95cf294000) => /lib64/ (0x00007f95cf278000)

Cc: Adrian Hunter <>
Cc: Andi Kleen <>
Cc: Carl Love <>
Cc: David Ahern <>
Cc: Jiri Olsa <>
Cc: John McCutchan <>
Cc: Namhyung Kim <>
Cc: Pawel Moll <>
Cc: Peter Zijlstra <>
Cc: Sonny Rao <>
Cc: Stephane Eranian <>
Cc: Sukadev Bhattiprolu <>
Fixes: 8ee4646038e4 ("perf build: Add libcrypto feature detection")
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/Makefile.config | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 4b735042cad7..0f11d5891301 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -114,6 +114,8 @@ FEATURE_CHECK_LDFLAGS-libunwind-aarch64 = -lunwind -lunwind-aarch64
FEATURE_CHECK_LDFLAGS-libunwind-x86 = -lunwind -llzma -lunwind-x86
FEATURE_CHECK_LDFLAGS-libunwind-x86_64 = -lunwind -llzma -lunwind-x86_64

+FEATURE_CHECK_LDFLAGS-libcrypto = -lcrypto
 \ /
  Last update: 2019-02-15 01:50    [W:0.173 / U:37.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site