Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3894923rdb; Thu, 14 Sep 2023 06:10:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrl/V29p1GmSC2yLYDwImTjt4LapJxigXNanxgy+z/puJIpuORFGEdeRYFGI8c7Me+go7z X-Received: by 2002:a17:902:e883:b0:1c3:1ceb:97a4 with SMTP id w3-20020a170902e88300b001c31ceb97a4mr6860354plg.24.1694697030751; Thu, 14 Sep 2023 06:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694697030; cv=none; d=google.com; s=arc-20160816; b=09JJ2eKMmIb1IlMTA0VfiuWbNilzzctxVa11P/a4Xb8bmhxraRjZxc/FHp3pGYMly5 GlGzgJpyvX6UVxPnAgj2IDgR15R6x6DoW68uo5uHl/MAVarS2glQcVbdNpU9t8UtooGF gkepzVjjFGgptajWrwOdxx5z4FbSjAOVMxed37mieMvBxSQTNcq1VUwAIbAyO7Ie8sIR Obpsof5/Cg5ZfinAxRtxCmcx4zeZ9xZM7KwI9l/SgNsk3j33V0b8TlSVafFSdMGXyWYT cEVuJs7ERd8SjNt7/euBRGWlreEF1btEOSi1B7GfHO3N+d953OxoNhb9/UMEdb5v+MSJ vCAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=63bCgZyJPHacFd5KYq5Eqq1cMFHgnlGhz4az2hRkdwo=; fh=OyAVd8USAN7CvYd+1Ql8Ia0mxDDLJ1i8try66PCyeDc=; b=oaUOTRMO9tU2bhw7J55qBiw8nBRsZTqyHaEmiIoOYbqin8nfQOTb+042q/em36MTG/ 8Y1zuZcEJLAT6VrezXNNQzCSWvWS91Tv8LN21uz341wdBaji5gNBnQcgQnDBEmDtZGdx u0AozdXquRLuGFybwTdrv2t5oFJzFtMVj32ptQA3mkdSQn5gN630pNW9Zlqa9h9YcH4a PVG/UcF2+vr6QLL0+axtEDrrSqBNvnsEvhGVEZ6pMpP5be8c/lCsUKtyRan8qUAUmCnk h/1QmSjM6g65cjmVTSSGJwx69qkX2da7CZEbk59tswDdAv4jIEWJDet8fg+FacA/6zi9 2p/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JCiSbCD8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id v13-20020a170903238d00b001bdf71d52b0si1554166plh.456.2023.09.14.06.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 06:10:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JCiSbCD8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 571C483033A8; Wed, 13 Sep 2023 20:57:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234257AbjIND5R (ORCPT + 99 others); Wed, 13 Sep 2023 23:57:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234391AbjIND5Q (ORCPT ); Wed, 13 Sep 2023 23:57:16 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1A38DE4B for ; Wed, 13 Sep 2023 20:56:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694663784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=63bCgZyJPHacFd5KYq5Eqq1cMFHgnlGhz4az2hRkdwo=; b=JCiSbCD8qWz5gNaUZ7wqhrwoCxE6p9Q7UkOZBvaEfktkViuVofPca5FuU2+HoguoAyS0rN xuK7K4UP929YXcYDEEVHCO4HTDbbvTdJShwBgHfL1zo5LWkRJstISmjT95iQr3OdnUppQ2 gnw+49SRKJ8q3StPxPQ3hOzy/0ntwwo= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-318-3jkgN2ffNh649I_DBj00CQ-1; Wed, 13 Sep 2023 23:56:23 -0400 X-MC-Unique: 3jkgN2ffNh649I_DBj00CQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-31f46ccee0fso640496f8f.1 for ; Wed, 13 Sep 2023 20:56:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694663782; x=1695268582; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=63bCgZyJPHacFd5KYq5Eqq1cMFHgnlGhz4az2hRkdwo=; b=SJ7Eaa701LeJty7buWP/uY0TvFCqFUvShz6rwL9UGD8CnMzkTGTdl0s6XqFNehua+T J+vmI5JWULYymDbLkVToxj+rOvVoaIddn17w+WbJnDv5wmjhlXO4/9YG5DlAUhn3o+JQ cF+5rrphgF8MXujdyWix33l0+MsXY6QGYvOs4wWGykG61ljEFUz5GlcAlbeE4CjHiK+b zNXWlgk2BIDl4IP9mKEdTwAYWPTD/EVp20jSnMzwbyFG3Wl/p9oAN2zYa+/xGRLgEfhO gFb/f1Mjhz9mxtaYRX21Z7DscUCT8QAD8mFmB61q/GmbnhiqSS5eJOtywfPobGNCZoOn HKXA== X-Gm-Message-State: AOJu0Yw/1DAsxZu/T1UkJ8pXa38fZ17j8KdyK8r0b0Mc7Z7ZuDP1Bdag IegnZ5m1kYmapmSN5hVnyzzyFaKioftLMBCY+7m0UR4REfOHusD99dkgpMrJDjk6/Rf84bnE0lh 5g3pdkVr00yuT2g0uwzCXhnPK X-Received: by 2002:a5d:4d48:0:b0:317:59a6:6f68 with SMTP id a8-20020a5d4d48000000b0031759a66f68mr368725wru.0.1694663782440; Wed, 13 Sep 2023 20:56:22 -0700 (PDT) X-Received: by 2002:a5d:4d48:0:b0:317:59a6:6f68 with SMTP id a8-20020a5d4d48000000b0031759a66f68mr368709wru.0.1694663782027; Wed, 13 Sep 2023 20:56:22 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id s1-20020a5d4ec1000000b0031fbbe347e1sm529465wrv.65.2023.09.13.20.56.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 20:56:21 -0700 (PDT) From: Javier Martinez Canillas To: Arnd Bergmann , Nicolas Schier Cc: Arnd Bergmann , Masahiro Yamada , Jonathan Corbet , Sakari Ailus , Nathan Chancellor , Nick Desaulniers , linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation: kbuild: explain handling optional dependencies In-Reply-To: References: <20230913113801.1901152-1-arnd@kernel.org> Date: Thu, 14 Sep 2023 05:56:20 +0200 Message-ID: <874jjx1k7v.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain 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 (lipwig.vger.email [0.0.0.0]); Wed, 13 Sep 2023 20:57:19 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email "Arnd Bergmann" writes: Hello Nicolas, > On Wed, Sep 13, 2023, at 22:34, Nicolas Schier wrote: >> On Wed, Sep 13, 2023 at 09:55:36PM +0200 Arnd Bergmann wrote: > [...] >> I can choose between: >> >> BAR=y => FOO={N/m/y} >> BAR=m => FOO is not selectable >> BAR=n => FOO={N/m/y} > > That is indeed the point: if BAR=m, we want to be able to pick FOO=m > here, otherwise it is impossible to enabled everything as modules. > > Another correct way to express the same thing as the first would > be > > config FOO > tristate "Support for foo hardware" > depends on !BAR=m || m > > which I find even more confusing than the 'BAR || !BAR' > convention, though we have that in a couple of places. > > I just found another variant that I had not seen before: > >> (Re-checked with BAR=IPV6 and FOO=WIREGUARD; CONFIG_WIREGUARD as 'depends on >> IPV6 || !IPV6' in its kconfig definition, and both are tristate kconfig >> symbols.) >> Which is correct because WIREGUARD can be built with IPV6 disabled, but if both options are enabled then WIREGUARD can only be built-in if the IPV6 option is also built-in. WIREGUARD must be a module if IPV6 is also a module, but can still be a module if IPV6 is built-in. In other words, what this idiom express is that the following configs are possible: IPV6=n => WIREGUARD=y IPV6=n => WIREGUARD=m IPV6=y => WIREGUARD=y IPV6=y => WIREGUARD=m IPV6=m => WIREGUARD=m but the following option is not possible: IPV6=m => WIREGUARD=y -- Best regards, Javier Martinez Canillas Core Platforms Red Hat