From: Andres Freund <andres@anarazel.de>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgresql.org
Cc: robertmhaas@gmail.com
Subject: Re: static libpq (and other libraries) overwritten on aix
Date: Thu, 18 Aug 2022 09:03:57 -0700
Message-ID: <20220818160357.w7cbzw6o7eacqe72@awork3.anarazel.de> (raw)
In-Reply-To: <20220818045929.GB410601@rfd.leadboat.com>
References: <20220817190154.nnu27rvcleu2764m@awork3.anarazel.de>
<20220818045929.GB410601@rfd.leadboat.com>
Hi,
On 2022-08-17 21:59:29 -0700, Noah Misch wrote:
> The AIX sections of Makefile.shlib misuse the terms "static" and "shared".
>
> Imagine s/static library/library ending in .a/ and s/shared library/library
> ending in .so/. That yields an accurate description of the makefile rules.
I realize that aspect.
My point is that we currently, across most of the other platforms, support
building a "proper" static library, and install it too. But on AIX (and I
think mingw), we don't, but without an explicit comment about not doing so. In
fact, the all-static-lib target on those platforms will build a non-static
library, which seems not great.
> > There could also be
> > a race in the buildrules leading to sometimes static libs sometimes shared
> > libs winning, I think.
>
> Not since commit e8564ef, to my knowledge.
I'd missed that the $(stlib): ... bit is not defined due to haslibarule being
defined...
> Along the lines of Robert's comment, it could be a nice code beautification to
> use a different suffix for the short-lived .a file. Perhaps _so_inputs.a.
Agreed, it'd be an improvement.
Afaict we could just stop building the intermediary static lib. Afaict the
MKLDEXPORT path isn't needed for libraries without an exports.txt because the
linker defaults to exporting "most" symbols, and for symbols with an
exports.txt we don't need it either.
The only path that really needs MKLDEXPORT is postgres. Not really for the
export side either, but for the import side.
Greetings,
Andres Freund
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: pgsql-hackers@postgresql.org
Cc: andres@anarazel.de, noah@leadboat.com, robertmhaas@gmail.com
Subject: Re: static libpq (and other libraries) overwritten on aix
In-Reply-To: <20220818160357.w7cbzw6o7eacqe72@awork3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox