Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH 1/1 v6.19-rc] tools build: Fix the common set of features test wrt libopenssl
@ 2025-12-26 19:09 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; only message in thread
From: Arnaldo Carvalho de Melo @ 2025-12-26 19:09 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Adrian Hunter, Ian Rogers, James Clark, Jiri Olsa,
	Linux Kernel Mailing List, linux-perf-users

The recent introduction of the libopenssl feature test forgot to add the
-lssl to the test-all.o target, which made it always fail, fix it.

Noticed by looking at this file after building:

  $ cat /tmp/build/perf-tools/feature/test-all.make.output
  /usr/bin/ld: /tmp/ccBhO8WH.ltrans0.ltrans.o: in function `main':
  /home/acme/git/perf-tools/tools/build/feature/test-libopenssl.c:6:(.text.startup+0x2ed): undefined reference to `OPENSSL_init_ssl'
  collect2: error: ld returned 1 exit status
  $

It was added only to the individual ssl test, that works:

  $ cat /tmp/build/perf-tools/feature/test-libopenssl.make.output
  $ ldd /tmp/build/perf-tools/feature/test-libopenssl.bin | grep ssl
	libssl.so.3 => /usr/lib64/libssl.so.3 (0x00007fb81eda8000)
  $

Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: 7678523109d1d9ee ("tools/build: Add a feature test for libopenssl")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/feature/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index c699d4f4c6d935d0..0d5a15654b17b20a 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -107,7 +107,7 @@ all: $(FILES)
 __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
   BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
   BUILD_BFD = $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl
-  BUILD_ALL = $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -ldl -lz -llzma -lzstd
+  BUILD_ALL = $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -ldl -lz -llzma -lzstd -lssl
 
 __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
   BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1
-- 
2.52.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-26 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-26 19:09 [PATCH 1/1 v6.19-rc] tools build: Fix the common set of features test wrt libopenssl Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox