pgsql: Back off using -isysroot on Darwin.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Back off using -isysroot on Darwin.
Date: 2018-10-16 20:27:45
Message-ID: E1gCVwP-00050a-O5@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Back off using -isysroot on Darwin.

Rethink the solution applied in commit 5e2217131 to get PL/Tcl to
build on macOS Mojave. I feared that adding -isysroot globally might
have undesirable consequences, and sure enough Jakob Egger reported
one: it complicates building extensions with a different Xcode version
than was used for the core server. (I find that a risky proposition
in general, but apparently it works most of the time, so we shouldn't
break it if we don't have to.)

We'd already adopted the solution for PL/Perl of inserting the sysroot
path directly into the -I switches used to find Perl's headers, and we
can do the same thing for PL/Tcl by changing the -iwithsysroot switch
that Apple's tclConfig.sh reports. This restricts the risks to PL/Perl
and PL/Tcl themselves and directly-dependent extensions, which is a lot
more pleasing in general than a global -isysroot switch.

Along the way, tighten the test to see if we need to inject the sysroot
path into $perl_includedir, as I'd speculated about upthread but not
gotten round to doing.

As before, back-patch to all supported versions.

Discussion: https://postgr.es/m/20840.1537850987@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ee6c08b01b9b803715c92ac1433752f962eebfde

Modified Files
--------------
configure | 7 ++++++-
configure.in | 7 ++++++-
src/template/darwin | 9 +++++----
3 files changed, 17 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-10-16 21:57:30 pgsql: Reorder FmgrBuiltin members, saving 25% in size.
Previous Message Andres Freund 2018-10-16 19:10:00 pgsql: Mark constantly allocated dest receiver as const.