From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.formilux.org (mta1.formilux.org [51.159.59.229]) (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 50FF621CFE0 for ; Sat, 7 Mar 2026 10:50:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.159.59.229 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772880651; cv=none; b=i9JXRjEOl59tQC8aUmyi+sNt3hoImFYtJEsWXdmCG3xdVuW5jZ9ZdsNX+PsnP3jnuNH+7vNPm4t5vaFBLHh3L4O6hCTCd5rwLOhxV69t1P9IXDOkxTKeYs8AQB+tTaTt814+ttQ8mPh009fqLSHAwUJXoMrdMZ/gkezW3HQjYsA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772880651; c=relaxed/simple; bh=hmqwAx1GbU+qkLZHq1Du4aW9EqXxDDvVj3GEnC/9UKU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iYio/htSlnlUvBm9RHToSNfxcyr28Kzm3ARHpYD4id05M8BUFSSWD8Cu/X8d/QSufGeM9MxVB+/SXDsE0/RVJUCRkux9FqFIeXTt33ap75TUe7NL09wOXZDKxo74Cesq7rUeFA/eAQVCdUpw3wjnKNqeH1mR6hxXXFPLZ6aWwWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu; spf=pass smtp.mailfrom=1wt.eu; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b=iQSdxh66; arc=none smtp.client-ip=51.159.59.229 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=1wt.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=1wt.eu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=1wt.eu header.i=@1wt.eu header.b="iQSdxh66" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1wt.eu; s=mail; t=1772880648; bh=kp77M3cvr1YM8pOYl2iPnFKMVPOoiYkZA8aEfH1sI1o=; h=From:Message-ID:From; b=iQSdxh66/kDvyrJdgeMdBZudQr80qLhfxkrRoiWG8FPJstP3PadfnSJHMGvYD+DKg 5H55GsthoNDjwa44PbPqS46r+I4FQKI9vRuEMqf0gGMLKbD6qeXCmdOqpHklPHHH7F Zi/0Wd5Z/0excpbWHCdsSRT8K+fTds8TKRp3q9UA= Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by mta1.formilux.org (Postfix) with ESMTP id AF8AFC0A0E; Sat, 07 Mar 2026 11:50:48 +0100 (CET) Date: Sat, 7 Mar 2026 11:50:48 +0100 From: Willy Tarreau To: david.laight.linux@gmail.com Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , linux-kernel@vger.kernel.org, Cheng Li Subject: Re: [PATCH v4 next 01/23] tools/nolibc: Add _NOLIBC_OPTIMIZER_HIDE_VAR() to compiler.h Message-ID: References: <20260302101815.3043-1-david.laight.linux@gmail.com> <20260302101815.3043-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: <20260302101815.3043-2-david.laight.linux@gmail.com> On Mon, Mar 02, 2026 at 10:17:53AM +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 Can definitely be useful from time to time, I'm doing similar things in my programs all the time and after I regret not having centralized it. Here it will help contributors who could get discouraged by code size variations caused by their tiny changes. > Signed-off-by: David Laight Acked-by: Willy Tarreau Willy > --- > Changes for v4: > - Remove #if guard > > tools/include/nolibc/compiler.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compiler.h > index a8c7619dcdde..f03f84cfadce 100644 > --- a/tools/include/nolibc/compiler.h > +++ b/tools/include/nolibc/compiler.h > @@ -71,4 +71,7 @@ > # define __nolibc_static_assert(_t) > #endif > > +/* Make the optimizer believe the variable can be manipulated arbitrarily. */ > +#define _NOLIBC_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "+r" (var)) > + > #endif /* _NOLIBC_COMPILER_H */ > -- > 2.39.5