aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-10-18 14:55:23 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-10-18 14:55:23 -0400
commit021b355cd1668c667f34b76c56fe6b3f8dbaefe3 (patch)
treea0297d64c3bcb7028eefdb698d1bd02a61f22fa8 /src
parent7a1e7b291d0691461cff5d2ae7eff114f035f6de (diff)
downloadpostgresql-021b355cd1668c667f34b76c56fe6b3f8dbaefe3.tar.gz
postgresql-021b355cd1668c667f34b76c56fe6b3f8dbaefe3.zip
Still further rethinking of build changes for macOS Mojave.
To avoid the sorts of problems complained of by Jakob Egger, it'd be best if configure didn't emit any references to the sysroot path at all. In the case of PL/Tcl, we can do that just by keeping our hands off the TCL_INCLUDE_SPEC string altogether. In the case of PL/Perl, we need to substitute -iwithsysroot for -I in the compile commands, which is easily handled if we change to using a configure output variable that includes the switch not only the directory name. Since PL/Tcl and PL/Python already do it like that, this seems like good consistency cleanup anyway. Hence, this replaces the advice given to Perl-related extensions in commit 5e2217131; instead of writing "-I$(perl_archlibexp)/CORE", they should just write "$(perl_includespec)". (The old way continues to work, but not on recent macOS.) It's still the case that configure needs to be aware of the sysroot path internally, but that's cleaner than what we had before. As before, back-patch to all supported versions. Discussion: https://postgr.es/m/20840.1537850987@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in2
-rw-r--r--src/pl/plperl/GNUmakefile5
-rw-r--r--src/template/darwin5
3 files changed, 6 insertions, 6 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index f76beee9b44..5d6a2ceaa92 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -306,7 +306,7 @@ else
endif
perl_archlibexp = @perl_archlibexp@
perl_privlibexp = @perl_privlibexp@
-perl_includedir = @perl_includedir@
+perl_includespec = @perl_includespec@
perl_embed_ccflags = @perl_embed_ccflags@
perl_embed_ldflags = @perl_embed_ldflags@
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index d1c84279a6a..0846e60cd81 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -12,12 +12,13 @@ override CPPFLAGS += -DPLPERL_HAVE_UID_GID
override CPPFLAGS += -Wno-comment
endif
-# Note: we need to make sure that the CORE directory is included last,
+# Note: we need to include the perl_includespec directory last,
# probably because it sometimes contains some header files with names
# that clash with some of ours, or with some that we include, notably on
# Windows.
-override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS) $(perl_embed_ccflags) -I$(perl_includedir)/CORE
+override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS) $(perl_embed_ccflags) $(perl_includespec)
+# this is often, but not always, the same directory named by perl_includespec
rpathdir = $(perl_archlibexp)/CORE
PGFILEDESC = "PL/Perl - procedural language"
diff --git a/src/template/darwin b/src/template/darwin
index 70227335669..159d8bb1275 100644
--- a/src/template/darwin
+++ b/src/template/darwin
@@ -3,9 +3,8 @@
# Note: Darwin is the original code name for macOS, also known as OS X.
# We still use "darwin" as the port name, partly because config.guess does.
-# Select where some include files should be sought.
-# We may eventually be forced to use "-isysroot" with this value,
-# but for now, it only affects Perl and Tcl include files.
+# Some configure tests require explicit knowledge of where the Xcode "sysroot"
+# is. We try to avoid having this leak into configure's results, though.
if test x"$PG_SYSROOT" = x"" ; then
PG_SYSROOT=`xcodebuild -version -sdk macosx Path 2>/dev/null`
fi