Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp938708rwb; Thu, 18 Aug 2022 15:19:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR5qqv2IRYYRdeM7eyjMTcBpJRDvd/LvsZaqGfDdSFAl6VcxZPRSsxCWggEShkaZ0dIHLHTQ X-Received: by 2002:a05:6a00:140d:b0:52a:d561:d991 with SMTP id l13-20020a056a00140d00b0052ad561d991mr4878050pfu.46.1660861170888; Thu, 18 Aug 2022 15:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660861170; cv=none; d=google.com; s=arc-20160816; b=YFDNkouxyrStH1d1Zbtrp7dHkFplX0HDfbCkiVq4kGxZIzVjnxGVfehwye2JNAB6TO l3ewktjH67BNP/oEBQG1hQFOQuOUxsOHvLb1DoST8JdAVVXNTrDno1LCCXW/WxRft0sD 1I3QjhyyAeN7NnRfgqZgFVTRxCKzhH5PeMWMVD2F1sOI7+3W3IwUKpseafv0qW8Ok2Yf aCUtxeVx4/6iZAVOSMfDmyYwDlpSKLyLk12Yv0a+u51Gpidjeo/y9tBnQwXTualgB8jJ ln1S5oSAi0urqxHb3zu+cJZomlHROVVUmlC66WWzUoqyo0RXh251Su5jpYwwPJknaLzA 59dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=M/XssIYSX7PJg8XX/OCwv5wRKVVolBwpSHoWeNBAk0o=; b=GJ4ZeZy9BQWYPn4xpsGmf8y51DvEyu/HX4DSzLBJJDfLOl5e1d7GKDjzJ2FA+hVkjt HvzXEKGfjnLGmyX2bi/LxvPRe6T5i32ZKNqgGoZWo0kCPKfIt603Y1tyABQcucgO3pB7 FD2T+zXM7TRr3DqlKkUbB0z0mIPoB21QZeUjF+hJsUbw09uh3Ybwu62Sf8jl/RPiu6yW e7kQgj6iu2yscDpF8cmok7xgSCFgoz1Vb2OsFjpJTECdrfoWP7+JAohpRUESPMkLj6M1 tqoyHqr6KoU1QsELrQ1R9mRmnXL6xXXlWMi8Ku/xQQUWqWlQXL8NFkTVA/OLT6tmwISv hK/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@isovalent-com.20210112.gappssmtp.com header.s=20210112 header.b=xoHgdM10; 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=fail (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 126-20020a630284000000b0041db5a647a9si2158835pgc.744.2022.08.18.15.19.19; Thu, 18 Aug 2022 15:19:30 -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=@isovalent-com.20210112.gappssmtp.com header.s=20210112 header.b=xoHgdM10; 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=fail (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346434AbiHRWPy (ORCPT + 99 others); Thu, 18 Aug 2022 18:15:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346325AbiHRWPw (ORCPT ); Thu, 18 Aug 2022 18:15:52 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 862F5D7CC7 for ; Thu, 18 Aug 2022 15:15:51 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id y18so2200000qtv.5 for ; Thu, 18 Aug 2022 15:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=M/XssIYSX7PJg8XX/OCwv5wRKVVolBwpSHoWeNBAk0o=; b=xoHgdM10FkEZrJRvbAzjNs+u9Vf/qJ1doeu8xZyyXN6mMoz8mDgrZUodjLXDlk+GDt N5r/Q1l6A1v9GdZTNIkDwjaS4G5ZMBpXUS5pCfQWAxa+UhYzbUiVIY1xUt92TdOheSwX 3fn9RG63YVwPngMu1rk6XeZXjNxIMeLWCo1x3BVFIM6V/ZLl+beToVE0Oql0StwL68bw WBxa5CzdmnKq5ouC29fRL+MJ1o1ggXw3N0kK6QEGL5YeqCCy8RU+z/hP5ZL3i+uaHl0g /hCyvxpWCyCmIk566j8mEBzvzZFg8u5SWskVtjZureKGqNhqJSp5BfVurThxg0d6PgtA f2BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=M/XssIYSX7PJg8XX/OCwv5wRKVVolBwpSHoWeNBAk0o=; b=XtoREXFbNy/bv4zpVvGU5PKcq2PgTLEaYvkYrTHOqh4Rr3lFawUvAXNuPlMR8tOMvR yJsj2UXhx4/CZQySICC9nIGEWN4iSiKY269PJXTeb/joJiwvdPdfoOw0E/h8cm6Fz50V ai/OeDppj34+sRlKFrmPnvhxCwvfw07bnozPRm091IsDkiUvFeE4/12b362VQ9BdzhNR 3FumFK2UV8LDph3d7pKImr9NaF7b0tpbhb9l+wUoVCfuPDolDwVW+QfYBlfmNtEOvwBS doS+6+Slvb+U6xhGEmE0QXu/CqonEZeq+C/YxJJqlqS6fndSquh3f1ZHctKo+l8CDZBU CkkQ== X-Gm-Message-State: ACgBeo0RmQyXE6SepXU5Z5r7KvSjTEoN/7wwMmEgTKihLnibbJNeZHhv 8NGoLmxJJW1mDYAF5YMjmYE/B1VDFKJNA4W4bw1X0A== X-Received: by 2002:ac8:570e:0:b0:344:88d7:5ee3 with SMTP id 14-20020ac8570e000000b0034488d75ee3mr4317394qtw.522.1660860950704; Thu, 18 Aug 2022 15:15:50 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Quentin Monnet Date: Thu, 18 Aug 2022 23:15:39 +0100 Message-ID: Subject: Re: [PATCH 3/3] tools/build: Display logical OR of a feature flavors To: Arnaldo Carvalho de Melo Cc: Roberto Sassu , Peter Zijlstra , Ingo Molnar , mark.rutland@arm.com, alexander.shishkin@linux.intel.com, Jiri Olsa , Namhyung Kim , "linux-perf-use." , bpf , open list , Roberto Sassu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 On Thu, 18 Aug 2022 at 19:14, Arnaldo Carvalho de Melo wrote: > > 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? Sorry, I haven't tested the first two patches other than by applying them, so just for the third one preferably. Thanks!