From patchwork Tue Oct 31 15:34:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 160167 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp325041vqg; Tue, 31 Oct 2023 08:35:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGuGWCenk93RM119pOT5JRpIfX6vU25W239rGj3YzIXO0nIfKZd8+a45bbVfEq/DeG9v7j4 X-Received: by 2002:a17:90b:310b:b0:27d:2601:bc92 with SMTP id gc11-20020a17090b310b00b0027d2601bc92mr3889137pjb.11.1698766506094; Tue, 31 Oct 2023 08:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698766506; cv=none; d=google.com; s=arc-20160816; b=B7BeVSURnQdL7xstOfklqIwN5xl4eMlWwEk0mO50zdo2c1KIm9IL4VKwscX1SqnYkH uPIO1JzhYjDjmSmcp+rgIpJuF+1EWgoA8RBhcY4WnMhN1IxgH+fjbwjFVcq/DWZP8zO1 /XgSJNd11OQqL2ZFOJtWlBEoVKG1/whm5P0g3mAsU6oSVkSxmgG5M6KGoVpHbpE2ZsVT GFRDz6cSFG/fbgCb7XXqP3/JGZ3Nwwucfcx54sUU6d6AIJ7JbCEdgWJiprcijyjKCqJj CTh1yqByHGba6ZCRhkr7tn3RpjssRCyGr4IM/B7H+TmmFE5cGMvLHG20dd0+G5WuxRZk FXpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=8QvDamHNerbweFboURr8fY/jktPgO7TXKbBgGzNMPqw=; fh=ficwc02GdE+VePKm9rl4PU8GKgAUggfpuxAtr64RN+Q=; b=zhDeHDmbbb0kRJBrCpGsP02Tqv6TENDJzn4bn6nLlqMhQVkBMHxUoCuGK2c4t4b+Uo 3i40jsJHQQ+AxKnXAiXGU0Qq2mqqrWmwrP/+bq7b0t1XPljXFsoLY+KSqNAc/hR19ze+ gHina9Cpw8o7KZEhMXhYmoKYhlC6osBSx5jGHE5hlNIwztBeQm4zLaymNmkhfBkVUWJr W744RHeKh5CWRP3CotSo61TFI0ntgw+yi82Pp01VAOkL6UoolL56Lv1tlHWCnWhOGY6g Rh4HMhwM05kMmWtPdO0GgYLXfaZpV2Xa+8EdbFjGqVXWpC3yYUNikQ/DUjaGvq7RqJw4 IGtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f5LsMLu7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bk15-20020a17090b080f00b0027d33155aefsi1097745pjb.99.2023.10.31.08.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 08:35:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f5LsMLu7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 534B780BC528; Tue, 31 Oct 2023 08:35:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345064AbjJaPeq (ORCPT + 33 others); Tue, 31 Oct 2023 11:34:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345067AbjJaPek (ORCPT ); Tue, 31 Oct 2023 11:34:40 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F20F9F for ; Tue, 31 Oct 2023 08:34:35 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08CBBC433C7; Tue, 31 Oct 2023 15:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698766475; bh=i4tDbQFfZ/m9gnZQSeb+WZMIei+PMyfAWyJny7aA+0Y=; h=Date:From:To:Cc:Subject:From; b=f5LsMLu7M21KIiYnFNUSeHUzU7j4LhCj77vYOIdo11UunvCE4RFaJB17jADcexoCy w7jUDYutOv9wyFw/L+Wd0t4HdY+ciFneLVOvtfZrXcnOrML71Imwmg6vibWcEW7c1x CKBEGEYJJmr6zagY1NK6okJOuNj03MDbMvbgl6MDkaZdwLml2rxyYkLFi3V6CqYFTC gW0JlAtPQ8m6EWLKDwBJYptAIdaxStqfbAMyatFXcZPKcSnHFwdmEbp0sNl/vS68G5 4/BKeWetLcQ9yJbG09tUA1fAINPE7wfRecGXAtRrq+Rk01CSdLK0NApU7sL/LS8m1F FaTrfI404UhRw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id E0EA94035D; Tue, 31 Oct 2023 12:34:31 -0300 (-03) Date: Tue, 31 Oct 2023 12:34:31 -0300 From: Arnaldo Carvalho de Melo To: Linux Kernel Mailing List Cc: Adrian Hunter , Ian Rogers , Jiri Olsa , Namhyung Kim Subject: [PATCH next 1/1] perf build: Warn about missing libelf before warning about missing libbpf Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 31 Oct 2023 08:35:03 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781285788295794583 X-GMAIL-MSGID: 1781285788295794583 As libelf is a requirement for libbpf if it is not available, as in some container build tests where NO_LIBELF=1 is used, then better warn about the most basic library first. Ditto for libz, check its availability before libbpf too. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim --- tools/perf/Makefile.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index b3e6ed10f40c6f6c..8b6cffbc485834c8 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -680,15 +680,15 @@ ifndef BUILD_BPF_SKEL endif ifeq ($(BUILD_BPF_SKEL),1) - ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),) - dummy := $(warning Warning: Disabled BPF skeletons as libbpf is required) - BUILD_BPF_SKEL := 0 - else ifeq ($(filter -DHAVE_LIBELF_SUPPORT, $(CFLAGS)),) + ifeq ($(filter -DHAVE_LIBELF_SUPPORT, $(CFLAGS)),) dummy := $(warning Warning: Disabled BPF skeletons as libelf is required by bpftool) BUILD_BPF_SKEL := 0 else ifeq ($(filter -DHAVE_ZLIB_SUPPORT, $(CFLAGS)),) dummy := $(warning Warning: Disabled BPF skeletons as zlib is required by bpftool) BUILD_BPF_SKEL := 0 + else ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),) + dummy := $(warning Warning: Disabled BPF skeletons as libbpf is required) + BUILD_BPF_SKEL := 0 else ifeq ($(call get-executable,$(CLANG)),) dummy := $(warning Warning: Disabled BPF skeletons as clang ($(CLANG)) is missing) BUILD_BPF_SKEL := 0