Re: Let's stop with the retail rebuilds of src/port/ files already
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@lists.postgresql.org,Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-09-27T04:24:48Z
Lists: pgsql-hackers
Hi, On September 26, 2018 9:03:05 PM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote: >Andres Freund <andres@anarazel.de> writes: >> On 2018-09-26 19:10:40 -0400, Tom Lane wrote: >>> I'm getting tired of having to make fixes like ce4887bd0. I think >>> we should rearrange things so that src/port/ and src/common/ compile >>> all their files a third time using shared-library-friendly switches, >>> put them into new .a files, and have libpq and the ecpg libraries >>> just include those libraries instead of what they're doing now. > >> +1 > >Here's a partial patch for that: it adds the third build variant >to src/port/ and teaches libpq to use it. We'd want to likewise >modify src/common/ and fix up other callers such as ecpg, but this >seems to be enough to test whether the idea works or not. > >I've tried this on Linux, macOS and HPUX and it seems to work in >those cases, but I'm not foolish enough to imagine that that's >exhaustive. > >What I think would make sense is to push this and see what the >buildfarm thinks of it. If there are unfixable problems then >we won't have wasted time fleshing out the concept. Otherwise, >I'll do the remaining pieces. Sounds reasonable to me. Medium-long term I think we should consider trying to reduce the duplication tho. Once we provide an elog and error handling wrapper, we really should be able to reduce duplication (code and build) a fair bit. But that should be tackled separately. Andres -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Commits
-
Build src/common files as a library with -fPIC.
- 7143b3e82136 12.0 landed
-
Remove pqsignal() from libpq's official exports list.
- f7ab80285520 12.0 landed
-
Build src/port files as a library with -fPIC, and use that in libpq.
- ea53100d5671 12.0 landed