Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0O1N-001rXT-0I for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 18:11:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0O1K-00B35O-1T for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 18:10:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0O1K-00B35F-0X for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 18:10:58 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w0O1I-00000001eG9-3Y3A for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 18:10:57 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id DD0F47A0076; Wed, 11 Mar 2026 14:10:55 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 11 Mar 2026 14:10:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=1773252655; x=1773339055; bh=vWzzOc59eu NecLfpnf49s+pki3wGXe0B7HMLklLlI8E=; b=UowK1LtHcl5GsAFKuNB3nTCEdh VvhCSPdXSljjCaxUi2dZ7Tcutvq6XklXzQXjkIsFYiSY6voNgER9AwzJ7A5gkrfY Nt5NOVJn19OhOMwc+2aASvCZ9mpjwfhJ21rL1mMHOlRU7Ec1rcCVUgfhiFO2C8Yf ZRsOrUI6kkWALRBTWxUvpN95MCJrAFayKEYYqLEcm5J4o/tWxT+xS0jYNAp/ke6y DyKbqU9ANnmWcNdydCuGtFfMk4pu+rkE/UrHXChhxM3Tt0JObiTiOpySnPg8mDQS 8EWbp/TZhlYplDRFeWtjHmeWoURTWeXtKo6aGz89ZwsXbaaY/uPu0VxrQjig== 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-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1773252655; x=1773339055; bh=vWzzOc59euNecLfpnf49s+pki3wGXe0B7HM LklLlI8E=; b=euw95pvKnD1vTo3gDU3uA4/Ru8NRJfpBZ2BZaESH0qSElWYeHn7 tSe/FsB+yMyYDRQFIxf0D5QWMlQR7eiNKp6KhXZ8HyYwKqGoY7LAgE80I9nwSQrw KXXxe+4Wx6kkRmdKe4KPMN4cKEA+IPHMguuQiXX51q/fr14fw0y4v5/d/Rl5Il+8 qZ/6/l506DHCqT42I+sjGDROFjJDx8Mj6ocHWfvzPQMxo6xxpnbkOuuhACnSI6UY KydhLlA1wOVjTdc1usF48DbjWFUzZey0U3qtaPXUQosh2CO35zZ/HESZKE4Nt8rB GdCKvhBW7hg4Nf9bCzIleoY2229AR03ezsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvkeegheelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepfeffgfelvdffgedtveelgfdtgefghfdvkefggeetieevjeekteduleevjefh ueegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh dprhgtphhtthhopegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdrtgho mhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrh gvshhqlhdrohhrghdprhgtphhtthhopehtghhlsehsshhsrdhpghhhrdhprgdruhhs X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Mar 2026 14:10:55 -0400 (EDT) Date: Wed, 11 Mar 2026 14:10:54 -0400 From: Andres Freund To: Bertrand Drouvot Cc: Tom Lane , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Subject: Re: Defend against -ffast-math in meson builds Message-ID: References: <3316.1773242385@sss.pgh.pa.us> <3583.1773247555@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-03-11 17:54:33 +0000, Bertrand Drouvot wrote: > > But maybe we should move the > > code-level tests out of the datetime files and into utils/float.h > > or some such place. > > But still, I'm not sure the code-level guard is enough for meson. I think we > need to put a guard in meson.build for the "oddity" described in [1]: I think you rather need to get to the bottom of that issue. > it compiles fine with CFLAGS="-ffast-math" CC="gcc" meson setup meson_build but > produces issues during the regression tests. This fails to build here as expected. Are you sure that you actually specified it during meson setup and then didn't reconfigure while the CFLAGs aren't specified? > I just had a closer look and it looks like that the reason is that it's being > added at link time: > > $ cat meson_build/build.ninja | grep LINK_ARGS | grep -c "ffast-math" > 254 It's added to both, compile and link args, afaict? andres@awork3:/tmp/pg-fast-math$ grep ffast-math build.ninja |awk '{print $1}'|sort|uniq -c 1679 ARGS 255 LINK_ARGS Greetings, Andres Freund