From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f12.google.com (mail-wr2-f12.google.com [74.125.225.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 333DE415F0E for ; Sat, 12 Sep 2026 10:03:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789207404; cv=none; b=QjRoowUtXVWaohvBFtgP4LY8y6n6K2+js2X5nfI2PEZ+EYVeVFRx693UUD/4zel+JPAI8wM/kMuNhlYJtPNCt0rt6XSHeUg/gr0DmNxvazx715OoZJSvK9MtY4p0koRlJ90x0NCl0WY7JGyhiDxh0qW1PMqqOwwUkaV0seNxuzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789207404; c=relaxed/simple; bh=8sojs+se8QPBJyJ3S7gUk1OtieiG2IMnEQyGHnpeALo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=f+6QAbwH4QZzuQqnTHntITk1+JhuM3UoS0etas8biKP8eyQlD0ibOBHIQEDuyl2BLYDObGOVzivDZix695inDQelpMldp+KQx8RTH1wds9e28/a+Glwx/5cpND9z+mdDsKKna+IIDbDDGnrLIA5q1QaMdjipuPv1B04gAKXtcgw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Fe+AZyiP; arc=none smtp.client-ip=74.125.225.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fe+AZyiP" Received: by mail-wr2-f12.google.com with SMTP id ffacd0b85a97d-482f635552aso323392f8f.2 for ; Sat, 12 Sep 2026 03:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789207400; x=1789812200; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=78QJrighesf7VQwGx1w3HgeMelr4wZOukxrUbALylpM=; b=Fe+AZyiPJOfMvfVWNuDtyAcWTVKbBm96f/FC3Afm6JLZBHlBx4RDyqfVRdhFrVnLcu n4w48wdDXiNehawYgSXj6RD10qznhIwlXp2oOKq81tWWQcrvxbZzbDpLoCKjGmThvW5n kuCdUk/zDHrjp2P8fcKrJCIIptcNIR9aAVXgQITG7+l0EDdMQJzK1hv9Fhm1dzDDpJjr sX/pIp21teXMpdb2inVRL30AHaleM1Yuo4FVYGmeaLlbXvYBIVwd30kdVsV6ZMYtdNk5 RJUK/36fQ0Yjypq3Y2OzYHXDnBliRbq6ba9NaXMK89x1NGAILWj+/oOeA3oS/cZnbvOW QfHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789207400; x=1789812200; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=78QJrighesf7VQwGx1w3HgeMelr4wZOukxrUbALylpM=; b=j2rtF5ykye8QwnsL/+Gu+mC2EX+YNvFOSKQlPwa06VehPxBFJMOWQLFkbVypGjQNqv 74wtMwV7UqGXjQzDqyPDEJg2BzoI1AaJ6UEh4iLYW0Mer04c7BI3Rr4C6B3u9G+pq6Vw VdPtGB9/1TULa/O3fgEnw0ZHeWMLZLrW/bqEZh1e/qXazOhec+1Puk9+nff3ju923ACf VWDnPbEshCI6i4Qzy0rkQIoPNPhoG9ThojfQdsgjcUMTjsjr0v22DA1Z402HgyOemRHY iNCUdqlOf1xEIteh49EaHqM6X7YP5M3MKrOJmH0E0x5cf0gajX9M4ygrHaS97Hxw4mbq jzhA== X-Forwarded-Encrypted: i=1; AKwUvBzNM92awlUTK0crcW5rLoGNCVSfDYXrzd0l3/AGVOM81zYZXP5sQI8FzPJlQyyjjjmPuOe8wt4Gb5y28eI=@vger.kernel.org X-Gm-Message-State: AFuF++mEIe3nvHmlqYM/P+/ROigCXtDKT00SFU2SAoPMcIJrerIVIbLS IuC6XOXcF8ia3iIaLCQKw75JLgPsPd9kwJ7xn1ONiPjMoJWWFQuLw6Wo X-Gm-Gg: AYBFou0WwZVT83361KYCPqOorPA4jh2sMgKx4QedM2mt0GyqJjmU+r8eBDdd01rv/5H yGYYLj/7gepRUHBYK7bx1iDg2n78ySq5IC9oRZahH7wZQUAOm34jXpsEMbYnBuH46855XpiB0vz V046N9gCiEBqVCo1NdyU8W4vN+XTqBF62PIbKEM71q+oMCLZpS5wyA5tEqV/H/QH0UXCBj8lFrp rrtU74DbbGCVlmrJKuPW7mTwF5HLsUaM+upV7r5t3OpG+4bDbTPVMGrsGRAeK8gwzgXVJZZvocU C/IR/Z8me0Z1U+1Gwetj4jHX43/wWlBkN34hSW0TisEuSSySwrpAwzNtFmw0uJE/HjlHN2vZlXP 8XSAU1w8ciVoEbNc6uutR71HoE8vk01Z8ifyrphHof3h+YKQBxINvZxPb1BzMsfbCHM9kjhlyFq fsMmZ15Odag8N5ZJ4PHfbqPINEB4fz+kTbPMgAzpxAGGjBBw8mND7VbO++PfYMz/81zHtjh+Sr0 BrFLnU2XgHTL2GpkpHLKlJyv9QdjqmrL9hzIwAkly/ToXQ= X-Received: by 2002:a5d:5848:0:b0:481:512b:f0e7 with SMTP id ffacd0b85a97d-486f6c0a974mr2053384f8f.17.1789207400506; Sat, 12 Sep 2026 03:03:20 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-486f301121asm7428212f8f.0.2026.09.12.03.03.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2026 03:03:20 -0700 (PDT) Date: Sat, 12 Sep 2026 11:03:18 +0100 From: David Laight To: Nathan Chancellor Cc: "Lorenzo Stoakes (ARM)" , Linus Torvalds , Nicolas Schier , Nick Desaulniers , Bill Wendling , Justin Stitt , Masahiro Yamada , Alexey Gladkov , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Catalin Marinas , Will Deacon , Mark Rutland , Ard Biesheuvel , Ilias Apalodimas , Josh Poimboeuf , Peter Zijlstra , Miguel Ojeda , Boqun Feng , Gary Guo , =?UTF-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur =?UTF-8?B?w5Z6a2Fu?= , Jonathan Corbet , Randy Dunlap , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Jens Axboe Subject: Re: [PATCH 12/23] kbuild: avoid re-running compiler and linker probes Message-ID: <20260912110318.23bb6619@pumpkin> In-Reply-To: <178901395292.3971858.13236774094648272066.b4-review@b4> References: <20260908-build-speedup-v1-0-5dc1ac01672d@kernel.org> <20260908-build-speedup-v1-12-5dc1ac01672d@kernel.org> <178901395292.3971858.13236774094648272066.b4-review@b4> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 09 Sep 2026 21:19:12 -0700 Nathan Chancellor wrote: > > diff --git a/init/Kconfig b/init/Kconfig > > index 8583d9f06c52..3c92c87254a3 100644 > > --- a/init/Kconfig > > +++ b/init/Kconfig > > @@ -144,6 +144,44 @@ config CC_HAS_ASSUME > > config CC_HAS_NO_PROFILE_FN_ATTR > > def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror) > > > > +config CC_HAS_ZERO_INIT_PADDING_BITS > > + def_bool $(cc-option,-fzero-init-padding-bits=all) > > + > > +config CC_HAS_NO_STACK_CLASH_PROTECTION > > + def_bool $(cc-option,-fno-stack-clash-protection) > > + > > +config CC_HAS_NO_ADDRSIG > > + def_bool $(cc-option,-fno-addrsig) > > I am generally in favor of this proposal since I think these checks > should be cached by Kconfig where possible to clear up running them > twice. That said, I wonder if we should pick a better dumping ground for > these checks other than init/Kconfig. Maybe init/Kconfig.tools or > scripts/Kconfig.tools or something? > > I also worry about backsliding and growing cc-option checks. Should we > update the documentation to state that it is preferrable for these > checks to live in Kconfig so that they can be properly cached? > Thought... Can some/all of the checks be done by running 'cc --help=xxx' once and parsing the result? Although I'm not really sure that shaving off 0.2 seconds really matters. (I know the little bits add up, but there are much bigger delays.) One thing that does annoy me is the delay before the first compile when you do a -j1 build. I've not looked at what is being run. This is all made worse because gmake doesn't stop on errors very well. I fixed that in NetBSD's make about 25 years ago. (IIRC it mostly required always getting a new token from the pipe.) David