From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 723212F5A12 for ; Tue, 30 Jun 2026 17:41:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782841272; cv=none; b=jd5+HAZEZ0J2n+VuLJQ4g3iO6SKdMfnqcYfw0CdW/nyqzFHgZDABGhEhWdLSKP4JkGiS15IKNLf4Bkb7gq/RFLBRTT67akCxHwpm+m8wXoeQPIRtDj5yIXm8EScWLVSDo1dZDRrIoM91tp0PKyl2AIwYcvhusLUiglPsjEpxs8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782841272; c=relaxed/simple; bh=G3PRqTzCs7RJgq2SvLzeR5x/KVyQM2abNcWze+dLFJc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LePRh+QPeZRkX3au/s3HR91g6rPGyenWhS2mhSIH3YrDskqc3LEHnSQxZFSxuQda0d6rrfGFQE+cpZUPsGKE4N+RxyhHR9bHah6/YiB+XYuXsHSFJaUxsuZFPjgRu80hrOjDgKGMVOG80mwGGc/SMPv9G0JJ4nPNW2cVAV8BrQ4= 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=V7vNxwoA; arc=none smtp.client-ip=209.85.221.49 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="V7vNxwoA" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-474e7ba9fd6so1099460f8f.1 for ; Tue, 30 Jun 2026 10:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782841270; x=1783446070; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=vwzV7dy3jE3WT3snLY2kOe0bzSNv3ebYJGfOv308YTU=; b=V7vNxwoAlKYBfIQaoVwxZt9i7JW/zEkP0BbFk1h/q0Be5PJRD0qBHR/iZ8BqsW/eZi tXt1o0ei4cFpKGO6BryM/6IqNMZARzk0sMm3St+Q/j4bT4SpRJCUXHKPStTsiPzdJEM0 f4kxIWQmM4POVcVmcKb6Uoo5Qutci2WxMkvmInCGrprLo3Kdd2MKSpiI7QihgQW4s/ZY 5EFG1MRs/PlY8ftaYZFRfVykgh98de6RazOlEC4P3gvxEKSjfAsopEGZ5DRhBUlHq8/e ee7TdL/NuxZBnJcvm3gJDqc9/AiTTqeiLwHsae6j/ijoPPpG9q66cnvcNxw8waYJ2d26 CVRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782841270; x=1783446070; h=content-transfer-encoding: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; bh=vwzV7dy3jE3WT3snLY2kOe0bzSNv3ebYJGfOv308YTU=; b=PdXGo/n2Ud4hiI/lU8CNuFuHR8yBslvOVHqt/Dr74O6Xo8vFUQ95fKIf4ZStEGYa5/ uikMvnTaEZKYB5kW1ec8Pi6/jeIBJkttqWDjDmMR77W3HJpp4C6O9qW6j/09LajT2/Sr b1OZFXfNcUA9aQWq3iEkpdXnLD7BcA3dW7DuFCwpqsoo/sJPj3AZhN3OAucjCsHXClEx Zh5v7lKgUHylV1ddZTb71FlqiNHzOUBTI8oXVxt5cN7dMAG1qY0JrorwBAhlUiSVUtyW VFfb3nuSxKL7lFVC2g/vfY5NzHhswyBy32VBBOy8FOXnwYDtit5ZQvNUbBGMOHHzKytu Xm1g== X-Forwarded-Encrypted: i=1; AHgh+RqqO3D23/XGMZtP0ttP8nU3v9cx1LpGUleKzs//OND0Z7BxxntMRd+AaycPfFOwSyK4gedc64KTdKOtcok=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1PVUT851S5Rt1DfLRF7b1x9stEujikPMnsxUC8+tGXOJ4Udvp raFoguac3MYWs+aHK32oX67hhGbdmajpjNeWyP4yxFXTPDxpsEt0Mt// X-Gm-Gg: AfdE7ckmJaIHMlx0564/7k1IE4hqC1fdm82DpxkHkrzhJGGy9k9Gkaa8E7YKrheNDK+ 8PrD+tDAbbB8fTswVAf1VnbDUjiFYpaMxkCgGjEiFtKplhi2lnLzhZkiRfGT1r/xHi2LijjkL4n RY+qQDcmwcf/K0cr6MqB/K0l0eUXIZ34+g7JEhwOmCDT8Pt9zMxg/NnEIUWRynjtj2aUJvTU/LC vWiVXdv5UNGkhs0k5M1Q1g7OH+G8xVuyLyOGP8k5oc95Q2nF6HWszXk44pxng6H63xLbN8N7URr XmASsXFGqwRfixvAq5MI9uXS1TkLU2i7XxPl2wjm+BTO/6+wfVrYEV4HxpRPG964Hy9J5CES3JB XVU2K9QTxBLdFKFpaZOde+e5gWY/RUTgt8PS0PMFhHjyJa+tVdyJwZsbbRYTnc5UrwzbR013GxK Y5vNaeW8o9N1HtmBwkx3hWTX+PcaWBnmXV2IVfjv1KYn9rEA== X-Received: by 2002:a05:6000:61e:b0:475:f0f0:9eef with SMTP id ffacd0b85a97d-475f0f0a14fmr4464526f8f.52.1782841269637; Tue, 30 Jun 2026 10:41:09 -0700 (PDT) Received: from pumpkin (host-92-21-50-228.as13285.net. [92.21.50.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47563d195a7sm9229282f8f.7.2026.06.30.10.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2026 10:41:08 -0700 (PDT) Date: Tue, 30 Jun 2026 18:41:06 +0100 From: David Laight To: "Joy H.J. Lee" Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, masahiroy@kernel.org, nathan@kernel.org Subject: Re: [PATCH] tools/compiler: match glibc 2.42 definition of __attribute_const__ Message-ID: <20260630184106.7bb3f22f@pumpkin> In-Reply-To: <20260630145840.2717960-1-rkr0k0r@gmail.com> References: <20260630145840.2717960-1-rkr0k0r@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 30 Jun 2026 23:58:40 +0900 "Joy H.J. Lee" wrote: > glibc 2.42 added __attribute_const__ to sys/cdefs.h: >=20 > # define __attribute_const__ __attribute__ ((__const__)) >=20 > GCC 15 warns when a macro is redefined to a different replacement list > (-Wbuiltin-macro-redefined). Since host tool Makefiles (resolve_btfids, > objtool) pass -Werror, this conflict becomes fatal when building with > glibc 2.42 and GCC 15. >=20 > Per C11 =C2=A76.10.3, identical replacement lists are accepted silently. > Match the glibc definition exactly, including the space before "((", so > the redefinition is accepted without warning. >=20 > Signed-off-by: Joy H.J. Lee > --- > tools/include/linux/compiler.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compile= r.h > index f40bd2b04..f2f54b038 100644 > --- a/tools/include/linux/compiler.h > +++ b/tools/include/linux/compiler.h > @@ -119,7 +119,7 @@ > #define __read_mostly > =20 > #ifndef __attribute_const__ > -# define __attribute_const__ > +# define __attribute_const__ __attribute__ ((__const__)) That doesn't look right, you are completely changing the value when it isn't already defined. David > #endif > =20 > #ifndef __maybe_unused