From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 8B81F311952 for ; Wed, 25 Feb 2026 21:25:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772054717; cv=none; b=AnRZmLY/2rW/811D3up7kkJp4lWeBgyiyAmiJLd6dwYG+0hDq+JZj10OgzVHOf63M94RxfjO/aRPJtws/SwgTxNZDAD2PKSI+2fylvC69vOeB2MdCAMBaL3C7y34yr6uCXVnXNBZz9sDIpE3FCSCLr2cmcENK518UvknLYYdY6g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772054717; c=relaxed/simple; bh=ZGiY1YO4Ab+TtbsOW/Ex/fvWJmdhqst63RbdN2A9Rcw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CaBUBJX+BallwKUN3vbDLed+lGx10QrEoPzfohRShzMbt1J8LZ0gi5rfa0W6pQM1WwLRUwxm5DTRHuoTR5vbSy08SNy8tqo9YWrmNO046ZoaCOZ4FCsfEgsPXDAPqTvsXtXrzmkQub650GY5AZhKLzYofVS5LbATOHQ3n1ewIBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=qavXD0gB; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="qavXD0gB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1772054713; bh=ZGiY1YO4Ab+TtbsOW/Ex/fvWJmdhqst63RbdN2A9Rcw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qavXD0gBNYR+e6aNCPeNWEBcpsdPt59M4hdTBQpSEq1tDg/Tc3bVEidktoG+t6jCd 5vTvK+c2QgU0+jSgnZ1ycGw3xQnNOPUT0GooXSJVYUNfr25L7LY2/HrMrBFoJogVUh 077BOnND+FN+Ts/phEhSSRdAmJ0KbIUSB5SrNixQ= Date: Wed, 25 Feb 2026 22:25:12 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: david.laight.linux@gmail.com Cc: Willy Tarreau , linux-kernel@vger.kernel.org, Cheng Li Subject: Re: [PATCH v3 next 01/17] tools/nolibc: Add _NOLIBC_OPTIMIZER_HIDE_VAR() to compiler.h Message-ID: <5cd824ee-bdbb-447a-8ea1-d415d0962016@t-8ch.de> References: <20260223101735.2922-1-david.laight.linux@gmail.com> <20260223101735.2922-2-david.laight.linux@gmail.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260223101735.2922-2-david.laight.linux@gmail.com> On 2026-02-23 10:17:19+0000, david.laight.linux@gmail.com wrote: > From: David Laight > > Needed to stop compiler 'optimisations' bloating code. > Equivalent to the definition in include/linux/compiler.h > > Signed-off-by: David Laight > --- > > New patch for v3. > > tools/include/nolibc/compiler.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compiler.h > index a8c7619dcdde..8e0eef434eec 100644 > --- a/tools/include/nolibc/compiler.h > +++ b/tools/include/nolibc/compiler.h > @@ -71,4 +71,9 @@ > # define __nolibc_static_assert(_t) > #endif > > +#ifndef _NOLIBC_OPTIMIZER_HIDE_VAR The ifndef guard should not be necessary. > +/* Make the optimizer believe the variable can be manipulated arbitrarily. */ > +#define _NOLIBC_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "+r" (var)) > +#endif > + > #endif /* _NOLIBC_COMPILER_H */ > -- > 2.39.5 >