From cccc001dedc32c1f377b7093b79c6b19b667e7e9 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Sat, 7 May 2022 18:29:03 +0200 Subject: [PATCH] Ports: Add $STRIP and $HOST_STRIP variables This fixes stripping the debug information from the gcc port when building on macOS hosts. --- Ports/.hosted_defs.sh | 3 +++ Ports/.port_include.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/Ports/.hosted_defs.sh b/Ports/.hosted_defs.sh index 97d6d50423..3eea400508 100644 --- a/Ports/.hosted_defs.sh +++ b/Ports/.hosted_defs.sh @@ -13,6 +13,7 @@ if [ -z "${HOST_CC:=}" ]; then export HOST_PATH="${PATH:=}" export HOST_READELF="${READELF:=readelf}" export HOST_OBJCOPY="${OBJCOPY:=objcopy}" + export HOST_STRIP="${STRIP:=strip}" 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:=}" @@ -28,6 +29,7 @@ if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then export RANLIB="llvm-ranlib" export READELF="llvm-readelf" export OBJCOPY="llvm-objcopy" + export STRIP="llvm-strip" export PATH="${SERENITY_SOURCE_DIR}/Toolchain/Local/clang/bin:${HOST_PATH}" else export SERENITY_BUILD_DIR="${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}" @@ -37,6 +39,7 @@ else export RANLIB="${SERENITY_ARCH}-pc-serenity-ranlib" export READELF="${SERENITY_ARCH}-pc-serenity-readelf" export OBJCOPY="${SERENITY_ARCH}-pc-serenity-objcopy" + export STRIP="${SERENITY_ARCH}-pc-serenity-strip" export PATH="${SERENITY_SOURCE_DIR}/Toolchain/Local/${SERENITY_ARCH}/bin:${HOST_PATH}" fi diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 73db129f12..ba4699f614 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -45,6 +45,7 @@ host_env() { export PATH="${HOST_PATH}" export READELF="${HOST_READELF}" export OBJCOPY="${HOST_OBJCOPY}" + export STRIP="${HOST_STRIP}" export PKG_CONFIG_DIR="${HOST_PKG_CONFIG_DIR}" export PKG_CONFIG_SYSROOT_DIR="${HOST_PKG_CONFIG_SYSROOT_DIR}" export PKG_CONFIG_LIBDIR="${HOST_PKG_CONFIG_LIBDIR}"