Em Fri, Mar 30, 2018 at 05:27:14PM +0800, Jin Yao escreveu:
This patch checks the values passed by CFLAGS (-DHAVE_XXX) and then
print the status of libraries.
For example, if HAVE_DWARF_SUPPORT is defined, that means the
library "dwarf" is compiled-in. The patch will print the status
"on" for this library otherwise it print the status "OFF".
A new option '--build-options' created for 'perf version' supports
the printing of library status.
For example:
$ ./perf version --build-options
or
./perf --version --build-options
or
./perf -v --build-options
perf version 4.13.rc5.g6727c5
dwarf: [ on ] # HAVE_DWARF_SUPPORT
dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT
glibc: [ on ] # HAVE_GLIBC_SUPPORT
gtk2: [ on ] # HAVE_GTK2_SUPPORT
libaudit: [ OFF ] # HAVE_LIBAUDIT_SUPPORT
Ok, while testing this I noticed the above, which may be distracting,
i.e. on x86-64 and s/390 not having libaudit means nothing, it is not
needed for anything.
It is only needed for architectures where HAVE_SYSCALL_TABLE is not
defined, that, btw, is not listed here, so I suggest that we stop
printing this "libaudit [ OFF ]" line if HAVE_SYSCALL_TABLE is
available, and also add a line for HAVE_SYSCALL_TABLE.
Anyways, this can be done on top of this series, but please do a grep
looking for other HAVE_* to fix, and we need to rename
HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT...
- Arnaldo