aboutsummaryrefslogtreecommitdiff
path: root/depends/config.site.in
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2021-01-08 06:03:08 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2021-01-08 06:10:24 +0100
commit76b45d5fd7eb99f612cf9c10a7617de4019f6cd5 (patch)
tree90b34cac3cc26f7d5f5fdc30b4a5fb586a43cca2 /depends/config.site.in
parent86a8b35f321d55bb2381ea56bcc1cdd17c7896e6 (diff)
parent196b7276495c5d125e3799aee6cfc54be6720ec7 (diff)
downloadbitcoin-76b45d5fd7eb99f612cf9c10a7617de4019f6cd5.tar.xz
Merge #19683: depends: Pin clang search paths for darwin host
196b7276495c5d125e3799aee6cfc54be6720ec7 depends: Add comment about cache invalidation (Carl Dong) 949c480e527532be58d6184deb313d91339efdbf depends: Fully determine path for darwin cctools (Carl Dong) 880660acfa547558f6ef5adff6768de95e53af6e depends: Fully determine path for darwin_{CC,CXX} (Carl Dong) 80331107416b8a6cb487ee1c89a39c6a8bced27b depends: Quote to prevent word splitting in config.site (Carl Dong) 77b1ef89a07bf7a493ce4abaccbbff793cbde9be depends: Remove -fuse-ld line (Carl Dong) 300733921863c176535806c40afdc813b99e7459 depends: Pin clang search paths for darwin host (Carl Dong) 107f33d434ebbe6f93fa187e2af1f6f850e82d3b depends: Delay expansion of per-package vars (Carl Dong) Pull request description: > Hello clang/lib/frontend, > I search your headers once again. > Because it's time for some housekeeping, > Within the code I was tweaking, > And the targets I was making with my build, > Are unfulfilled, > It's just language compliance. > > In reference works I scroll alone > Pages cribbed from holy tomes > In the details of a template > My code's behaviour has now found its fate > When my hopes were dashed as a note left it as described: > As undefined > It's not in compliance > > And from the standard text I saw > Ten thousand errors, maybe more > Threading used without locking > Pointers referenced after freeing > Linters writing warnings that coders will never fix > But still they tick > The box that claims compliance > > "Fools," said I, "you do not know" > Errors, like a cancer, grow > Hear my words that I might reach you > Use -Wall and it might teach you > But my words and compiler errors fade. > Schedules forbade compliance. > > And the people bowed and prayed > With static checking torn and frayed > The markets flashed out their warning > In the words that they were forming > As recruiters said "The search for more profits leads to writing stuff in CSS, > And node.js. > Without a need for compliance" Many thanks to ajtowns for the above contribution! ----- This PR is ready for review! When cross-compiling for macOS, the SDK gives us the entire context/sysroot on which we should base the build. This means that we can be extremely specific w/re our search path ordering in order to avoid build problems that arise out of a user's specific environment/system setup and improve the robustness of our macOS toolchain. This PR does 2 things to this end: 1. Unset environment variables which are known to alter search paths. 1. Makes us (in the case of macOS builds) explicitly specify the list of system include search paths and its ordering, rather than rely on `clang`'s unreliable autodetection routine. Here is the [rabbit-hole gist](https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9). See the added comments in `depends/hosts/darwin.mk` for more details: https://github.com/bitcoin/bitcoin/blob/8b8296dc70a0aa5ca86d11ba5d3151fc56208e25/depends/hosts/darwin.mk#L37-L60 We can be this specific _only_ because macOS builds are neatly contained in an SDK, **and** we are cross-compiling. Native toolchains should rely on the environment/distro/user to know how best to build for the running system. Note: Although the `-u` flag of `env` is not a POSIX standard flag, it seems like it is useful enough to be implemented in [coreutils](https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html), [busybox](https://busybox.net/downloads/BusyBox.html#env), [FreeBSD](https://www.freebsd.org/cgi/man.cgi?env). ACKs for top commit: laanwj: code review ACK 196b7276495c5d125e3799aee6cfc54be6720ec7 Tree-SHA512: 406442df16d9aa0aef62f9fa94f72d7e48374301f3d826bf32f183e1610942aa44a4adfac7bead1f14aded0044fac400e1328fcd933b2337e55a024f034b5013
Diffstat (limited to 'depends/config.site.in')
-rw-r--r--depends/config.site.in72
1 files changed, 36 insertions, 36 deletions
diff --git a/depends/config.site.in b/depends/config.site.in
index bbfbd42460..391767357a 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -8,74 +8,74 @@ true # Dummy command because shellcheck treats all directives before first
# See: https://github.com/koalaman/shellcheck/wiki/Directive
# shellcheck disable=SC2154
-depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)"
+depends_prefix="$(cd "$(dirname "$ac_site_file")/.." && pwd)"
cross_compiling=maybe
-host_alias=@HOST@
-ac_tool_prefix=${host_alias}-
+host_alias="@HOST@"
+ac_tool_prefix="${host_alias}-"
-if test -z $with_boost; then
- with_boost=$depends_prefix
+if test -z "$with_boost"; then
+ with_boost="$depends_prefix"
fi
-if test -z $with_qt_plugindir; then
- with_qt_plugindir=$depends_prefix/plugins
+if test -z "$with_qt_plugindir"; then
+ with_qt_plugindir="${depends_prefix}/plugins"
fi
-if test -z $with_qt_translationdir; then
- with_qt_translationdir=$depends_prefix/translations
+if test -z "$with_qt_translationdir"; then
+ with_qt_translationdir="${depends_prefix}/translations"
fi
-if test -z $with_qt_bindir && test -z "@no_qt@"; then
- with_qt_bindir=$depends_prefix/native/bin
+if test -z "$with_qt_bindir" && test -z "@no_qt@"; then
+ with_qt_bindir="${depends_prefix}/native/bin"
fi
-if test -z $with_mpgen && test -n "@multiprocess@"; then
- with_mpgen=$depends_prefix/native
+if test -z "$with_mpgen" && test -n "@multiprocess@"; then
+ with_mpgen="${depends_prefix}/native"
fi
-if test -z $with_qrencode && test -n "@no_qr@"; then
+if test -z "$with_qrencode" && test -n "@no_qr@"; then
with_qrencode=no
fi
-if test -z $enable_wallet && test -n "@no_wallet@"; then
+if test -z "$enable_wallet" && test -n "@no_wallet@"; then
enable_wallet=no
fi
-if test -z $enable_multiprocess && test -n "@multiprocess@"; then
+if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then
enable_multiprocess=yes
fi
-if test -z $with_miniupnpc && test -n "@no_upnp@"; then
+if test -z "$with_miniupnpc" && test -n "@no_upnp@"; then
with_miniupnpc=no
fi
-if test -z $with_natpmp && test -n "@no_natpmp@"; then
+if test -z "$with_natpmp" && test -n "@no_natpmp@"; then
with_natpmp=no
fi
-if test -z $with_gui && test -n "@no_qt@"; then
+if test -z "$with_gui" && test -n "@no_qt@"; then
with_gui=no
fi
-if test -z $enable_zmq && test -n "@no_zmq@"; then
+if test -z "$enable_zmq" && test -n "@no_zmq@"; then
enable_zmq=no
fi
-if test x@host_os@ = xdarwin; then
+if test "x@host_os@" = xdarwin; then
BREW=no
PORT=no
fi
-PATH=$depends_prefix/native/bin:$PATH
+PATH="${depends_prefix}/native/bin:${PATH}"
PKG_CONFIG="$(which pkg-config) --static"
# These two need to remain exported because pkg-config does not see them
# otherwise. That means they must be unexported at the end of configure.ac to
# avoid ruining the cache. Sigh.
-export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig:$depends_prefix/lib/pkgconfig
+export PKG_CONFIG_PATH="${depends_prefix}/share/pkgconfig:${depends_prefix}/lib/pkgconfig"
if test -z "@allow_host_packages@"; then
- export PKG_CONFIG_LIBDIR=$depends_prefix/lib/pkgconfig
+ export PKG_CONFIG_LIBDIR="${depends_prefix}/lib/pkgconfig"
fi
-CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
-LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
+CPPFLAGS="-I${depends_prefix}/include/ ${CPPFLAGS}"
+LDFLAGS="-L${depends_prefix}/lib ${LDFLAGS}"
if test -n "@CC@" -a -z "${CC}"; then
CC="@CC@"
@@ -86,18 +86,18 @@ fi
PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}"
if test -n "@AR@"; then
- AR=@AR@
- ac_cv_path_ac_pt_AR=${AR}
+ AR="@AR@"
+ ac_cv_path_ac_pt_AR="${AR}"
fi
if test -n "@RANLIB@"; then
- RANLIB=@RANLIB@
- ac_cv_path_ac_pt_RANLIB=${RANLIB}
+ RANLIB="@RANLIB@"
+ ac_cv_path_ac_pt_RANLIB="${RANLIB}"
fi
if test -n "@NM@"; then
- NM=@NM@
- ac_cv_path_ac_pt_NM=${NM}
+ NM="@NM@"
+ ac_cv_path_ac_pt_NM="${NM}"
fi
if test -n "@debug@"; then
@@ -105,14 +105,14 @@ if test -n "@debug@"; then
fi
if test -n "@CFLAGS@"; then
- CFLAGS="@CFLAGS@ $CFLAGS"
+ CFLAGS="@CFLAGS@ ${CFLAGS}"
fi
if test -n "@CXXFLAGS@"; then
- CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
+ CXXFLAGS="@CXXFLAGS@ ${CXXFLAGS}"
fi
if test -n "@CPPFLAGS@"; then
- CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
+ CPPFLAGS="@CPPFLAGS@ ${CPPFLAGS}"
fi
if test -n "@LDFLAGS@"; then
- LDFLAGS="@LDFLAGS@ $LDFLAGS"
+ LDFLAGS="@LDFLAGS@ ${LDFLAGS}"
fi