From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 525B042884B; Thu, 5 Feb 2026 15:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770306936; cv=none; b=C+Op1MBFWoIsQeqTA4viRUl9PvFt6NUNPPs/8bSL2jUeh6ltQ2QoxFHm9hbR131x3DZvdWCFTl/Fr7WNNhX5Yho1MX0LOqWJvdvf5eAYjdXK4m8NOC/dXsCa0TIX6iwL+ba6AU2jxpm/6agHKnFM/O8H77pj9PBDBpnFJ0Ixims= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770306936; c=relaxed/simple; bh=nLnqxFooA/49y7Qr2qOH02wcNjwl6i9vyPt+ZJikng8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Okxmk5meAiqFz8d+Gr109/SBt3YeGKOYbTmpoWePttjTCmD2iF+Or+yyCNqWV19cdR9J7vFHvUH58aOPQe2h51bc7da5TjeofU4zzPW8DlDTy/mJNrBMe9WXDQbQRgLXtWWPQLgq4TwzjXKhGIzUN3GlNrIMFTP6WSNDpXTohuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KCxCr3m1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KCxCr3m1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84943C4CEF7; Thu, 5 Feb 2026 15:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770306935; bh=nLnqxFooA/49y7Qr2qOH02wcNjwl6i9vyPt+ZJikng8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KCxCr3m15otPPxE5NJuhZjbQUaeB2FUvBRMuN2+fjC6L7rY9kHbVZE47aVoCk70NE OQlTj4DnMAHIXjaQzCPBv7NHxmhsDHatlGjFt8tHJojOcauwHAfmqImhFmXyo2Beab Px6zqBpWaZJyv+gT0E69C6KDkpR1eMNE0/KdBnqWnRuhqyI0smKb12m0KHz5PDWXzD A0Rc7cBkYSQOCKBoRr/XGjWslvBchIwm99XXnQiQN8gn1kAH9hO6/KfV+H3fC30k75 W0rQgcNUL5x+feCkRpf12hFgmvD11uDc9NGIQVIcnIovGhzCDpH/TEf7HViuXXHRK4 qPAfHvw+beUTA== Date: Thu, 5 Feb 2026 16:55:25 +0100 From: Nicolas Schier To: HeeSu Kim Cc: nathan@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com, bjorn3_gh@protonmail.com, boqun@google.com, charmitro@posteo.net, dakr@kernel.org, gary@garyguo.net, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, lossin@kernel.org, miguel.ojeda.sandonis@gmail.com, ojeda@kernel.org, rust-for-linux@vger.kernel.org, stable@vger.kernel.org, tmgross@umich.edu Subject: Re: [PATCH v5 1/2] kbuild: add rustc-max-version macro Message-ID: Mail-Followup-To: Nicolas Schier , HeeSu Kim , nathan@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com, bjorn3_gh@protonmail.com, boqun@google.com, charmitro@posteo.net, dakr@kernel.org, gary@garyguo.net, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, lossin@kernel.org, miguel.ojeda.sandonis@gmail.com, ojeda@kernel.org, rust-for-linux@vger.kernel.org, stable@vger.kernel.org, tmgross@umich.edu References: <20260203221224.GA2703490@ax162> <20260205131815.2943152-1-mlksvender@gmail.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260205131815.2943152-1-mlksvender@gmail.com> On Thu, Feb 05, 2026 at 10:18:14PM +0900, HeeSu Kim wrote: > Add `rustc-max-version` macro to `scripts/Makefile.compiler` for > version upper bound checks, mirroring the existing `rustc-min-version`. > > This will be used to bound workarounds to specific compiler version > ranges. > > Suggested-by: Miguel Ojeda > Link: https://lore.kernel.org/rust-for-linux/CANiq72n39eU9WE=Yh0_yJzmqMxo=QAaU2pN0UqP9jZ7bT7rhgA@mail.gmail.com/ > Acked-by: Nathan Chancellor > Signed-off-by: HeeSu Kim > --- > Changes in v5: > - Split rustc-max-version macro into separate patch for easier backporting > (was part of the workaround patch in v4) > > scripts/Makefile.compiler | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/scripts/Makefile.compiler b/scripts/Makefile.compiler > index ef91910de265..85268f6f1494 100644 > --- a/scripts/Makefile.compiler > +++ b/scripts/Makefile.compiler > @@ -71,6 +71,10 @@ clang-min-version = $(call test-ge, $(CONFIG_CLANG_VERSION), $1) > # Usage: rustc-$(call rustc-min-version, 108500) += -Cfoo > rustc-min-version = $(call test-ge, $(CONFIG_RUSTC_VERSION), $1) > > +# rustc-max-version > +# Usage: rustc-$(call rustc-max-version, 109000) += -Cfoo > +rustc-max-version = $(call test-le, $(CONFIG_RUSTC_VERSION), $1) > + Acked-by: Nicolas Schier (nit-picking; not crucial for this very patch set) For readability, a less-than version check might be easier to read; and that would probably better match the suggested version range check: rustc-lt-version = $(if $(call rustc-min-version, $(1)),,y) rustc-version-range = $(and $(call rustc-lt-version,$(2)), $(call rustc-min-version,$(1))) so that the actual version check could become # The bug was fixed in Rust 1.90.0, so only apply for 1.88.x to < 1.90.0 rustdoc_modifiers_workaround := $(if $(call rustc-version-range, 108800, 109000), \ -Cunsafe-allow-abi-mismatch=fixed-x18) or: ifeq ($(call rustc-version-range, 108800, 109000),y) rustdoc_modifiers_workaround := -Cunsafe-allow-abi-mismatch=fixed-x18 endif -- Nicolas