Explorar el Código

Ports: Add $STRIP and $HOST_STRIP variables

This fixes stripping the debug information from the gcc port when
building on macOS hosts.
Daniel Bertalan hace 3 años
padre
commit
cccc001ded
Se han modificado 2 ficheros con 4 adiciones y 0 borrados
  1. 3 0
      Ports/.hosted_defs.sh
  2. 1 0
      Ports/.port_include.sh

+ 3 - 0
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
 

+ 1 - 0
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}"