From patchwork Fri Jun 7 06:46:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13689365 Received: from fout2-smtp.messagingengine.com (fout2-smtp.messagingengine.com [103.168.172.145]) (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 89D2A1527BA for ; Fri, 7 Jun 2024 06:46:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742796; cv=none; b=rFSCqM5ceWFokYmt+Ew5vc4LfdEF5bEK9ghH/9uOYhtJtVFIUiQPK3+SgXEXY37W2xaLSv+JhdspYEF2wgyfUeMUGUgbtgKF9mAmfv4b8QkfoZRsxxLtQxzMmIPGfL0TsYb30frdPJPFVb1eyT+1L872Ccjjp4CTjN4OwLBo7tc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742796; c=relaxed/simple; bh=9XNtlwrmZtZYVWNEDGu9bbUwGx4gXO4K+vEZNxedlgE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ffxgYdyNTGdikGWwIXYOzHRf/mLGLQYB41Dm0ODFFR1yWQrk2Nn6zMO4j9vxB85QHCqjJgDailbq55fVcht/r1hobD/LqWApOSRvWTWU4AGB9z4ZpiMVs51eYRjGjyMv2DjAMBP9bwcUcjMOWqr5diG9kStedCJpb3qIZ01gSGg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=pVtDPo3p; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gfgJOvYC; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="pVtDPo3p"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gfgJOvYC" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id 7D40313801E3; Fri, 7 Jun 2024 02:46:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 07 Jun 2024 02:46:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717742793; x=1717829193; bh=ggQt4KAHdX pBEwMgGXIuy5lSqnqKCsfVLga6x+qPnP0=; b=pVtDPo3pabyovcxsJHo1hMGah6 Mr4dkYAaY6RQR2b5tQ9H1AHS2sjkfUrBHSST7mVe0WL/1Zx03pZ2DRTJjDpVb/j1 dwqfrnC05/Hl2j1PBYLXSHF9Fi8HVLb12Ua6Yne0vTb1/kAchM/z/JBcr3+feuk8 b1fCWL0/G0OyDWq2tFauquhhAA/eHmYvyBaYURleyoXyaiuL/I4W9QemPaz26/uq 84nQEn9E8OUF+AUPMyPuTonHtUlLdaCaoU8f1n6Xx/IlrGtRnQ9p2bARjG5Q6bh7 8c4aYvInCac1Bswa3wOmbs9ONi9Rj30RFRNSoXIQxf3V4F9vvSFFz9bmz4bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717742793; x=1717829193; bh=ggQt4KAHdXpBEwMgGXIuy5lSqnqK CsfVLga6x+qPnP0=; b=gfgJOvYC4mwydSzTSyLfDGw+5LF8fwCm1ibihGRPY5yJ /7D2umvQOPm556CWLXsGWDUzgXnDaZwzi/f/8gHwHNjrve0vCZSC+Nf8Do/bAQpz SObDhuonMBNuEv07jFFqDxfvuMBzGSn7ND1Phgruixi+rk6oVw6PG1Zf5T1bCOFG Jc/KnyBigA99qUUUmn/q8medrBLPlQ5DQjj/dFAYJr3Z7X2UIl7xbSdiASIc3rub /HlBp1yqtPba3Bto9DPlamGor1Zdek7TorJXDug8JHXcwqWotKEL4vgdnbJx5qSl WLXAw1S6gxUb74Hsg+TG+oovpseYDwqlRETvCBnJIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelledguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkfhggtggujgesgh dtreertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhs sehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepueektdevtdffveeljeetgfehheeige ekleduvdeffeeghefgledttdehjeelffetnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Jun 2024 02:46:32 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id db41c8c2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 7 Jun 2024 06:46:30 +0000 (UTC) Date: Fri, 7 Jun 2024 08:46:29 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH v3 1/4] ci: fix check for Ubuntu 20.04 Message-ID: <70fa755b4ffd396904c9f20f8a783ab194699d77.1717742752.git.ps@pks.im> References: <20240606080552.GA658959@coredump.intra.peff.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In 5ca0c455f1 (ci: fix Python dependency on Ubuntu 24.04, 2024-05-06), we made the use of Python 2 conditional on whether or not the CI job runs Ubuntu 20.04. There was a brown-paper-bag-style bug though, where the condition forgot to invoke the `test` builtin. The result of it is that the check always fails, and thus all of our jobs run with Python 3 by accident. Fix this. Signed-off-by: Patrick Steinhardt --- ci/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/lib.sh b/ci/lib.sh index 1f4059b1b8..814578ffc6 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -328,7 +328,7 @@ ubuntu-*) # Python 2 is end of life, and Ubuntu 23.04 and newer don't actually # have it anymore. We thus only test with Python 2 on older LTS # releases. - if "$distro" = "ubuntu-20.04" + if test "$distro" = "ubuntu-20.04" then PYTHON_PACKAGE=python2 else From patchwork Fri Jun 7 06:46:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13689366 Received: from fout2-smtp.messagingengine.com (fout2-smtp.messagingengine.com [103.168.172.145]) (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 5B13B1527BA for ; Fri, 7 Jun 2024 06:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742799; cv=none; b=AF4MNKsdi6+9CCUoBQgBrcUffUtb7TrG62kYNWFUWgnLRc8Vv4aRg1+y0VWj4xYz0cYCzQ2KLEgtKvKkQzLjBI/SP6ExOmt+QbPKNTXUZVKvAjHqbEEB8xB56Q2Gra0rolms3nbX5qmf/0JD2ZSpK/t/gzT4iOikEMk55Hckxbo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742799; c=relaxed/simple; bh=7v+TUkVGdzn7mqIdvMGbMP0GoOA1dH+LKVw6CM5XQko=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SvrMPNvwQWebd5tWrVHefl5wI1LOgHsKa/++pArzpn+gaoEQY/AX6W8uIq6QjzBMU6RY/YBwZeqj+ZMQGTRQRtzgjziUYlqRsUCgbuu5vg+Hawds8aJWp9M2FbobsAjqR1Oxp9marhI+2eVJ3GG68QGXsKz/BUt1xgGx45hzevQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=YQVslhdf; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=O25YSQnY; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="YQVslhdf"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="O25YSQnY" Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id A3F8B13800D5; Fri, 7 Jun 2024 02:46:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 07 Jun 2024 02:46:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717742797; x=1717829197; bh=7v+TUkVGdz n7mqIdvMGbMP0GoOA1dH+LKVw6CM5XQko=; b=YQVslhdfUIHKvBCQxQJyx4Vqcn BV3G3wu75RHwptB//PulGhEe+ZOV0DpSyQ9trGlGPfHPv4CVKWNyUk1cgBvPJ85J 14sBer9IVtBwUCE/aj+rPBu8BNVcAyE5go/7fFYh+rG8bx+gTTl28v3avRDF6Dza XSFndOhVpdSUllRk4y8mIbFavn0C1ijKcmBgHEXl29muKqBVR3mC1cTGXBPRALs4 q+kGVTOrMW8Uc5+igIdNDA/0OafrEGs8FkERFeHdxiFlrWlwwK0/62FkQEKLrUHY gQqNOD6FC7Tx8sAkaQEqyzGUufZE6hk41BaOF8DJYJ6AfP8wy7q5TOzGZcOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717742797; x=1717829197; bh=7v+TUkVGdzn7mqIdvMGbMP0GoOA1 dH+LKVw6CM5XQko=; b=O25YSQnYJ4d0u43al9Axjho3DyPK7FzC2I1LSj46s69s 4wcM8jENQYkLvUBSFMYlcck3w54gIQ/MN+ra7QIA8q+eXgSzZr8nX53zmfJuJxKA Dd4lLE9akReHqVhtZiS2WbLavj9/qrEaSmnNcRt8IdFO3dATziFQB6bjNDh6JOdc ZdZZM0b+oYyuC69hUu3D5jE2KPL24Jmbj48jT+IKR1ZAJPVbr5yEZ5Mft76Cv7Bp LWlinpTjZ0xB25F+xYzTB8LK7OrpGPqnrYXfUYnE6lmMeW8ePVYuFRbFR6a9wIlP FrqXe96wdd9Ot1ed5xCZBJrz27WpB4AZzB1TyokLug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelledguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkfhggtggujgesgh dtreertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhs sehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepueektdevtdffveeljeetgfehheeige ekleduvdeffeeghefgledttdehjeelffetnecuvehluhhsthgvrhfuihiivgepudenucfr rghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Jun 2024 02:46:36 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 27a888c7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 7 Jun 2024 06:46:35 +0000 (UTC) Date: Fri, 7 Jun 2024 08:46:34 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH v3 2/4] Makefile: add ability to append to CFLAGS and LDFLAGS Message-ID: References: <20240606080552.GA658959@coredump.intra.peff.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: There are some usecases where we may want to append CFLAGS to the default CFLAGS set by Git. This could for example be to enable or disable specific compiler warnings or to change the optimization level that code is compiled with. This cannot be done without overriding the complete CFLAGS value though and thus requires the user to redeclare the complete defaults used by Git. Introduce a new variable `CFLAGS_APPEND` that gets appended to the default value of `CFLAGS`. As compiler options are last-one-wins, this fulfills both of the usecases mentioned above. It's also common practice across many other projects to have such a variable. While at it, also introduce a matching `LDFLAGS_APPEND` variable. While there isn't really any need for this variable as there are no default `LDFLAGS`, users may expect this variable to exist, as well. Note that we have to use the `override` directive here such that the flags get appended when compiling with `make CFLAGS=x CFLAGS_APPEND=y`. Signed-off-by: Patrick Steinhardt --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 2f5f16847a..b5252bed3d 100644 --- a/Makefile +++ b/Makefile @@ -1359,7 +1359,9 @@ endif # which'll override these defaults. # Older versions of GCC may require adding "-std=gnu99" at the end. CFLAGS = -g -O2 -Wall +override CFLAGS += $(CFLAGS_APPEND) LDFLAGS = +override LDFLAGS += $(LDFLAGS_APPEND) CC_LD_DYNPATH = -Wl,-rpath, BASIC_CFLAGS = -I. BASIC_LDFLAGS = From patchwork Fri Jun 7 06:46:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13689367 Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (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 9E1AB1514DB for ; Fri, 7 Jun 2024 06:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742805; cv=none; b=rLs8lUFoLwZSgLW0sE+BoKsplEcE/zpF0JtmSeXQIo9tNKrKmuTlqAkirXy0lbJwYOWjHz/6mavNCSzAc6Uheor3xQI2JeXEtZpq5TUUhqh1SE0s1rRvsBVJlAxX+/PSxBsIbzuEdb/OfbP8Bz+drDwLvi6zOeay6pt4sphAP7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742805; c=relaxed/simple; bh=SJjSif4ka3maRNXxihYMAq4pUCWFXuEuF4l8kjdYOyk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rzouLxJdETSRK1Dx8MUKrsfi7v7XO2bNaLM9QpLZJ/BOgXkdpat1kbb+F/PyXhA8m8tGguBYymCayHgCI6ozpX+SecPWEa52Aih0/SUYwdUp/Uru40zrT0VT3iIe9qc6q3yJ/NbfuLU/WI2vivb9FRduCq1HqjrwcXLgfLeAlI0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=NHALjx2i; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=h6Nd0ghi; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="NHALjx2i"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="h6Nd0ghi" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id C7CB81140223; Fri, 7 Jun 2024 02:46:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 07 Jun 2024 02:46:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717742802; x=1717829202; bh=zw/ujqq+eq gv54VlnGCI4r80AdycRyfdH8R+Jhrx+l8=; b=NHALjx2ij95nCytqXbgJ5XEqEz Ub4IoVP2HJH6ErQ677PAXpRiN2OCMJ9z3imCINUWwws1DOPDv+0sSexV3/FoDtWP 6BZFZQCu8o/2ARL6LpJRhyRxsQhlF4ve0X5F9h95OgNS6UAXj3RKe/enxMPYHA4S QuA3ImcbyeJA4TfdUkbPtaNzcivf0LU4xfcl3cWeBwoH9Y3XPt+JdULqCJBR/Cxx 2ZsT90JvIpqmjBUp7WfEOkCiVIO0sIxM+I1gR0riSov5OxsI3KzScKkM9Z8FrgFX BGdBeAdroM9Sz5i3262hEW2eRdzi5B88ztUIZlj9CwNsShYlDwCILmHfMrRw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717742802; x=1717829202; bh=zw/ujqq+eqgv54VlnGCI4r80Adyc RyfdH8R+Jhrx+l8=; b=h6Nd0ghiy9A5mZ/xVxs+BYYz17OMIE9CLa4N0zEPRcnM QIRWIji47fY9QdPRgwiePatVbslTaCSw2DzrJJ00G7FYtCxCp4BGTMhUnlnP7iTU a0Afr92E7wTTW7KTYzYuKIra+HQ2MogKDhI6RgjfTSlf7585Hy+eXrZgzZlVtW/+ TkJ/JQteO6+mmhf80s7VyAzAsXKerrg/lSZKEG7AYiGvMQMcJlV0ETiZqVLNQcXz yWvn0uf+ZWxeSLiSKKKj7CJJpY3TjCpJHKizkmEJ+VCQggRy6NexQrbSVxpv/izV +f48vF+Jh6v+2r6QtHBrUtiFZfW/OWa9JRQt93Rb1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelledguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkfhggtggujgesgh dtreertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhs sehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepueektdevtdffveeljeetgfehheeige ekleduvdeffeeghefgledttdehjeelffetnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Jun 2024 02:46:41 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 919b8372 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 7 Jun 2024 06:46:40 +0000 (UTC) Date: Fri, 7 Jun 2024 08:46:38 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH v3 3/4] ci: compile code with V=1 Message-ID: References: <20240606080552.GA658959@coredump.intra.peff.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: It's hard to see which compiler flags our CI uses because we do not compile with `V=1`, and thus we only see beautified output. This information can be important at times though and may help developers to see what's going on in a CI job. Furthermore, both GitLab and GitHub have sections in their output such that the build output can be neatly hidden away, so it doesn't clutter the output, either. Compile code with `V=1` to improve debuggability. Signed-off-by: Patrick Steinhardt --- ci/run-build-and-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 98dda42045..2aaaf40f94 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -48,7 +48,7 @@ pedantic) ;; esac -group Build make +group Build make V=1 if test -n "$run_tests" then group "Run tests" make test || From patchwork Fri Jun 7 06:46:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13689368 Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (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 D163C14F9DB for ; Fri, 7 Jun 2024 06:46:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742811; cv=none; b=STA4ra/qJV1rGMO5i2qU4DcERyQ3Z3hX3o9R7XTdTAbmu99JvQmX7qszo/RaX3AIOaZ7KycXTOE7dkZsdFJdTeDKilwGkP21OkR/fLIjgkMezRgKyedDWy17+8qGmF5VP3nBeb1j7I/fagLSocjPYBiBOUw3JAuCG16TbDj3fCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717742811; c=relaxed/simple; bh=w2iN7ji5o9WhldeE1kKfKiVY7V8gSD0os3ukzuXcbCs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dLhk61s3AZOyWp+le+WLZ00mr4ATIKMO0pmuATq0ngnOjkPJy4gCNbsgFuBi2MdUHa8rfVn1SfIFIwyRvwj/UCtINh8zcfzUSd9YnZrb6QfPiyqjwKKiptvHT7qSm4kqJ6sGJwWL12AImKwp8OeYEpGPqCh4pgmq7fk0mTbQ4eQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=ogOqRmSM; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=RCVOKLWF; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="ogOqRmSM"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RCVOKLWF" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id EE7FE1140085; Fri, 7 Jun 2024 02:46:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 07 Jun 2024 02:46:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717742808; x=1717829208; bh=OnzHzsbOmZ KNPQcUzeyUs9f+AZ+EPf1SZUOC41QFKv0=; b=ogOqRmSMCJVwQx9W4E0ztmqgV4 g/IZuQ0OiE78jmzYsBwdPa7iCb7dkziDH6XYdsuvfnUKoqaYjHJkR+bfL4UrlTVA +On3bSpQoiVWEtqPqEne7Pcq6NuxEDLeqgZbax6iRifFhqfCfk2gxlttpw2VA48H c+1d99DqHoqMJJeD+xDegPpWJUEUUR08cVr5Iw9rDBfi7QVDlfv4SCIQNF0qY7cy IMbcrVlR/cwDX1xDA+OQA8T4J9Ki6biyslwX4nmzdj8bstAzMI0nhz0ozeB/tgMd 7AxD5mooG111uJDuI70Fw+gzrqZQrGdZrYZDDobXLECdlY2b93l+uDIi9qbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717742808; x=1717829208; bh=OnzHzsbOmZKNPQcUzeyUs9f+AZ+E Pf1SZUOC41QFKv0=; b=RCVOKLWFyaCH6tjEfkkG5fLV6c5hRA4jKIziHQSi0fRY OHQhgkBns+B/t6YBvDuh6IDWdljdNnhIhVd55FgOiqiZ3kwHCFUKp4S+GYgfSBVx 1A9oIfRBqBxAPpNEWpGYtXGc111qmSPe/xJeLNBQ6fJXH2K9j8+1vmnbM783ig6O VP4riYGw9AaaducK/2fCilVolTUUhxWuCOtPY7tlJXuwXL7Tf609RgHXmtUAbQWm v01IF5+asUzTaE6qbhsIizIYJx+3ksjo47vsc0pkv/KmNmhRgngJoLY/4c7vIiwm 6wCMGJRjdOl68RaotOlj+ol5VIoKSZPnATEM7g5cuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelledguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkfhggtggujgesgh dtreertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhs sehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepueektdevtdffveeljeetgfehheeige ekleduvdeffeeghefgledttdehjeelffetnecuvehluhhsthgvrhfuihiivgepudenucfr rghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Jun 2024 02:46:47 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 763a70dc (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 7 Jun 2024 06:46:46 +0000 (UTC) Date: Fri, 7 Jun 2024 08:46:45 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH v3 4/4] ci: compile "linux-gcc-default" job with -Og Message-ID: References: <20240606080552.GA658959@coredump.intra.peff.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We have recently noticed that our CI does not always notice variables that may be used uninitialized. While it is expected that compiler warnings aren't perfect, this one was a bit puzzling because it was rather obvious that the variable can be uninitialized. Many compiler warnings unfortunately depend on the optimization level used by the compiler. While `-O0` for example will disable a lot of warnings altogether because optimization passes go away, `-O2`, which is our default optimization level used in CI, may optimize specific code away or even double down on undefined behaviour. Interestingly, this specific instance that triggered the investigation does get noted by GCC when using `-Og`. While we could adapt all jobs to compile with `-Og` now, that would potentially mask other warnings that only get diagnosed with `-O2`. Instead, adapt the "linux-gcc-default" job to compile with `-Og`. This job is chosen because it uses the "ubuntu:latest" image and should thus have a comparatively recent compiler toolchain, and because we have other jobs that use "ubuntu:latest" so that we do not lose coverage for warnings diagnosed only on `-O2` level. To make it easier to set up the optimization level in our CI, add support in our Makefile to specify the level via an environment variable. Signed-off-by: Patrick Steinhardt --- ci/run-build-and-tests.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 2aaaf40f94..e5fbe7f531 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -13,6 +13,15 @@ esac run_tests=t case "$jobname" in +linux-gcc-default) + # Warnings generated by compilers are unfortunately specific to the + # optimization level. With `-O0`, many warnings won't be shown at all, + # whereas the optimizations performed by our default optimization level + # `-O2` will mask others. We thus use `-Og` here just so that we have + # at least one job with a different optimization level so that we can + # overall surface more warnings. + export CFLAGS_APPEND=-Og + ;; linux-gcc) export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main ;;