[PATCH 3/5] perf build: Remove unused libbfd-buildid feature test

James Clark posted 5 patches 1 month, 2 weeks ago
[PATCH 3/5] perf build: Remove unused libbfd-buildid feature test
Posted by James Clark 1 month, 2 weeks ago
HAVE_LIBBFD_BUILDID_SUPPORT isn't used in the codebase so remove the
feature test that sets it.

Signed-off-by: James Clark <james.clark@linaro.org>
---
 tools/build/Makefile.feature              | 1 -
 tools/build/feature/Makefile              | 4 ----
 tools/build/feature/test-libbfd-buildid.c | 8 --------
 tools/perf/Makefile.config                | 7 -------
 4 files changed, 20 deletions(-)

diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index a7f030fc5e83..20422853d1ac 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -71,7 +71,6 @@ FEATURE_TESTS_BASIC :=                  \
         gettid				\
         glibc                           \
         libbfd                          \
-        libbfd-buildid			\
         libelf                          \
         libelf-getphdrnum               \
         libelf-gelf_getnote             \
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 87a5a908d6fa..63a97cdf78a3 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -13,7 +13,6 @@ FILES=                                          \
          test-gtk2-infobar.bin                  \
          test-hello.bin                         \
          test-libbfd.bin                        \
-         test-libbfd-buildid.bin		\
          test-disassembler-four-args.bin        \
          test-disassembler-init-styled.bin	\
          test-reallocarray.bin			\
@@ -267,9 +266,6 @@ $(OUTPUT)test-libpython.bin:
 $(OUTPUT)test-libbfd.bin:
 	$(BUILD_BFD)
 
-$(OUTPUT)test-libbfd-buildid.bin:
-	$(BUILD_BFD) || $(BUILD_BFD) -liberty || $(BUILD_BFD) -liberty -lz
-
 $(OUTPUT)test-disassembler-four-args.bin:
 	$(BUILD_BFD) -lopcodes || $(BUILD_BFD) -lopcodes -liberty || \
 	$(BUILD_BFD) -lopcodes -liberty -lz
diff --git a/tools/build/feature/test-libbfd-buildid.c b/tools/build/feature/test-libbfd-buildid.c
deleted file mode 100644
index 157644b04c05..000000000000
--- a/tools/build/feature/test-libbfd-buildid.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <bfd.h>
-
-int main(void)
-{
-	bfd *abfd = bfd_openr("Pedro", 0);
-	return abfd && (!abfd->build_id || abfd->build_id->size > 0x506564726f);
-}
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 594fe3ecfee0..5ff98b89c39a 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -927,7 +927,6 @@ ifdef BUILD_NONDISTRO
   $(call feature_check,libbfd)
   $(call feature_check,disassembler-four-args)
   $(call feature_check,disassembler-init-styled)
-  $(call feature_check,libbfd-buildid)
   $(call feature_check,libbfd-liberty)
   $(call feature_check,libbfd-liberty-z)
 
@@ -945,12 +944,6 @@ ifdef BUILD_NONDISTRO
   CXXFLAGS += -DHAVE_LIBBFD_SUPPORT
   $(call detected,CONFIG_LIBBFD)
 
-  ifeq ($(feature-libbfd-buildid), 1)
-    CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT
-  else
-    $(warning Old version of libbfd/binutils things like PE executable profiling will not be available)
-  endif
-
   ifeq ($(feature-disassembler-four-args), 1)
     CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE
   endif

-- 
2.34.1