From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2F57C25B06 for ; Tue, 9 Aug 2022 23:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbiHIXw5 (ORCPT ); Tue, 9 Aug 2022 19:52:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiHIXwt (ORCPT ); Tue, 9 Aug 2022 19:52:49 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16BDE7FE69 for ; Tue, 9 Aug 2022 16:52:48 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id z20so15132070edb.9 for ; Tue, 09 Aug 2022 16:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=+w0efWqRPp/QaA80uZ2hXwt3OEXDPP57fMDjGCeRiD8=; b=avFCSlfYTjdAD7Cyg5OGq3l+IG3inn0Ay2YR58meLuVyf4ACxmuvTN4rAMBw8ZcQ6r Wbkp5oET0CAGpugtr9+fl7oXwqPY3zPzktDpSCcYDiShxgGW3wCPtRFNZBLl6Ekwd5GB 3K2/3qEBq3CxJkM+/56l0SB/7vfa4Elm2+B2U= 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=+w0efWqRPp/QaA80uZ2hXwt3OEXDPP57fMDjGCeRiD8=; b=s7uBjwlAcxtdb08jMYzl8dZH2xbMohtCpcS6K+MsPp0LJ0pRBRgPYLJEwFLMDdLg8Y uwSNABVQqiJ2X0gjk2cZ6jLoYVuijwFxXoaZuFR18qTZsnSMjBwL1h88nx6V5oy2pXDf tY/3USwks0tmu+eQlZjh2YSXkZA38w8DUXMZraM6ARMJGa5a/TR95Nxhn9Yi8uyB5B/m Y9/HqydXyQb443+oMKKu64qhlvqbMRbTtxYqz6ya4PCZUhE7ayhZz4hKLgrit2SvSmRF /teXoyiHxFfK9n7VNDmCKQavD6KF95n5sNS1FldPf+mLrYoUZZLAyDKdUXrJEteGUn0b WY8Q== X-Gm-Message-State: ACgBeo1N75C4yBgWcGszZc6ApqYjWXqRR7wTXmK7rRoYajZBH2W86z4E dZRIqRH9YkBVD+LKOwtHrLeYOGLt+/fLdGgmzX4= X-Google-Smtp-Source: AA6agR5ga298f0+qjPOYjUxfo9eEmFduCGallzoxSvowCh/BdeoLGXf7k8T5jWEO2JmBk8QYqDDWog== X-Received: by 2002:a05:6402:2b8b:b0:43a:5475:f1ae with SMTP id fj11-20020a0564022b8b00b0043a5475f1aemr24104644edb.363.1660089166469; Tue, 09 Aug 2022 16:52:46 -0700 (PDT) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com. [209.85.128.52]) by smtp.gmail.com with ESMTPSA id kk18-20020a170907767200b00704fa2748ffsm1660635ejc.99.2022.08.09.16.52.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Aug 2022 16:52:45 -0700 (PDT) Received: by mail-wm1-f52.google.com with SMTP id ay12so4199964wmb.1 for ; Tue, 09 Aug 2022 16:52:45 -0700 (PDT) X-Received: by 2002:a05:600c:4ed0:b0:3a3:3ef3:c8d1 with SMTP id g16-20020a05600c4ed000b003a33ef3c8d1mr442539wmq.154.1660089164991; Tue, 09 Aug 2022 16:52:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Tue, 9 Aug 2022 16:52:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [kconfig][RFC] getting things like CONFIG_ARCH_HAS_SYSCALL_WRAPPER without bothering with selects To: Al Viro Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 9, 2022 at 3:57 PM Al Viro wrote: > > However, kconfig could do (1) without selects - something like > bool ARCH_HAS_BAR_H > def_bool $(header-exists,bar.h) > > Does anybody see problems with the patch below? I like the concept, but I'm not entirely sure how generic it is. How many of those "arch has this header" do we really end up having? Just looking at some of the "ARCH_HAS_XYZ" options, very few strike me as being about a header file existing. I'm not saying you picked the _only_ such case, but it doesn't seem _entirely_ impossible that you did.. Looking at some of the other cases, they might be more interested in not "does it have a header file", but "can I grep for this symbol name"? And that kind of "do you expose symbol XYZ in header ABC" query might work for this ARCH_HAS_SYSCALL_WRAPPER case too? So that seems like it might potentially be a more general-purpose Kconfig helper. Hmm? Linus