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