From e74dd00f53cd6dc1887f76b9672e5f6dcf0fd8a2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 18 Oct 2018 14:55:23 -0400 Subject: 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 --- contrib/jsonb_plperl/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'contrib/jsonb_plperl') diff --git a/contrib/jsonb_plperl/Makefile b/contrib/jsonb_plperl/Makefile index 019fc822c78..b43c8ed97bd 100644 --- a/contrib/jsonb_plperl/Makefile +++ b/contrib/jsonb_plperl/Makefile @@ -35,8 +35,5 @@ rpathdir = $(perl_archlibexp)/CORE SHLIB_LINK += $(perl_embed_ldflags) endif -# As with plperl we need to make sure that the CORE directory is included -# 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 := $(CPPFLAGS) $(perl_embed_ccflags) -I$(perl_includedir)/CORE +# As with plperl we need to include the perl_includespec directory last. +override CPPFLAGS := $(CPPFLAGS) $(perl_embed_ccflags) $(perl_includespec) -- cgit v1.2.3