diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-08-13 20:51:04 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-13 21:29:48 +0200 |
commit | 6eee60de41b51856e80230196abd69357f1cec21 (patch) | |
tree | c71ebd020d7eeb892b37bca0c7c21f11a5945379 /Ports/.port_include.sh | |
parent | a1518e870d84652bd525de38f8a3d9d38a46f8f6 (diff) | |
download | serenity-6eee60de41b51856e80230196abd69357f1cec21.zip |
Ports: Make sure HOST_* variables are set correctly for nested builds
When building a port as a dependency for another port the HOST_*
variables were previously initialized with values referring to the
SerenityOS toolchain.
Fixes #9168.
Diffstat (limited to 'Ports/.port_include.sh')
-rwxr-xr-x | Ports/.port_include.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index bae6d29620..79a0f6b6c3 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -4,14 +4,16 @@ set -eu SCRIPT="$(dirname "${0}")" export SERENITY_ARCH="${SERENITY_ARCH:-i686}" -HOST_CC="${CC:=cc}" -HOST_CXX="${CXX:=c++}" -HOST_AR="${AR:=ar}" -HOST_RANLIB="${RANLIB:=ranlib}" -HOST_PATH="${PATH:=}" -HOST_PKG_CONFIG_DIR="${PKG_CONFIG_DIR:=}" -HOST_PKG_CONFIG_SYSROOT_DIR="${PKG_CONFIG_SYSROOT_DIR:=}" -HOST_PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:=}" +if [ -z "${HOST_CC:=}" ]; then + export HOST_CC="${CC:=cc}" + export HOST_CXX="${CXX:=c++}" + export HOST_AR="${AR:=ar}" + export HOST_RANLIB="${RANLIB:=ranlib}" + export HOST_PATH="${PATH:=}" + export HOST_PKG_CONFIG_DIR="${PKG_CONFIG_DIR:=}" + export HOST_PKG_CONFIG_SYSROOT_DIR="${PKG_CONFIG_SYSROOT_DIR:=}" + export HOST_PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:=}" +fi DESTDIR="/" |