Re: meson PGXS compatibility - Mailing list pgsql-hackers

From Andres Freund
Subject Re: meson PGXS compatibility
Date
Msg-id 20221007191608.dlcs56br2jjfpqfz@awork3.anarazel.de
Whole thread Raw
In response to meson PGXS compatibility  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

On 2022-10-05 13:07:10 -0700, Andres Freund wrote:
> 0003: aix: Build SUBSYS.o using $(CC) -r instead of $(LD) -r
>
>   This is the only direct use of $(LD), and xlc -r and gcc -r end up with the
>   same set of symbols and similar performance (noise is high, so hard to say if
>   equivalent).
>
>   Now that $(LD) isn't needed anymore, remove it from src/Makefile.global
>
>   While at it, add a comment why -r is used.

Unfortunately experimenting further with this it turns out I was wrong: While
xlc -r results in the same set of symbols, that's not true with gcc -r, at
least with some versions of gcc. gcc ends up exposing some of the libgcc
symbols.

That can be rectified by adding -nostartfiles -nodefaultlibs, but that
basically makes the change as-is pointless.

I think it'd still be good to get rid of setting LD via configure.ac,
mirroring the detection logic in meson sounds like a bad plan.

Given this is aix specific, and only the aix linker works on aix (binutils'
doesn't), I think the best plan might be to just hardcode ld in the rule
generating postgres.imp.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Israel Barth Rubio
Date:
Subject: Re: Add support for DEFAULT specification in COPY FROM
Next
From: Zhihong Yu
Date:
Subject: Re: Add support for DEFAULT specification in COPY FROM