Ports: Set $LD
for Clang, GCC and host in .hosted_defs.sh
Sets `$LD` to `$HOST_LD` in `.port_include.sh` if it is defined as well, else it will be set to `ld`. Makes libiconv build with the Clang toolchain. This also impacts other ports when building them with the Clang toolchain, and might result in more ports building correctly.
This commit is contained in:
parent
401bc13776
commit
5f87c3022c
Notes:
sideshowbarker
2024-07-17 04:49:48 +09:00
Author: https://github.com/EWouters Commit: https://github.com/SerenityOS/serenity/commit/5f87c3022c Pull-request: https://github.com/SerenityOS/serenity/pull/16750 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/timschumi
2 changed files with 4 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -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}"
|
||||
|
|
Loading…
Add table
Reference in a new issue