From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Always use -fPIC, not -fpic, when building shared libraries with |
Date: | 2017-06-01 17:33:17 |
Message-ID: | E1dGTyH-00060l-86@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Always use -fPIC, not -fpic, when building shared libraries with gcc.
On some platforms, -fpic fails for sufficiently large shared libraries.
We've mostly not hit that boundary yet, but there are some extensions
such as Citus and pglogical where it's becoming a problem. A bit of
research suggests that the penalty for -fPIC is small, in the
single-digit-percentage range --- and there's none at all on popular
platforms such as x86_64. So let's just default to -fPIC everywhere
and provide one less thing for extension developers to worry about.
Per complaint from Christoph Berg. Back-patch to all supported branches.
(I did not bother to touch the recently-removed Makefiles for sco and
unixware in the back branches, though. We'd have no way to test that
it doesn't break anything on those platforms.)
Discussion: https://postgr.es/m/20170529155850.qojdfrwkkqnjb3ap@msg.df7cb.de
Branch
------
REL9_3_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/cee7238de58fca9c0a3c7f5012eb4f905f80fde6
Modified Files
--------------
doc/src/sgml/dfunc.sgml | 26 ++++++++++++--------------
src/makefiles/Makefile.linux | 7 +++----
src/makefiles/Makefile.netbsd | 4 ----
src/makefiles/Makefile.openbsd | 4 ----
4 files changed, 15 insertions(+), 26 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-06-01 21:22:46 | pgsql: Modify sequence catalog tuple before invoking post alter hook. |
Previous Message | Magnus Hagander | 2017-05-31 19:01:45 | pgsql: Generate pg_basebackup temporary slot name using backend pid |