Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp743287rwb; Thu, 18 Aug 2022 11:21:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR7epmAyWNLEsDNGYbWzk8B8cSn6VL05+WEpS9Q+EjT+TdiOXd21rVW4YWSyHPZHNIP3jYbo X-Received: by 2002:a63:5f49:0:b0:41d:85a1:c4da with SMTP id t70-20020a635f49000000b0041d85a1c4damr3248266pgb.366.1660846905039; Thu, 18 Aug 2022 11:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660846905; cv=none; d=google.com; s=arc-20160816; b=VdpaCBzJ0SHuXtnJWmPcS5J6aCl5REID1R+Ek/L2Hhs0ed/4V6UZuHYStjDXdFqck0 PnC+Frzv9Fj500vqU1ygJxUVq/Hdx6or/NY95xjKZEi+wpRg8LtK0OeVILnjgmUNYDLC 7I578Q/OiwcAtZWo0NeAnt/NnP7uTztzo9an/giYeyCSoirHJeR0m3J++zH6ZhB9R9N3 8N09A6wF3CYjA+Uou0L/QW5FkmofY5901RiARcasTb/UpfiOyfw5zTKW++fcL9HY7Gvx ORjsAzg9DG8IJ4FDHcIJ7XerJoy4TMj4hwkr2ePNPzZVHHOuRQ5TfEeJN4iAvZnA+bUR z+cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Y/cAn0E5D5AU5a7M+krrdu/dy2q5ufmiBAxFZBQtMs4=; b=KaaE9eYr0IB2NpgsoU5Fuq76pgzP7GN3WNKpvQfRcT9P29jI7K8Q/zoPfvrv+THF2x xeqJzbsWsLRJoajqSBi8cNY/8muzBAF/5qLB/T50JUNRg9bzvD+CCPrbZOKYs8ylwYvA fTylRD6TtpTQViqYtsLGgB1XEIGTIQE2v7aLEDMXK8esw1/9JZnMAr2KgzWycbWdaI5o Fj51t24yimIDdDaKnyHsTHrpGwkeYVSXT+vvbGpo7VLvxiX0y1A9lj6k5uaqSeoJXfNQ 9NJiXNaJtpH+LgkE7tKuozAivdW6CA3sj7UGYFTjyLGsTzcQfiLXdmc1Ih+OtBDiFAZJ M1eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vAvdRdYB; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c4-20020a170903234400b0015f45278c31si1812502plh.233.2022.08.18.11.21.31; Thu, 18 Aug 2022 11:21:45 -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=@kernel.org header.s=k20201202 header.b=vAvdRdYB; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344055AbiHRSOL (ORCPT + 99 others); Thu, 18 Aug 2022 14:14:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238585AbiHRSOI (ORCPT ); Thu, 18 Aug 2022 14:14:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9504F47B94; Thu, 18 Aug 2022 11:14:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 39A0DB823A9; Thu, 18 Aug 2022 18:14:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0A3DC433D6; Thu, 18 Aug 2022 18:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660846443; bh=0gg07s0kGzT4ViYZPq8WstaAK0/6SvOT3SF9kcQbD+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vAvdRdYBhmyNF9gdV0ZDssdTuErtRHEkX4c5eaK1AdNYS/Vx97v+O9Gzpi9Cf82c+ lS7oSlebGIclK8IHn+tufEn3Pqql+zXSwK/MgIBZ3lqOrFzsZS6U7ZIfoKGN7PyxCO 9b3J7HZT1qay7d0PPp2hAJ3TZqjnGaC9KVcX/klxQenzh4D8peQPkgaZZ18IDTXNco I03TsZswsGDEDWJQqqvNbnSLg57S/ajKIXwExLKQOVc/8tMjy6l2kXjlbpM546mu8G sPXE/nUMTP6VcXVJHX6BgMgkPCgAVmJC35XF43Z5R21g8UMLZFXutbl/gD2LAi9uAb sIReUHqJ1oVaA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id BC7944035A; Thu, 18 Aug 2022 15:14:00 -0300 (-03) Date: Thu, 18 Aug 2022 15:14:00 -0300 From: Arnaldo Carvalho de Melo To: Quentin Monnet Cc: Roberto Sassu , peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Roberto Sassu Subject: Re: [PATCH 3/3] tools/build: Display logical OR of a feature flavors Message-ID: References: <20220818120957.319995-1-roberto.sassu@huaweicloud.com> <20220818120957.319995-3-roberto.sassu@huaweicloud.com> <71544d2970e246e1f0d5f5ec065ea2437df58cd9.camel@huaweicloud.com> <23da162e-1018-9bfa-bc5c-ec09eba9428b@isovalent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23da162e-1018-9bfa-bc5c-ec09eba9428b@isovalent.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Em Thu, Aug 18, 2022 at 05:40:04PM +0100, Quentin Monnet escreveu: > On 18/08/2022 14:25, Roberto Sassu wrote: > > On Thu, 2022-08-18 at 10:09 -0300, Arnaldo Carvalho de Melo wrote: > >> Em Thu, Aug 18, 2022 at 02:09:57PM +0200, > >> roberto.sassu@huaweicloud.com escreveu: > >>> From: Roberto Sassu > >>> > >>> Sometimes, features are simply different flavors of another > >>> feature, to > >>> properly detect the exact dependencies needed by different Linux > >>> distributions. > >>> > >>> For example, libbfd has three flavors: libbfd if the distro does > >>> not > >>> require any additional dependency; libbfd-liberty if it requires > >>> libiberty; > >>> libbfd-liberty-z if it requires libiberty and libz. > >>> > >>> It might not be clear to the user whether a feature has been > >>> successfully > >>> detected or not, given that some of its flavors will be set to OFF, > >>> others > >>> to ON. > >>> > >>> Instead, display only the feature main flavor if not in verbose > >>> mode > >>> (VF != 1), and set it to ON if at least one of its flavors has been > >>> successfully detected (logical OR), OFF otherwise. Omit the other > >>> flavors. > >>> > >>> Accomplish that by declaring a FEATURE_GROUP_MEMBERS- >>> flavor> > >>> variable, with the list of the other flavors as variable value. For > >>> now, do > >>> it just for libbfd. > >>> > >>> In verbose mode, of if no group is defined for a feature, show the > >>> feature > >>> detection result as before. > >> > >> Looks cool, tested and added this to the commit log message here in > >> my > >> local branch, that will go public after further tests for the other > >> csets in it: > >> > >> Committer testing: > >> > >> Collecting the output from: > >> > >> $ make -C tools/bpf/bpftool/ clean > >> $ make -C tools/bpf/bpftool/ |& grep "Auto-detecting system > >> features" -A10 > >> > >> $ diff -u before after > >> --- before 2022-08-18 10:06:40.422086966 -0300 > >> +++ after 2022-08-18 10:07:59.202138282 -0300 > >> @@ -1,6 +1,4 @@ > >> Auto-detecting system features: > >> ... libbfd: [ on ] > >> -... libbfd-liberty: [ on ] > >> -... libbfd-liberty-z: [ on ] > >> ... libcap: [ on ] > >> ... clang-bpf-co-re: [ on ] > >> $ > >> > >> Tested-by: Arnaldo Carvalho de Melo > >> > >> Thanks for working on this! > > > > Thanks for testing and for adapting/pushing the other patches! > > > > Roberto > > > > Tested locally for bpftool and I also observe "libbfd: [ on ]" only. > This looks much better, thank you Roberto for following up on this! So I'll add your Tested-by: to this one as well, maybe to all the patches in this series? - Arnaldo