postgresql/src/makefiles
Tom Lane 8d9b4fe01b 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
2017-06-01 13:32:56 -04:00
..
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Makefile.aix Fix PGXS support for building loadable modules on AIX. 2012-10-09 21:04:06 -04:00
Makefile.cygwin Consistently define BUILDING_DLL during builds of src/port for Windows. 2014-06-11 19:50:41 -04:00
Makefile.darwin Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Makefile.freebsd Remove allow_nonpic_in_shlib 2012-12-18 01:13:59 -05:00
Makefile.hpux Remove support for Unix systems without the POSIX signal APIs. 2015-08-31 12:56:10 -04:00
Makefile.linux Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:56 -04:00
Makefile.netbsd Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:56 -04:00
Makefile.openbsd Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:56 -04:00
Makefile.sco Split the LDFLAGS make variable into two parts: LDFLAGS is now used for 2010-07-05 18:54:38 +00:00
Makefile.solaris Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Makefile.unixware Split the LDFLAGS make variable into two parts: LDFLAGS is now used for 2010-07-05 18:54:38 +00:00
Makefile.win32 Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pgxs.mk Link $(WIN32RES) into single-file modules only when PGFILEDESC is set. 2015-08-05 20:43:07 -04:00