Re: static libpq (and other libraries) overwritten on aix

From: Andres Freund <andres(at)anarazel(dot)de>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, robertmhaas(at)gmail(dot)com
Subject: Re: static libpq (and other libraries) overwritten on aix
Date: 2022-08-20 17:42:13
Message-ID: 20220820174213.d574qde4ptwdzoqz@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-08-20 01:35:22 -0700, Andres Freund wrote:
> I'll send in a patch series tomorrow, too tired for today.

Here it goes.

0001 aix: Fix SHLIB_EXPORTS reference in VPATH builds

That's mostly so I could even build. It's not quite right in the sense that
we don't depend on the file, but that's a preexisting issue. Could be folded
in with 0005, which fixes that aspect. Or it could be backpatched as the
minimal fix.

0002 Remove SUBSYS.o rule in common.mk, hasn't been used in a long time
0003 Remove rule to generate postgres.o, not needed for 20+ years

Both obvious, I think.

0004 aix: when building with gcc, tell gcc we're building a shared library

That's the gcc -shared issue I explained in the email I'm replying to.

We should probably consider building executables with -shared-libgcc too,
that shrinks them a decent amount (e.g. 1371684 -> 1126765 for psql). But
I've not done that here.

0005 aix: No need to use mkldexport when we want to export all symbols

This makes the building of shared libraries a lot more similar to other
platforms. Export files are only used when an exports.txt is present and
there's no more intermediary static libraries.

0006 configure: Expand -fvisibility checks to more compilers, add -qvisibility

This isn't strictly speaking part of the same "thread" of work, but I don't
want to touch aix more often than I have too... I'll post it in the other
thread too.

I did just test that this passes at least some tests on aix with xlc and
solaris with sunpro.

Greetings,

Andres

Attachment Content-Type Size
v1-0001-aix-Fix-SHLIB_EXPORTS-reference-in-VPATH-builds.patch text/x-diff 1.1 KB
v1-0002-Remove-SUBSYS.o-rule-in-common.mk-hasn-t-been-use.patch text/x-diff 1.0 KB
v1-0003-Remove-rule-to-generate-postgres.o-not-needed-for.patch text/x-diff 1016 bytes
v1-0004-aix-when-building-with-gcc-tell-gcc-we-re-buildin.patch text/x-diff 1.7 KB
v1-0005-aix-No-need-to-use-mkldexport-when-we-want-to-exp.patch text/x-diff 4.1 KB
v1-0006-configure-Expand-fvisibility-checks-to-more-compi.patch text/x-diff 17.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-08-20 18:01:39 Re: [RFC] building postgres with meson - v11
Previous Message Noah Misch 2022-08-20 16:57:13 Re: static libpq (and other libraries) overwritten on aix