[PATCH, RFC] configure: Fix detection of BTF header to enable the BTF front-end
Čestmír Kalina
ckalina@redhat.com
Wed May 15 13:15:57 GMT 2024
On Wed, May 15, 2024 at 01:47:37PM GMT, Dodji Seketeli wrote:
> Hello,
>
> Cestmir Kalina reported that running configure with --enable-btf with
> no BTF header present on the system wrongly leads to the BTF
> front-end of libabigail being enabled, and later leads to
> compilation/installation errors.
>
> This patch fixes that by ensuring that the ENABLE_BTF variable set by
> the --enable-btf option handling code is not reused later during
> actual btf.h header file detection code.
>
> * configure.ac: Use a new HAS_BTF_HEADERS to store the detection
> status for the btf.h header. Emit a better notice message when
> the BTF header file is found.
>
> OK to apply to the mainline if it passes the CI tests?
> Thanks.
Tested-by: Cestmir Kalina <ckalina@redhat.com>
>
> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
> ---
> configure.ac | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c6e1ad64..e118a9c0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -391,10 +391,10 @@ dnl configure BTF usage
> BPF_LIBS=
> if test x$ENABLE_BTF != xno; then
> AC_CHECK_HEADER([bpf/btf.h],
> - [ENABLE_BTF=yes],
> + [HAS_BTF_HEADERS=yes],
> [AC_MSG_NOTICE([could not find bpf/btf.h])])
> - if test x$ENABLE_BTF = xyes; then
> - AC_MSG_NOTICE([enable BTF support])
> + if test x$HAS_BTF_HEADERS = xyes; then
> + AC_MSG_NOTICE([found BTF header file so enabling BTF support])
> ENABLE_BTF=yes
> AC_DEFINE([WITH_BTF], 1,
> [Defined if user enabled BTF usage])
> --
> 2.39.3
>
>
> --
> Dodji
>
More information about the Libabigail
mailing list