perf check: Allow showing a tip for opt-in features not built into perf
Ingo reported that it was difficult to understand why libunwind support
didn't link even when he had the usual libunwind-dev files installed in
his machine.
This is because libunwind became opt-in, the user has to use
LIBUNWIND=1, as it was deemed stalled in its development/unsuitable for
use with perf, IIRC, and so we better use the elfutils equivalent
routine that we also supported for ages.
But the build message still printed:
Auto-detecting system features:
... libdw: [ on ]
... glibc: [ on ]
<SNIP>
... libcrypto: [ on ]
... libunwind: [ OFF ]
<SNIP>
Which is confusing, so allow for having a tip when 'perf version
--build-options' is used, and variants with 'perf check feature':
$ perf version --build-options | grep libunwind
libunwind: [ OFF ] # HAVE_LIBUNWIND_SUPPORT ( tip: Deprecated, use LIBUNWIND=1 and install libunwind-dev[el] to build with it )
$
$ perf check feature libunwind
libunwind: [ OFF ] # HAVE_LIBUNWIND_SUPPORT ( tip: Deprecated, use LIBUNWIND=1 and install libunwind-dev[el] to build with it )
$
The next patches will remove the opt-in libunwind FEATURES_DISPLAY.
Reported-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/Z--pWmTHGb62_83e@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>