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 1w0KDV-001oQu-29 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 14:07:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0KDT-009N23-0J for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 14:07:15 +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 1w0KDS-009N1u-2c for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 14:07:15 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w0KDR-00000001cNH-2XGW for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 14:07:14 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 0E5687A00C0; Wed, 11 Mar 2026 10:07:12 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 11 Mar 2026 10:07:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=fm3; t=1773238032; x=1773324432; bh=HT17uHofa9AuluMIZZ0Q1PCRqe35LYB5 qc83Ye9NDk0=; b=h4zagoDf4punFOpt/qg/Ja9wP/LwYSK1D9l8h7xe+3cRjVSx HE09iU36RRwedHq7QxS14fuNb8O6d+oCF5Yk9eiRE+FD2MSWIEEYFvjrguwbjPd7 s2/ZaeqYcWfUw6MHevGCaORFycrJNmiS808Q9CMryY8JHhuxMvUenhYgHdJqnvjg t1SnYnik9EIZlO0EtSiu7+vrvpD416BcpTFl5z8ldW0KDJyfOUNXZsxOOUD5Q1o+ +QjsulPprnIguDH7SdOvJO+xEfpRnz+zTdO6bsw1sJaj974p7U/rdUlf7DXP5LDR CziM3b5igPpiZxFfVdbrILLEsQl73V7yiVqAQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1773238032; x= 1773324432; bh=HT17uHofa9AuluMIZZ0Q1PCRqe35LYB5qc83Ye9NDk0=; b=z lkab4FWZKYQ59GlaHrjMC+urTXWKHATBAGBUDvMipwxRQk+xs0U5FZHOP+r9WDeO OfGk3v9fRIGlBZ6xAhmt/Yglv1lHJv2PNlOb6SfL0J5EtNH9JzWVlRnj7G76qt0m s3M8r+M+1mTj5XKlR48BSt2+6JaGatMtp4hfN8F6pSisRUCCfKMhYaajcz9n5CqN wQfBmjxN0alMNv3omJLOk0X3t0wvdjZqcRbOWoysbVRe8haVQwOdW8Ch4RIbDavK z2yFGZ0ub5ZknaA+EUNUk5bOCFSZwo+ER3B2HqHnOfwy/KDBvtviLoF+ONA8Rl5u fIBRnXQTeU6NfG+WwFfwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvkeegtdelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeutedv ffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrnhgurhgvshesrghnrghrrg iivghlrdguvgdprhgtphhtthhopegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhm rghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrd hpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Mar 2026 10:07:11 -0400 (EDT) Message-ID: Date: Wed, 11 Mar 2026 15:07:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Defend against -ffast-math in meson builds To: Andres Freund , Bertrand Drouvot Cc: pgsql-hackers@lists.postgresql.org References: Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11.03.26 14:43, Andres Freund wrote: > Hi, > > On 2026-03-11 11:52:28 +0000, Bertrand Drouvot wrote: >> while working on a patch (not shared yet), I had issues with floating-point and >> realized that we don't defend against -ffast-math in meson builds. We defend >> against in autoconf (because we don't want fast-math optimizations [1]), so the >> attached does the same for meson. > > I don't find this (nor the autoconf check) particularly likely to be > helpful. The most likely way the flag would unintentionally be added would be > via the cflags of some dependency - which won't be picked up by the tests. > > However we do have tests during the builds that should pick it up, in date.c > and timestamp.c... The existing check in configure is because certain Linux distributions used to compile everything with -ffast-math to be "faster", and that kept breaking PostgreSQL and so we wanted to stop them very early. These are gone, and the defenses in the code like date.c should be sufficient for any new attempts. I think we could remove the check in configure.