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

tools build: Remove get_current_dir_name feature check

As perf no longer tests for this feature, and it was the only user,
remove the feature test.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
[ Remove the call to main_test_get_current_dir_name() from main() in test-all.c, otherwise it will always fail ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
79cc9b4b 062d02a9

-21
-1
tools/build/Makefile.feature
··· 68 68 libdw \ 69 69 eventfd \ 70 70 fortify-source \ 71 - get_current_dir_name \ 72 71 gettid \ 73 72 glibc \ 74 73 libbfd \
-4
tools/build/feature/Makefile
··· 8 8 test-libdw.bin \ 9 9 test-eventfd.bin \ 10 10 test-fortify-source.bin \ 11 - test-get_current_dir_name.bin \ 12 11 test-glibc.bin \ 13 12 test-gtk2.bin \ 14 13 test-gtk2-infobar.bin \ ··· 144 145 $(BUILD) -lelf 145 146 146 147 $(OUTPUT)test-eventfd.bin: 147 - $(BUILD) 148 - 149 - $(OUTPUT)test-get_current_dir_name.bin: 150 148 $(BUILD) 151 149 152 150 $(OUTPUT)test-glibc.bin:
-5
tools/build/feature/test-all.c
··· 22 22 # include "test-libelf.c" 23 23 #undef main 24 24 25 - #define main main_test_get_current_dir_name 26 - # include "test-get_current_dir_name.c" 27 - #undef main 28 - 29 25 #define main main_test_gettid 30 26 # include "test-gettid.c" 31 27 #undef main ··· 151 155 main_test_libpython(); 152 156 main_test_hello(); 153 157 main_test_libelf(); 154 - main_test_get_current_dir_name(); 155 158 main_test_gettid(); 156 159 main_test_glibc(); 157 160 main_test_libdw();
-11
tools/build/feature/test-get_current_dir_name.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - #define _GNU_SOURCE 3 - #include <unistd.h> 4 - #include <stdlib.h> 5 - 6 - int main(void) 7 - { 8 - free(get_current_dir_name()); 9 - return 0; 10 - } 11 - #undef _GNU_SOURCE