Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2649572imw; Sun, 10 Jul 2022 11:38:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vSFZ7e/LCGC1yeyv1FA7Y1/ge1vnMQV2jinADsOOn0A0fjagbWLZotlpA5oUh+T7XZEFMO X-Received: by 2002:a05:6402:35cf:b0:43a:d139:ea2b with SMTP id z15-20020a05640235cf00b0043ad139ea2bmr4004980edc.415.1657478284136; Sun, 10 Jul 2022 11:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657478284; cv=none; d=google.com; s=arc-20160816; b=qktLM1QI8r+0S+EFFeP/C5i0BokTcBzfhEzqSN+y/i78NXt/ug88uT18rTqAZSfMRy 8on1Qdvob0bZHsNwDcnX9TKdUyLjze5PncGZC6ZRvl1AJpzzoMPMG9scU9PtG2uiJyL0 EtkSBSwjWmUiGaOC4PSAcZ4wXBxGlJpyWoG1BkBkC7uzd3aRo60Flg6X2mN0YIxZYeli hlh81rueCV6ZFb0M9W0ZZXfVrgJqP9eSBlwvO2WsJQ2o1gi2XKHKm/p81eMhRmCpE2DC vUNP1CvgxrldpumbdPYPwt6EQhnHNYOf4hfigimtkx+Zw18NFYimIIJinF7z1RryUJyC c2TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=eSwcZesmzsEIOMZznmFtXUZFeRKLoTj+6EmfyIc9CJ0=; b=EPnkV17L7P5R+sMmEaDn+W10DewFfcSscyN72obk+EFXgFAKi/eJsJFb1GZCMS79Kt GBn05/pp4UAgYjoZedjfz7zB/1cPczbAlD/yPAFEVhrKD9FpgsJ6bS9X+yROuPf2aI2I NAHqluQ7o77xbf7E4godZKMin6RZ7f+FuFvnQ5WN3ab5JL1ic5WgFslh6VYtJf81KGqO lQM+Y18pgF4z3/v668ExU5JhVgllkaJo62fF+AbuRzeyt4g/y7lLC1ws7lWeEDC+eN44 VZb8t+F7qwhk3ohQJ3u7Qz7aysn7xDHVD+By2GzVjnAAhJUMOyrSnN7XaMB7T/0kl7os 0LTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lukMb3Wr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p24-20020aa7d318000000b0043a6defcbafsi6775025edq.219.2022.07.10.11.37.38; Sun, 10 Jul 2022 11:38:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lukMb3Wr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbiGJRxR (ORCPT + 99 others); Sun, 10 Jul 2022 13:53:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiGJRxO (ORCPT ); Sun, 10 Jul 2022 13:53:14 -0400 Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF2081055C; Sun, 10 Jul 2022 10:53:12 -0700 (PDT) Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-10c0e6dd55eso4444182fac.7; Sun, 10 Jul 2022 10:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=eSwcZesmzsEIOMZznmFtXUZFeRKLoTj+6EmfyIc9CJ0=; b=lukMb3WrJZnRVKi08+l/vnzxS7gK18/l3x4wMmDHbWNmHmDMY5VcmHt40eTeMDmulq Is6DaZ/pWaA/iZQv7rx4ohUI+as5x0Vh3Vm934TFqF/V10ZtFqQE3M4rsmLmakZr0tRB SV1qb7tm3RyHMZjDIrsqj5a9Qz7t/SND8kWGmbTrBONc5q+m29A1cQdi+EwA57uki6OR AnjgbwbNlFjAbel4NFLFfzoiP2rbp5t/0fWBtLFBFQMFGg8SdVDQauilForHInEZlPLv oiYFsHtt9ZxqQovj0wRPmMucscTh3hK18y325vP8/OwqojPVtttETB8d2oFY8NzK+PEA OJwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=eSwcZesmzsEIOMZznmFtXUZFeRKLoTj+6EmfyIc9CJ0=; b=VHvatbXaM4qGpxfvNM0GQB/2HQovFE8FUiuU6lRpDJuL9KtzEI2Tto7UStkS7Wb2Ct GzmyH7KHy79VhhvmPOaOTPmpd/UXeBOdkqbKrCIikZ+IFuKq010JpuUlXvqCvnAAutYF EjuR+JzbRAs9jfyUvkIx9Ek1U/TA3cRsGQ5sOpC/2Ezkqwq/8MbntmZhswuqK2Lk9rOt pnJnisuvio/sH8yr+U9KcCpV8hTkcswybFu+AteQ4F8qUKVGCrixi8Gclsr3oF4DDtLx oUzfdzL+TbDqfXm/n6W4sdZihbw51DtCN2SCgLWJ8ooAlUGu55e4HW/muf/y5nz15pZ5 u9eQ== X-Gm-Message-State: AJIora9RV0D/y0BsgjsLUyBiTp0dtxNI7TdBBI2BHiBrnxQgCrT5VYlw 9ob2gaIYuMGx28j4Z5Z+YpEq5Bb8Wlk8P3cTdI0= X-Received: by 2002:a05:6870:709f:b0:fe:2006:a858 with SMTP id v31-20020a056870709f00b000fe2006a858mr5405754oae.128.1657475592193; Sun, 10 Jul 2022 10:53:12 -0700 (PDT) MIME-Version: 1.0 References: <20220622231624.t63bkmkzphqvh3kx@alap3.anarazel.de> <20220703212551.1114923-1-andres@anarazel.de> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Sun, 10 Jul 2022 19:52:36 +0200 Message-ID: Subject: Re: [PATCH v2 0/5] tools: fix compilation failure caused by init_disassemble_info API changes To: Andres Freund Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Alexei Starovoitov , Arnaldo Carvalho de Melo , Jiri Olsa , Quentin Monnet Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 10, 2022 at 1:43 PM Sedat Dilek wrote: > > On Sun, Jul 3, 2022 at 11:25 PM Andres Freund wrote: > > > > binutils changed the signature of init_disassemble_info(), which now causes > > compilation failures for tools/{perf,bpf} on e.g. debian unstable. Relevant > > binutils commit: > > https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 > > > > HI, > > what was the base for this patchset? > I tried with Linux v5.19-rc5 and it doesn not apply cleanly. > More coffee. $ egrep 'Auto-detecting|disassembler' make-log_perf-python3.10-install_bin.txt 15:Auto-detecting system features: 36:... disassembler-four-args: [ on ] 37:... disassembler-init-styled: [ on ] Tested-by: Sedat Dilek # LLVM-14 (x86-64) -Sedat- > > > I first fixed this without introducing the compat header, as suggested by > > Quentin, but I thought the amount of repeated boilerplate was a bit too > > much. So instead I introduced a compat header to wrap the API changes. Even > > tools/bpf/bpftool/jit_disasm.c, which needs its own callbacks for json, imo > > looks nicer this way. > > > > I'm not regular contributor, so it very well might be my procedures are a > > bit off... > > > > I am not sure I added the right [number of] people to CC? > > > > WRT the feature test: Not sure what the point of the -DPACKAGE='"perf"' is, > > nor why tools/perf/Makefile.config sets some LDFLAGS/CFLAGS that are also > > in feature/Makefile and why -ldl isn't needed in the other places. But... > > > > V2: > > - split patches further, so that tools/bpf and tools/perf part are entirely > > separate > > - included a bit more information about tests I did in commit messages > > - add a maybe_unused to fprintf_json_styled's style argument > > > > Cc: Alexei Starovoitov > > Cc: Arnaldo Carvalho de Melo > > Cc: Jiri Olsa > > Cc: Sedat Dilek > > Cc: Quentin Monnet > > To: bpf@vger.kernel.org > > To: linux-kernel@vger.kernel.org > > Link: https://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de > > Link: https://lore.kernel.org/lkml/CA+icZUVpr8ZeOKCj4zMMqbFT013KJz2T1csvXg+VSkdvJH1Ubw@mail.gmail.com > > > > Andres Freund (5): > > tools build: add feature test for init_disassemble_info API changes > > tools include: add dis-asm-compat.h to handle version differences > > tools perf: Fix compilation error with new binutils > > tools bpf_jit_disasm: Fix compilation error with new binutils > > tools bpftool: Fix compilation error with new binutils > > > > tools/bpf/Makefile | 7 ++- > > tools/bpf/bpf_jit_disasm.c | 5 +- > > tools/bpf/bpftool/Makefile | 7 ++- > > tools/bpf/bpftool/jit_disasm.c | 42 ++++++++++++--- > > tools/build/Makefile.feature | 4 +- > > tools/build/feature/Makefile | 4 ++ > > tools/build/feature/test-all.c | 4 ++ > > .../feature/test-disassembler-init-styled.c | 13 +++++ > > tools/include/tools/dis-asm-compat.h | 53 +++++++++++++++++++ > > tools/perf/Makefile.config | 8 +++ > > tools/perf/util/annotate.c | 7 +-- > > 11 files changed, 137 insertions(+), 17 deletions(-) > > create mode 100644 tools/build/feature/test-disassembler-init-styled.c > > create mode 100644 tools/include/tools/dis-asm-compat.h > > > > -- > > 2.37.0.3.g30cc8d0f14 > >