Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3916528rwe; Mon, 17 Apr 2023 05:37:50 -0700 (PDT) X-Google-Smtp-Source: AKy350aoOetwMatPGs86RAX/Dlu0003tbKd6OYh4hVjROYfUQPNMhPB+PnXd3NlboovHWgsr7/5y X-Received: by 2002:a05:6a20:1450:b0:ef:2389:66cb with SMTP id a16-20020a056a20145000b000ef238966cbmr8118992pzi.9.1681735070512; Mon, 17 Apr 2023 05:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681735070; cv=none; d=google.com; s=arc-20160816; b=Qy3cGkmh9Ns+aTAwkpPrCh6pM7UVxqRp1HICBm74ljwYJWWQgDQ45SzK6AA+KlwqBH ioHDs6d1nwalHS3f0pWV8jwGU9nG4I9XhdIgCJJgKZS2U//AELca2cymMx82iagli8Ls CdL6Vq92L9OrPeQOyPx5YnZuRDtJClhpuNp3vVHlUD0VUVMuKGPkQVUbsxKekxk/5SoL /hgLSnm36MBkg6ELF1Xv3M1L8Dexg1XyHzlxKlA7n41YIWFXb5sjge7EZgEh09UduGPt V1/pj2H/zlRnhCrTMvNcBV1hICITt0bFtsCVP9woyXinmCcc/jUX0W7Uod2JE1CjOa12 L69w== 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 :dkim-signature; bh=75hX5LgqItGx5RLX1YQ5Q6RKXg/GRTXjzOrDItgmVU8=; b=vIRzn9rICLau71AGrq00TLdVuJQw829D2F61ZTLoWSIAb/52UcPEjsISyp3qnzC1qn m/5LC71i079fumwNhFO0vlpImWQ86P5bIspS+ufR17YD3ZZGoyo2rNocUq66CyRb9+uq lMWTEnuRDrQPkftcBrZoNMiVHKONOpasj8xpjGoz+qRuMJgCfawoBgNFJIPPR1xyz8X5 1hINYI4boJCZvpdCX/eHBkh/iKtzTXRMomeSnUCfMwuQvG73ZnkVmrrt8sqRi3UhO9Yr zoMxUJeBUun6C20ovK6oi+nfympJPghl20ZFx2j8P8kCzkgvDlO3YCeO38Mv9o0sjlwH Y3VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bT94vu0Q; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w136-20020a627b8e000000b0063b5e9c3c28si9908577pfc.35.2023.04.17.05.37.39; Mon, 17 Apr 2023 05:37:50 -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=@linaro.org header.s=google header.b=bT94vu0Q; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbjDQMac (ORCPT + 99 others); Mon, 17 Apr 2023 08:30:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231144AbjDQMaX (ORCPT ); Mon, 17 Apr 2023 08:30:23 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 087225251 for ; Mon, 17 Apr 2023 05:30:15 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2a776fb84a3so12868881fa.1 for ; Mon, 17 Apr 2023 05:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681734614; x=1684326614; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=75hX5LgqItGx5RLX1YQ5Q6RKXg/GRTXjzOrDItgmVU8=; b=bT94vu0Q6QRHgkHMEux4pflaaEqrFFc9jX1D805hEY084GlZmJv+1LygxuvQew1edM hctSDM0hY+ODTMcO7zHmtX8MLfqUUeP5ImlX+GX6vSDzXx2oH5mueGc2ohwmreBqIgDI 5aBsWScygu9ggPb8ghX65lq+WFo54ITKOCDAQn5scP9waolP2+7UiCySk6p7FBWvJdOW +z9f3UsEORF2MNFIg4B7w0dVKtjBSwguQWZHQCRalTPBX4QZUSt6y09W8QfxqdaHDFPH i5QAfqKyUX1gTkREQBbNGvOqdmf4h1oXoeeCUgF7QJ8G2tNiG8DbvOcpPn+cMU3vRdaN iGKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681734614; x=1684326614; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=75hX5LgqItGx5RLX1YQ5Q6RKXg/GRTXjzOrDItgmVU8=; b=YldHogZSEePESd9+abDIEB7Jn/UT1bZfdiC3OJUm+jhJA+HlexnPbosF/9HfFauLSD 5ZCZ4d0H2hZ9HxeNSWzRKvlFHs4C5w6VChX/PjcMVSiCBMQAvfKiXjypCOhkp0PsgWNR aUUuQiC03BhCj3ptIxqhZtErvCSSHK7vbR9dMXaMY8Y67CcFxKlzSuo8HKIbzQmkvEFu +QcOCwHe3iQU5m87r59QvggEt/GMdAUPb5CMJ0PwaueNJgfRbHogilcim6TZOVKXOf/Q rgpLnDjb90riM5EG3k5O+Xgm4jUMxOv8s6+3V4fT3VXof0ElUv/IWBieWvgN1Eoh9us+ RtEA== X-Gm-Message-State: AAQBX9fJNAyflbZsMlcf/ZFyRNHrybK1ZcyQYJYO+L3kH4eVVW1z1DXF Py9IIldBibDtg/XbBfvXyDvV9A7Lwo+rkwCl3BtngQ== X-Received: by 2002:ac2:5a50:0:b0:4b3:d6e1:26bb with SMTP id r16-20020ac25a50000000b004b3d6e126bbmr1783540lfn.29.1681734613986; Mon, 17 Apr 2023 05:30:13 -0700 (PDT) Received: from localhost (c-9b0ee555.07-21-73746f28.bbcust.telenor.se. [85.229.14.155]) by smtp.gmail.com with ESMTPSA id d6-20020ac244c6000000b004eca2b8b6bdsm2027412lfm.4.2023.04.17.05.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 05:30:13 -0700 (PDT) From: Anders Roxell To: stable@vger.kernel.org Cc: acme@redhat.com, andres@anarazel.de, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Quentin Monnet , Alexei Starovoitov , Ben Hutchings , Jiri Olsa , Sedat Dilek , bpf@vger.kernel.org, Anders Roxell Subject: [backport PATCH 2/2] tools build: Add feature test for init_disassemble_info API changes Date: Mon, 17 Apr 2023 14:29:43 +0200 Message-Id: <20230417122943.2155502-3-anders.roxell@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417122943.2155502-1-anders.roxell@linaro.org> References: <20230417122943.2155502-1-anders.roxell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Andres Freund 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. Signed-off-by: Andres Freund Acked-by: Quentin Monnet Cc: Alexei Starovoitov Cc: Ben Hutchings Cc: Jiri Olsa Cc: Quentin Monnet Cc: Sedat Dilek Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-2-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Anders Roxell --- tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 4 ++++ tools/build/feature/test-disassembler-init-styled.c | 13 +++++++++++++ 4 files changed, 22 insertions(+) create mode 100644 tools/build/feature/test-disassembler-init-styled.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index e1d2c255669e..a789ccbad93a 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -69,6 +69,7 @@ FEATURE_TESTS_BASIC := \ libaio \ libzstd \ disassembler-four-args \ + disassembler-init-styled \ file-handle # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 221250973d07..33ab9823ad0d 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -17,6 +17,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 \ @@ -235,6 +236,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 09517ff2fad5..0cfbdc83ffbc 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -170,6 +170,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.39.2