Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp995951imk; Sun, 3 Jul 2022 14:26:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t3en5bB7BA7Kaj66aH+cVUWDhGSr6XWmuLtv0+4IYk5oObnRmBN0tD4GcfRGOGDAT0HEtU X-Received: by 2002:a17:90b:3b81:b0:1ed:3655:d0c8 with SMTP id pc1-20020a17090b3b8100b001ed3655d0c8mr33185658pjb.56.1656883612981; Sun, 03 Jul 2022 14:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656883612; cv=none; d=google.com; s=arc-20160816; b=M7PSQJD3okkSDrvPlThRdiGiaOvekkq1+3MnbPOWOXzpAv8NMZ+CrFlq3Wm4i7aKA3 /1/XoMTvx93RHh29De865MOmtrNKzAcp9EjZ3vcxGlroBcXdoWjycCyzFYdpTGcmQ+Ov QjXLV/cNuvQddflBk9q/U5+HDs4WLD8Ovebc342d96VT7qg8B4TzpTZHkanWBKLlbkL/ HJGTlSlcWa0JEG8rvv0A+sym85n40yqDwe8bSG+cBaddMqlgTR/PJ+aAfQuHXvdw5S9s aITVTua3hkhlFRYpRhX+gONhLKuicXgz1nKB1sK9eV+g8E/8rWKBLL07dqdjk5PexEc/ IB1Q== 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=nU1WBasI1CUyTtj7GqIhMjBF+5+nCEgecH1nACNQeNA=; b=E20nJna/rDVfYIRlOJC8To2tsuhhlj+P0v6HCRrKkyL4+El9FI+YWREt3MpejBWDcZ hnDR9434a9UnZVkDbo+LUYDrsSmZkmzmZLL/U6eJW827wG2l8ID3uvJrytiHV0rkEMkV FAixSHImDtEIu2j6PqoQnutezCb8++eBX0KVlBAG+VR/ZUtN+J0/MJBVY91k5wxVytBp MrsGcYfdnADQShOm2o/38CKV5+bKdtIlOf14ZQS9tePAIM2UlHH/WS2w/gsQQEDJgF9y YWlnnHSFYI6Sf90ttTYOc8y6WvHvXvdYp+wAtWm4RX9O5AAkuZSAFVBw1nQ1yM5Pri9d /ZLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm2 header.b=TPf9MSrr; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=gXECe2Kn; 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 g28-20020a63201c000000b003fd916fc798si15555228pgg.188.2022.07.03.14.26.39; Sun, 03 Jul 2022 14:26:52 -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=TPf9MSrr; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=gXECe2Kn; 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 S231337AbiGCVZ7 (ORCPT + 99 others); Sun, 3 Jul 2022 17:25:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbiGCVZ6 (ORCPT ); Sun, 3 Jul 2022 17:25:58 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 600D85F46; Sun, 3 Jul 2022 14:25:56 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 74EBB5C00B9; Sun, 3 Jul 2022 17:25:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 03 Jul 2022 17:25:53 -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=1656883553; x=1656969953; bh=nU 1WBasI1CUyTtj7GqIhMjBF+5+nCEgecH1nACNQeNA=; b=TPf9MSrrVx5dcJCbEI fDpDriAq7o1s7R9msbQlnuWUEQs21WQP5Km1V7AYclffPLLdvb1TTuid90AnU3sf 0Z9VCb5krpQ+zg7QzvMLFHpQddPHVM8arHx15sBZyb9XYNRmheTPM7/ShUNMmQH/ qWhEAS4S5YnWazM3qTmGzGgOSsiTey10X+39UPp9h21KlL/GdzEx6kvqNa1Tt5Ya LIMRbmkRxlKLyN9LqSvhw7E6nzwAHcIklEt15t7cWAk2Fzr7MZPu0N/j7/w3zKzE sDFgnY4ZCWQu9nkrqKBQWP7SRjTqvyYecJ+FU3uGrqgTptIN8YA+Wzj4D/n97XBb wAwA== 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=1656883553; x=1656969953; bh=nU1WBasI1CUyT tj7GqIhMjBF+5+nCEgecH1nACNQeNA=; b=gXECe2Kn7PtEp4J3pFepQ1qQIZ5U3 EeEUARXQFldkAxGdbEWPKS6XC0uodTG4t5ib36RsCw0bnbtQ5MmidMus1fS7Danw H6ltrmfSOqzbT5gHicKlL6+uOvB4WtEMwKR0x7xpG2HojlrJ8nQZEGzRrBnhPCbR hn2jU8PF8bZK2oflqXdoDQpqmgzz+LOy1Qu2Y9DpUBN5Jp2VV3hgW0asFrLrJ4jV K8Fr9Ip9QvPkGyWnBlI/p8gsedTzsP2Ft1MlEcE75YYZz4YXB/Lp7rk0xv58SNQH 4mVdWZUPb1gIlwNu4dSRWlbem+QkqWBRRdYOsv3mQy9/teWZknP/TpfxA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehjedgudeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhgu rhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtf frrghtthgvrhhnpeeljefgvdefhfdukedttdevgedtkeeigefftdekleejteduveffledt ieefueegieenucffohhmrghinhepshhouhhrtggvfigrrhgvrdhorhhgpdhkvghrnhgvlh drohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Jul 2022 17:25:52 -0400 (EDT) From: Andres Freund To: bpf@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexei Starovoitov , Arnaldo Carvalho de Melo , Jiri Olsa , Sedat Dilek , Quentin Monnet Subject: [PATCH v2 1/5] tools build: add feature test for init_disassemble_info API changes Date: Sun, 3 Jul 2022 14:25:47 -0700 Message-Id: <20220703212551.1114923-2-andres@anarazel.de> X-Mailer: git-send-email 2.37.0.3.g30cc8d0f14 In-Reply-To: <20220703212551.1114923-1-andres@anarazel.de> References: <20220622231624.t63bkmkzphqvh3kx@alap3.anarazel.de> <20220703212551.1114923-1-andres@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}, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 This commit adds a feature test to detect the new signature. Subsequent commits will use it to fix the build failures. Cc: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Sedat Dilek Cc: Quentin Monnet Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Signed-off-by: Andres Freund --- tools/build/Makefile.feature | 4 +++- tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 4 ++++ tools/build/feature/test-disassembler-init-styled.c | 13 +++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 tools/build/feature/test-disassembler-init-styled.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 888a0421d43b..339686b99a6e 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -70,6 +70,7 @@ FEATURE_TESTS_BASIC := \ libaio \ libzstd \ disassembler-four-args \ + disassembler-init-styled \ file-handle # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list @@ -135,7 +136,8 @@ FEATURE_DISPLAY ?= \ bpf \ libaio \ libzstd \ - disassembler-four-args + disassembler-four-args \ + disassembler-init-styled # Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features. # If in the future we need per-feature checks/flags for features not diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 7c2a17e23c30..c3059739318a 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -18,6 +18,7 @@ FILES= \ test-libbfd.bin \ test-libbfd-buildid.bin \ test-disassembler-four-args.bin \ + test-disassembler-init-styled.bin \ test-reallocarray.bin \ test-libbfd-liberty.bin \ test-libbfd-liberty-z.bin \ @@ -248,6 +249,9 @@ $(OUTPUT)test-libbfd-buildid.bin: $(OUTPUT)test-disassembler-four-args.bin: $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes +$(OUTPUT)test-disassembler-init-styled.bin: + $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes + $(OUTPUT)test-reallocarray.bin: $(BUILD) diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 5ffafb967b6e..957c02c7b163 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -166,6 +166,10 @@ # include "test-disassembler-four-args.c" #undef main +#define main main_test_disassembler_init_styled +# include "test-disassembler-init-styled.c" +#undef main + #define main main_test_libzstd # include "test-libzstd.c" #undef main diff --git a/tools/build/feature/test-disassembler-init-styled.c b/tools/build/feature/test-disassembler-init-styled.c new file mode 100644 index 000000000000..f1ce0ec3bee9 --- /dev/null +++ b/tools/build/feature/test-disassembler-init-styled.c @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include + +int main(void) +{ + struct disassemble_info info; + + init_disassemble_info(&info, stdout, + NULL, NULL); + + return 0; +} -- 2.37.0.3.g30cc8d0f14