Skip to content

Commit

Permalink
Ports: Make sure HOST_* variables are set correctly for nested builds
Browse files Browse the repository at this point in the history
When building a port as a dependency for another port the HOST_*
variables were previously initialized with values referring to the
SerenityOS toolchain.

Fixes SerenityOS#9168.
  • Loading branch information
gunnarbeutner authored and awesomekling committed Aug 13, 2021
1 parent a1518e8 commit 6eee60d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Ports/.port_include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="/"

Expand Down

0 comments on commit 6eee60d

Please sign in to comment.