Hi,

On Wed, Jan 26, 2022 at 01:47:42AM +0100, Ben Hutchings wrote:
> Control: tag -1 patch
> 
> The patch add_cmake_libbpf_enabled_option.patch is indeed the problem,
> because it doesn't consistently use the same macro name.  The fix is
> below.
> 
> If you're not able to upload with this today, can I please NMU to
> unblock linux?
> 
> Ben.
> 
> --- a/debian/patches/add_cmake_libbpf_enabled_option.patch
> +++ b/debian/patches/add_cmake_libbpf_enabled_option.patch
> @@ -5,6 +5,8 @@ Non-linux systems also can make good use of these tools. This 
> patch
>  adds option LIBBPF_ENABLED (default: on) so to opt-out BPF when needed.
>  
>  Signed-off-by: Domenico Andreoli <domenico.andre...@linux.com>
> +[bwh: Only check the macro HAVE_BPF, not HAVE_BTF]
> +Signed-off-by: Ben Hutchings <b...@debian.org>
>  ---
>   CMakeLists.txt |   61 
> +++++++++++++++++++++++++++++++++------------------------
>   dwarves.c      |    2 ++
> @@ -193,7 +195,7 @@ Index: b/pahole.c
>               cu__fprintf_ptr_table_stats_csv(cu, stderr);
>       }
>   
> -+#ifdef HAVE_BTF
> ++#ifdef HAVE_BPF
>       if (btf_encode) {
>               static pthread_mutex_t btf_lock = PTHREAD_MUTEX_INITIALIZER;
>   
> @@ -241,7 +243,7 @@ Index: b/pahole.c
>       type_instance__delete(header);
>       header = NULL;
>   
> -+#ifdef HAVE_BTF
> ++#ifdef HAVE_BPF
>       if (btf_encode) {
>               err = btf_encoder__encode(btf_encoder);
>               if (err) {
> @@ -257,7 +259,7 @@ Index: b/pahole.c
>   #ifdef DEBUG_CHECK_LEAKS
>       cus__delete(cus);
>       structures__delete();
> -+#ifdef HAVE_BTF
> ++#ifdef HAVE_BPF
>       btf__free(conf_load.base_btf);
>       conf_load.base_btf = NULL;
>   #endif

Tested against our current master (5.16.2-1~exp1) and fixes the issue.

Tested-by: Salvatore Bonaccorso <car...@debian.org>  

Regards,
Salvatore

Reply via email to