Re: AIX support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Srirama Kucherlapati <sriram(dot)rk(at)in(dot)ibm(dot)com>
Cc: Aditya Kamath <Aditya(dot)Kamath1(at)ibm(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Noah Misch <noah(at)leadboat(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, "peter(at)eisentraut(dot)org" <peter(at)eisentraut(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>, "tristan(at)partin(dot)io" <tristan(at)partin(dot)io>, "postgres-ibm-aix(at)wwpdl(dot)vnet(dot)ibm(dot)com" <postgres-ibm-aix(at)wwpdl(dot)vnet(dot)ibm(dot)com>
Subject: Re: AIX support
Date: 2026-02-16 01:09:12
Message-ID: 986635.1771204152@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> * The autoconf build produces warnings about TOC overflow
> while linking the backend, as I showed upthread. I don't
> understand why -Wl,-bbigtoc doesn't silence that, especially
> since no such warnings appear in the meson build.

Hah, I've got at least part of the answer: that TOC warning appears
if the backend is built with -O0, but not at higher -O levels.
The apparent connection to autoconf vs. meson is because earlier
versions of the patch were building at -O0, due to template/aix
overriding CFLAGS and thereby preventing configure.ac from
inserting its default -O2. After I got rid of that interaction,
autoconf builds at -O2 by default and there's no warning.
Conversely, the warning does appear in the meson build if
I set -Dc_args=-O0.

Now, this is still a bit confusing, because the backend executable
is actually smaller at -O0 (due to less inlining, I guess), so
shouldn't it be less prone to TOC overflow? But I mainly cared
about the discrepancy between autoconf and meson builds,
and that seems adequately explained.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-02-16 01:10:58 Re: Fix uninitialized xl_running_xacts padding
Previous Message Thomas Munro 2026-02-16 00:50:54 Re: Small improvements to substring()