From: arnaldo.melo@gmail.com
To: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.org>,
Jiri Olsa <jolsa@kernel.org>,
Kan Liang <kan.liang@linux.intel.com>,
Quentin Monnet <qmo@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: [PATCH 1/1] tools build: Remove libbfd from the set of expected libraries to build perf
Date: Wed, 16 Apr 2025 23:18:55 -0300 [thread overview]
Message-ID: <aABlDyhAYz95vOM1@x1> (raw)
The tools/build/feature/test-all.c file tries to build with the most
common set of libraries expected to be present to build perf, and these
days libbfd (binutils) isn't one since it was made opt-in via
BUILD_NONDISTRO=1 on the make command line as it has license issues.
Fix this by removing the tests from there.
Fixes: dd317df072071903 ("perf build: Make binutil libraries opt in")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/build/Makefile.feature | 12 ------------
tools/build/feature/Makefile | 2 +-
tools/build/feature/test-all.c | 19 -------------------
tools/perf/Makefile.config | 1 +
4 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 57bd995ce6afa318..da025a8040a9a154 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -42,17 +42,12 @@ endef
#
# All the others should have lines in tools/build/feature/test-all.c like:
#
-# #define main main_test_disassembler_init_styled
-# # include "test-disassembler-init-styled.c"
-# #undef main
-#
# #define main main_test_libzstd
# # include "test-libzstd.c"
# #undef main
#
# int main(int argc, char *argv[])
# {
-# main_test_disassembler_four_args();
# main_test_libzstd();
# return 0;
# }
@@ -60,7 +55,6 @@ endef
# If the sample above works, then we end up with these lines in the FEATURE-DUMP
# file:
#
-# feature-disassembler-four-args=1
# feature-libzstd=1
#
FEATURE_TESTS_BASIC := \
@@ -71,8 +65,6 @@ FEATURE_TESTS_BASIC := \
get_current_dir_name \
gettid \
glibc \
- libbfd \
- libbfd-buildid \
libelf \
libelf-getphdrnum \
libelf-gelf_getnote \
@@ -102,8 +94,6 @@ FEATURE_TESTS_BASIC := \
setns \
libaio \
libzstd \
- disassembler-four-args \
- disassembler-init-styled \
file-handle
# FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
@@ -119,8 +109,6 @@ FEATURE_TESTS_EXTRA := \
hello \
libbabeltrace \
libcapstone \
- libbfd-liberty \
- libbfd-liberty-z \
libopencsd \
cxx \
llvm \
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index b8b5fb183dd40693..76724931f68e1b92 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -110,7 +110,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) -DPACKAGE='"perf"' -lbfd -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) -lz -llzma -lzstd
__BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 03ddaac6f4c4dfa2..1010f233d9c1ad49 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -66,14 +66,6 @@
# include "test-libslang.c"
#undef main
-#define main main_test_libbfd
-# include "test-libbfd.c"
-#undef main
-
-#define main main_test_libbfd_buildid
-# include "test-libbfd-buildid.c"
-#undef main
-
#define main main_test_backtrace
# include "test-backtrace.c"
#undef main
@@ -158,14 +150,6 @@
# include "test-reallocarray.c"
#undef main
-#define main main_test_disassembler_four_args
-# include "test-disassembler-four-args.c"
-#undef main
-
-#define main main_test_disassembler_init_styled
-# include "test-disassembler-init-styled.c"
-#undef main
-
#define main main_test_libzstd
# include "test-libzstd.c"
#undef main
@@ -193,8 +177,6 @@ int main(int argc, char *argv[])
main_test_libelf_gelf_getnote();
main_test_libelf_getshdrstrndx();
main_test_libslang();
- main_test_libbfd();
- main_test_libbfd_buildid();
main_test_backtrace();
main_test_libnuma();
main_test_numa_num_possible_cpus();
@@ -213,7 +195,6 @@ int main(int argc, char *argv[])
main_test_setns();
main_test_libaio();
main_test_reallocarray();
- main_test_disassembler_four_args();
main_test_libzstd();
main_test_libtraceevent();
main_test_libtracefs();
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 9f08a6e96b351707..7e9aa3d910c2cdcc 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -917,6 +917,7 @@ ifneq ($(NO_JEVENTS),1)
endif
ifdef BUILD_NONDISTRO
+ $(call feature_check,libbfd)
ifeq ($(feature-libbfd), 1)
EXTLIBS += -lbfd -lopcodes
else
--
2.49.0
next reply other threads:[~2025-04-17 2:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 2:18 arnaldo.melo [this message]
2025-04-17 15:49 ` [PATCH 1/1] tools build: Remove libbfd from the set of expected libraries to build perf Ian Rogers
2025-04-17 21:58 ` Arnaldo Carvalho de Melo
2025-04-17 23:12 ` Ian Rogers
2025-04-18 15:23 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aABlDyhAYz95vOM1@x1 \
--to=arnaldo.melo@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=qmo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.