Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp385799imk; Sat, 2 Jul 2022 21:59:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uPNcP+bQQyNbbf3e3ba677fHSFyrBoc3Y6MqOuujBzaXNzOfgGoNKZ9GBeXDKHbQ5vv89t X-Received: by 2002:a05:6402:50ce:b0:435:a2bf:e44d with SMTP id h14-20020a05640250ce00b00435a2bfe44dmr29886328edb.386.1656824383405; Sat, 02 Jul 2022 21:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656824383; cv=none; d=google.com; s=arc-20160816; b=Cm5H6BRVMjdIkNp/dBSqWOjUz4XWubyFifLkj0CGXFdb9GO3N1B20zQoztJnTDrndY nrjRFJUhXBA4GUUix57NFptqzPXdqB/vjRQ4ZBcYH6TCafJ0HXCCa023EIWFaKFqZItv pXlcPp4Rsu9tTOBEs+/ivPs3DQgi6Siax4wFGY3Gjs2wIHqjRWAKUflyPU+hwc+88RVb YlsuTSP55PWztqn4AKZ7/2I5BXUarMW9hkw/8nVFSJmW6EB3HnP/n91oHieuru+MMWP9 /0a1finvdkQtIujvxU8UnY7bEpwkhORWnXd/UiROn4WayZO+VQoKrEhbm8BcS0HKpZlz GF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=8zhhLjJ89Qw5KLPBoM2NWX+z2yUV9FRU26MVhOWZvb0=; b=GIqUT677ZiyuSBMqujFDsxh2P98H/OfwbcVLn45QpeG3US45Lr1Bhamd4ujuLMQE4v Ee1pgcX3p4UKgEwFMpjBswucr9OSNi7GV0TF4jYPNFLqF6CNiE9QxWyDIkdjRtiYsHPu /9GJ0qWB7BulbH/S29rRX3j5iHFpdgd0Honlo28dk0GZiqnzsHhCdBjga/TlmFcBs+qY /ldS/Ugp3kkt/E/vUW/zs+MHEcTlZaYfX5PLBMTJ5lkyQK9ZqhjB7Ezgyst6JG+TsIgN zLzfudoBKcXuZyk7QQrFTEpjcA3jQlVsQtsDilkdJIJ4Soa+rWLPRTpN3kYcykMIBbyi RVWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm2 header.b=FShGDMda; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=hUB290Mq; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020aa7db89000000b004356d05bdddsi2979094edt.42.2022.07.02.21.59.18; Sat, 02 Jul 2022 21:59:43 -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=@anarazel.de header.s=fm2 header.b=FShGDMda; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=hUB290Mq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231727AbiGCEsm (ORCPT + 99 others); Sun, 3 Jul 2022 00:48:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbiGCEsU (ORCPT ); Sun, 3 Jul 2022 00:48:20 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A494D6B for ; Sat, 2 Jul 2022 21:48:17 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 0088D3200901; Sun, 3 Jul 2022 00:48:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 03 Jul 2022 00:48:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1656823695; x=1656910095; bh=8z hhLjJ89Qw5KLPBoM2NWX+z2yUV9FRU26MVhOWZvb0=; b=FShGDMdahrDjiEPIwF jVQwZBnmhxwI+RNwrmf/n7TzocoKR62qY/LBRf1gX24BvI9WhY6Tn6xQY6bBpgie 90A1nLlL6ecW7hx6cb1BMcHjqnK2hRb6E37xerO/q4Dd06us9zg1xC3GHS53H24G a25SpG4E+7IPKtAGth7uSTQ8DEZKBQq0JhKPlBDuNqkWg/NPOE7mJDdz1hhwiVcY /W5ZanyQil5DkS0QIYNiMiNY/PipefJ90GEWcw6G95PQuQYBF9bsTpkezL4sclA5 fKX12BmMXHi4RBfMYElwgvmwuFAlWwC1PpenTZYkPF9+/qW6upb1XltUDrujRG/E uJUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1656823695; x=1656910095; bh=8zhhLjJ89Qw5K LPBoM2NWX+z2yUV9FRU26MVhOWZvb0=; b=hUB290MqM2JiQRKvBax6qf6BCXfw0 XLep+6Aoq+zBUqQxyIkha0zBx+I+PcG9/M+kuufZtUIiBisqIl7qxvcjwOvgfBGM 9R+XV3iWdpp2tZGAPYjS05UrnXQG6BcwWqYgBJKzKZZBe7AmzDRW2bTsbEAfM5G9 X9vYxqEGVVatnpbxHckjQ3jobCSlvernMkvZVCET+BVVfBHKZZXgfR551AGhj0L+ qT1NyXfNjhn6O/eedo7DTv7y8TNe3M7fbiOfRLAzShR7cmPuIgld5Wn8DB2lC4BV /MUpDX0xnxoBd2JXpDbI5G9JaSOe2WwQ54yqT0x9MXief2JT6iDEsM23A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehiedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepteduuefhtdeuudejfefgteeivdeuheeiueelueehgffgvdefgfehgeel geehvddtnecuffhomhgrihhnpehsohhurhgtvgifrghrvgdrohhrghenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghr rgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Jul 2022 00:48:15 -0400 (EDT) From: Andres Freund To: linux-kernel@vger.kernel.org Cc: Quentin Monnet , Alexei Starovoitov , Arnaldo Carvalho de Melo , Jiri Olsa Subject: [PATCH v1 0/3] tools: fix compilation failure caused by init_disassemble_info API changes Date: Sat, 2 Jul 2022 21:48:10 -0700 Message-Id: <20220703044814.892617-1-andres@anarazel.de> X-Mailer: git-send-email 2.35.1.677.gabf474a5dd In-Reply-To: <20220622231624.t63bkmkzphqvh3kx@alap3.anarazel.de> References: <20220622231624.t63bkmkzphqvh3kx@alap3.anarazel.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, 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 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 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 wasn't sure whether the split of the commits conforms with the kernel habits should the changes to tools/bpf and tools/perf be split into separate commits? Nor was I sure if I 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... Andres Freund (3): tools build: add feature test for init_disassemble_info API changes tools: add dis-asm-compat.h to centralize handling of version differences tools: Use tools/dis-asm-compat.h to fix compilation errors with new binutils To: bpf@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: Quentin Monnet Cc: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa tools/bpf/Makefile | 7 ++- tools/bpf/bpf_jit_disasm.c | 5 +- tools/bpf/bpftool/Makefile | 7 ++- tools/bpf/bpftool/jit_disasm.c | 40 +++++++++++--- 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, 135 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.35.1.677.gabf474a5dd