postgresql/src/template
Tom Lane 1aad3a724a Yet further rethinking of build changes for macOS Mojave.
The solution arrived at in commit e74dd00f5 presumes that the compiler
has a suitable default -isysroot setting ... but further experience
shows that in many combinations of macOS version, XCode version, Xcode
command line tools version, and phase of the moon, Apple's compiler
will *not* supply a default -isysroot value.

We could potentially go back to the approach used in commit 68fc227dd,
but I don't have a lot of faith in the reliability or life expectancy of
that either.  Let's just revert to the approach already shipped in 11.0,
namely specifying an -isysroot switch globally.  As a partial response to
the concerns raised by Jakob Egger, adjust the contents of Makefile.global
to look like

CPPFLAGS = -isysroot $(PG_SYSROOT) ...
PG_SYSROOT = /path/to/sysroot

This allows overriding the sysroot path at build time in a relatively
painless way.

Add documentation to installation.sgml about how to use the PG_SYSROOT
option.  I also took the opportunity to document how to work around
macOS's "System Integrity Protection" feature.

As before, back-patch to all supported versions.

Discussion: https://postgr.es/m/20840.1537850987@sss.pgh.pa.us
2018-11-02 18:54:00 -04:00
..
aix AIX: Test the -qlonglong option before use. 2015-07-17 03:02:03 -04:00
cygwin Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
darwin Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
freebsd Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
hpux Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
irix Rename irix5 port to irix. 2004-05-19 21:37:43 +00:00
linux Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
netbsd Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
openbsd Remove -pipe from compiles. 2003-10-09 22:55:46 +00:00
osf Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
sco Remove extra newlines at end and beginning of files, add missing newlines 2010-08-19 05:57:36 +00:00
solaris Move forgotten comment closer to where it matters. 2008-10-29 16:23:07 +00:00
unixware With the native compiler on Unixware, disable optimization if 2007-07-16 17:38:48 +00:00
win32 Split the LDFLAGS make variable into two parts: LDFLAGS is now used for 2010-07-05 18:54:38 +00:00