Re: Defend against -ffast-math in meson builds - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Defend against -ffast-math in meson builds
Date
Msg-id vwnxbsap65km373ghtqhhvhwnc35suwraegb7z5op4okxyuwzu@kpaumampogpe
Whole thread
In response to Defend against -ffast-math in meson builds  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Defend against -ffast-math in meson builds
List pgsql-hackers
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...

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Remove header lock BufferGetLSNAtomic() on architectures with 64 bit atomic operations
Next
From: Ayush Tiwari
Date:
Subject: Re: tid_blockno() and tid_offset() accessor functions