mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Yet further rethinking of build changes for macOS Mojave.
The solution arrived at in commite74dd00f5
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 commit68fc227dd
, 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
This commit is contained in:
10
configure
vendored
10
configure
vendored
@ -627,6 +627,7 @@ ac_includes_default="\
|
||||
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
vpath_build
|
||||
PG_SYSROOT
|
||||
PG_VERSION_NUM
|
||||
PROVE
|
||||
FOP
|
||||
@ -18836,6 +18837,15 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
# If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
|
||||
# literally, so that it's possible to override it at build time using
|
||||
# a command like "make ... PG_SYSROOT=path". This has to be done after
|
||||
# we've finished all configure checks that depend on CPPFLAGS.
|
||||
if test x"$PG_SYSROOT" != x; then
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Begin output steps
|
||||
|
||||
|
Reference in New Issue
Block a user