diff --git a/Ports/.hosted_defs.sh b/Ports/.hosted_defs.sh index 121800c5e8..a1ce692d7a 100644 --- a/Ports/.hosted_defs.sh +++ b/Ports/.hosted_defs.sh @@ -8,6 +8,7 @@ export SERENITY_TOOLCHAIN="${SERENITY_TOOLCHAIN:-GNU}" if [ -z "${HOST_CC:=}" ]; then export HOST_CC="${CC:=cc}" export HOST_CXX="${CXX:=c++}" + export HOST_LD="${LD:=ld}" export HOST_AR="${AR:=ar}" export HOST_RANLIB="${RANLIB:=ranlib}" export HOST_PATH="${PATH:=}" @@ -27,6 +28,7 @@ if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then export SERENITY_TOOLCHAIN_BINDIR="${SERENITY_SOURCE_DIR}/Toolchain/Local/clang/bin" export CC="${SERENITY_ARCH}-pc-serenity-clang" export CXX="${SERENITY_ARCH}-pc-serenity-clang++" + export LD="${SERENITY_TOOLCHAIN_BINDIR}/ld.lld" export AR="llvm-ar" export RANLIB="llvm-ranlib" export READELF="llvm-readelf" @@ -38,6 +40,7 @@ else export SERENITY_TOOLCHAIN_BINDIR="${SERENITY_SOURCE_DIR}/Toolchain/Local/${SERENITY_ARCH}/bin" export CC="${SERENITY_ARCH}-pc-serenity-gcc" export CXX="${SERENITY_ARCH}-pc-serenity-g++" + export LD="${SERENITY_TOOLCHAIN_BINDIR}/${SERENITY_ARCH}-pc-serenity-ld" export AR="${SERENITY_ARCH}-pc-serenity-ar" export RANLIB="${SERENITY_ARCH}-pc-serenity-ranlib" export READELF="${SERENITY_ARCH}-pc-serenity-readelf" diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 50ae6973ce..b4c02cc210 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -64,6 +64,7 @@ enable_ccache host_env() { export CC="${HOST_CC}" export CXX="${HOST_CXX}" + export LD="${HOST_LD}" export AR="${HOST_AR}" export RANLIB="${HOST_RANLIB}" export PATH="${HOST_PATH}"