public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bertrand Drouvot <[email protected]>
To: Tom Lane <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: [email protected]
Subject: Re: Defend against -ffast-math in meson builds
Date: Wed, 11 Mar 2026 18:29:47 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<vwnxbsap65km373ghtqhhvhwnc35suwraegb7z5op4okxyuwzu@kpaumampogpe>
<[email protected]>
<[email protected]>
<abGPko4lPv/[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Hi,
On Wed, Mar 11, 2026 at 02:03:28PM -0400, Tom Lane wrote:
> Bertrand Drouvot <[email protected]> writes:
> > 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]:
>
> > it compiles fine with CFLAGS="-ffast-math" CC="gcc" meson setup meson_build but
> > produces issues during the regression tests.
>
> > 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
>
> Oy. Surely that is a meson bug? AFAICS most of the effects of
> -ffast-math should occur at compile time. Perhaps it also results
> in linking a different version of libm, but that's not everything.
> So just transposing it into link flags is not okay.
What I can see is that with CFLAGS="-ffast-math", I get:
$ objdump -t meson_build/src/backend/postgres | grep crtfast
0000000000000000 l df *ABS* 0000000000000000 crtfastmath.c
but it's empty without it.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (14+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Defend against -ffast-math in meson builds
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox