Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf build: The bfd features are opt-in, stop testing for them by default

These are leftovers noticed while updating a build container.

We don't need those so that test-all.c can build and thus speed up the
feature detection.

Test for those features only if the user asks for BUILD_NONDISTRO=1 to
build with libbfd.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250620212435.93846-4-acme@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Arnaldo Carvalho de Melo and committed by
Namhyung Kim
970ae863 7c750d39

+5 -19
-19
tools/build/feature/test-all.c
··· 66 66 # include "test-libslang.c" 67 67 #undef main 68 68 69 - #define main main_test_libbfd 70 - # include "test-libbfd.c" 71 - #undef main 72 - 73 - #define main main_test_libbfd_buildid 74 - # include "test-libbfd-buildid.c" 75 - #undef main 76 - 77 69 #define main main_test_backtrace 78 70 # include "test-backtrace.c" 79 71 #undef main ··· 150 158 # include "test-reallocarray.c" 151 159 #undef main 152 160 153 - #define main main_test_disassembler_four_args 154 - # include "test-disassembler-four-args.c" 155 - #undef main 156 - 157 - #define main main_test_disassembler_init_styled 158 - # include "test-disassembler-init-styled.c" 159 - #undef main 160 - 161 161 #define main main_test_libzstd 162 162 # include "test-libzstd.c" 163 163 #undef main ··· 177 193 main_test_libelf_gelf_getnote(); 178 194 main_test_libelf_getshdrstrndx(); 179 195 main_test_libslang(); 180 - main_test_libbfd(); 181 - main_test_libbfd_buildid(); 182 196 main_test_backtrace(); 183 197 main_test_libnuma(); 184 198 main_test_numa_num_possible_cpus(); ··· 195 213 main_test_setns(); 196 214 main_test_libaio(); 197 215 main_test_reallocarray(); 198 - main_test_disassembler_four_args(); 199 216 main_test_libzstd(); 200 217 main_test_libtraceevent(); 201 218 main_test_libtracefs();
+5
tools/perf/Makefile.config
··· 926 926 endif 927 927 928 928 ifdef BUILD_NONDISTRO 929 + $(call feature_check,libbfd) 930 + 929 931 ifeq ($(feature-libbfd), 1) 930 932 EXTLIBS += -lbfd -lopcodes 931 933 else ··· 956 954 957 955 CFLAGS += -DHAVE_LIBBFD_SUPPORT 958 956 CXXFLAGS += -DHAVE_LIBBFD_SUPPORT 957 + 958 + $(call feature_check,libbfd-buildid) 959 + 959 960 ifeq ($(feature-libbfd-buildid), 1) 960 961 CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT 961 962 else