Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6250753rwr; Tue, 9 May 2023 12:24:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Kkf8XnBk3GTpCsTqUa7YTPLx6PMLibMZUZnnovB0yDqvL6n5LyVAZihNiZpSgwPHtESMz X-Received: by 2002:a17:90a:6ac4:b0:24e:1ae5:1bed with SMTP id b4-20020a17090a6ac400b0024e1ae51bedmr14725904pjm.16.1683660278144; Tue, 09 May 2023 12:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683660278; cv=none; d=google.com; s=arc-20160816; b=Gvmj1S8UEG+dBBwXA3EOuFvWLYEm6MVZ9DIt+2AHr7UeGUKWBewHSTCdAvn3lziMKm SAtftLWnim/DY4pdlUqdDskopLDlls3eUmFWR0mLhlvFgZvm+YjcrnnRrDMd3glzSgvT H6V/1mz+/NSRDMjv22y9Jj59NvMfi+nIjWY97Q8Ms00c/la7brQop+IQPtnW6gKRvkx0 AXfxZzRy9aZ27Cq3NaBN9jxNHbWvwHTFME1bLQc3lX111dSDNe448W/gVS8RxpREmqdm eGBaO00deh9lWE7uQUNU9TxjGYeMrioEtxDJQT5Deb2Ni3sm+fEjwhIAiZwIA5LOlWwH Y5Aw== 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:date:from:dkim-signature; bh=cgWCiGkQTALl0i92ZMPzKhrU04PC3r9JkzGT//gCMRc=; b=0eZN2lCWma1+Ut0ehHo7YPbY3IbuJoMSBuTkCIm7aNIQr507/MYeC2gQq5g01FoI20 lKlWzRWkC6l/HEGXvoluuShyvi2In2Ov17STw42Onf9g6nIh2DL9gF0K5PTJW3S++2E4 u1AtPq0VaBbj/dc7nmvHaFTp3s6XdcRrGbAnGHvMJFlgx4t/U+UYNejh1JxtdiF8Zk5P H2dKjq6IBEWSjQYPH9ZU5Xu4lo71Pxni1K20qFvhe0AqUm3JygNfKKE+yPAWu4PZah0I uhVuaFJmRYf7QYG/Tz3riO/JMBNhH8q+LSUvnHjJvShARsJ/hnQWJF9qzM7xTLakEGRr sw6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=io46sRON; 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 i1-20020a17090a058100b0024c0c3c81e4si15341825pji.83.2023.05.09.12.24.23; Tue, 09 May 2023 12:24:38 -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=20221208 header.b=io46sRON; 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 S234098AbjEISvA (ORCPT + 99 others); Tue, 9 May 2023 14:51:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjEISu7 (ORCPT ); Tue, 9 May 2023 14:50:59 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7178B2D43; Tue, 9 May 2023 11:50:58 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-39427327edbso170731b6e.3; Tue, 09 May 2023 11:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683658257; x=1686250257; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=cgWCiGkQTALl0i92ZMPzKhrU04PC3r9JkzGT//gCMRc=; b=io46sRONIioDIH77mTLjFK+zJCHD3d3WZzrghFP51GxmNGEzI/fTJIcB+BNScSKcT1 b1nnmjW9FDO7IZL9N20wTx5hrUjjIVDv6MjjM+hxylUowO/3j/ClzQ4bdWO1FPHZV0mG 5rW43k/o+547bNy2UGFa/vua0dhkVuxSuEjjp1OM/88B9wmzm8kDj/4MTT+fHoQJFdVU VVwpjbFiNSY/IbhAYDLKdFSGgm9qYhelIIMe/qQZp6PnWkqbzVG1/y2rM+uj9Zx5+mMA cNWW9/zk94jS9hc4+1UFxP8j2XA7lLBzOGXQP43a5FDmys511r39fEk9D8Se4iiALO8Z fJ8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683658257; x=1686250257; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cgWCiGkQTALl0i92ZMPzKhrU04PC3r9JkzGT//gCMRc=; b=LbwpvuF54g/0ina7b6oag6+6w1O6cSyhUHl1KBWb7J0vyT4WMgxrwY9LMvjPagjriD CtN82i4NBMPLjoPzTvXncmEZVxi/QRCWpGRCfj8alR84cPvmFHss1p5zhdHPD73bzcb4 iSch9YD1IO94/Zl2gtjq+0qeFT+OQQIkPOPVxYZb/u+UQXJMQisS/uLwct/maWxmeVY1 PS8EKuJ0qYlof12tEuV+o/vpMnu9dT359h6VDhiqQjiLAHqFbRckJRe9vwuiHq84HouH 7mR38VzFZ8p+Ekabx+T66xAtaUCwa6VemkirWcum584zf/t3DnRdFTbPuBlt8gIG3o3e 38mg== X-Gm-Message-State: AC+VfDyKEzP0+62+w+jKlyezsCt4avtOGT3CvRtIYMjx0cGhZjhF9wGv ilG+PNtSmygTuf/06jIzgZk= X-Received: by 2002:a05:6808:10c:b0:38d:e097:aca1 with SMTP id b12-20020a056808010c00b0038de097aca1mr1568753oie.15.1683658257620; Tue, 09 May 2023 11:50:57 -0700 (PDT) Received: from quaco.ghostprotocols.net ([187.19.238.117]) by smtp.gmail.com with ESMTPSA id i3-20020aca3b03000000b0039208555951sm1489313oia.29.2023.05.09.11.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 11:50:57 -0700 (PDT) From: arnaldo.melo@gmail.com X-Google-Original-From: Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 39D11403B5; Tue, 9 May 2023 15:50:54 -0300 (-03) Date: Tue, 9 May 2023 15:50:54 -0300 To: Namhyung Kim Cc: Adrian Hunter , Andrii Nakryiko , Ian Rogers , Ingo Molnar , Jiri Olsa , Song Liu , Yang Jihong , Linux Kernel Mailing List , linux-perf-users@vger.kernel.org Subject: [PATCH 1/1] perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Namhyung, The one you acked disabled the build and emitted a warning, but then that was when we were trying to have BUILD_BPF_SKEL=1 as default, this one is for the current situation, where we need to explicitely ask for those features by explicitely adding BUILD_BPF_SKEL=1 to the make command line, I think I can keep your Acked-by, right? - Arnaldo --- Build BPF skels require having a compiler able to generate BPF bytecode, and so far this is only possible with clang, so check for its availability and fail the build when the user explicitely ask for BPF skels to be built. Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Andrii Nakryiko , Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Song Liu Cc: Yang Jihong , Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 4884520f954f4b2a..70268442f7eeca50 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -216,6 +216,12 @@ ifeq ($(call get-executable,$(BISON)),) dummy := $(error Error: $(BISON) is missing on this system, please install it) endif +ifeq ($(BUILD_BPF_SKEL),1) + ifeq ($(call get-executable,$(CLANG)),) + dummy := $(error $(CLANG) is missing on this system, please install it to be able to build with BUILD_BPF_SKEL=1) + endif +endif + ifneq ($(OUTPUT),) ifeq ($(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 371), 1) BISON_FILE_PREFIX_MAP := --file-prefix-map=$(OUTPUT)= -- 2.39.2