From ab23dbde6751bfec2cc2a220de92c16fb18237c2 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Tue, 28 Apr 2020 23:56:04 +0800 Subject: [PATCH] add CROSS_COMPILE env for strip --- pkgbuild | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgbuild b/pkgbuild index 8120683..728de97 100755 --- a/pkgbuild +++ b/pkgbuild @@ -275,20 +275,20 @@ strip_files() { find . -type f -printf "%P\n" 2>/dev/null | $FILTER | while read -r binary ; do case "$(file -bi "$binary")" in *application/x-sharedlib*) # Libraries (.so) - strip --strip-unneeded "$binary" 2>/dev/null ;; + ${CROSS_COMPILE}strip --strip-unneeded "$binary" 2>/dev/null ;; *application/x-pie-executable*) # Libraries (.so) - strip --strip-unneeded "$binary" 2>/dev/null ;; + ${CROSS_COMPILE}strip --strip-unneeded "$binary" 2>/dev/null ;; *application/x-archive*) # Libraries (.a) - strip --strip-debug "$binary" 2>/dev/null ;; + ${CROSS_COMPILE}strip --strip-debug "$binary" 2>/dev/null ;; *application/x-object*) case "$binary" in *.ko) # Kernel module - strip --strip-unneeded "$binary" 2>/dev/null ;; + ${CROSS_COMPILE}strip --strip-unneeded "$binary" 2>/dev/null ;; *) continue;; esac;; *application/x-executable*) # Binaries - strip --strip-all "$binary" 2>/dev/null ;; + ${CROSS_COMPILE}strip --strip-all "$binary" 2>/dev/null ;; *) continue ;; esac