From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: On macOS, use -isysroot in link steps as well as compile steps. |
Date: | 2020-11-20 05:58:41 |
Message-ID: | E1kfzRR-0001E8-OO@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On macOS, use -isysroot in link steps as well as compile steps.
We previously put the -isysroot switch only into CPPFLAGS, theorizing
that it was only needed to find the right copies of include files.
However, it seems that we also need to use it while linking programs,
to find the right stub ".tbd" files for libraries. We got away
without that up to now, but apparently that was mostly luck. It may
also be that failures are only observed when the Xcode version is
noticeably out of sync with the host macOS version; the case that's
prompting action right now is that builds fail when using latest Xcode
(12.2) on macOS Catalina, even though it's fine on Big Sur.
Hence, add -isysroot to LDFLAGS as well. (It seems that the more
common practice is to put it in CFLAGS, whence it'd be included at
both compile and link steps. However, we can't mess with CFLAGS in
the platform template file without confusing configure's logic for
choosing default CFLAGS.)
Back-patch of 49407dc32 into all supported branches.
Report and patch by James Hilliard (some cosmetic mods by me)
Discussion: https://postgr.es/m/20201120003314.20560-1-james.hilliard1@gmail.com
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d01e37845c2262a0b51a59c77ff8ad7b855824f8
Modified Files
--------------
configure | 2 ++
configure.in | 2 ++
src/template/darwin | 1 +
3 files changed, 5 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2020-11-20 06:43:30 | pgsql: Emit log when restore_command succeeds but archived file faills |
Previous Message | Tom Lane | 2020-11-20 05:07:20 | pgsql: On macOS, use -isysroot in link steps as well as compile steps. |