Subject: [bug#64845] [PATCH v3 1/2] utils: Add 'strip-for-target'.

From: Zheng Junjie <[email-masked]>
Date: Fri, 28 Jul 2023 21:33:52 +0800

* guix/utils.scm (strip-for-target): New procedure.
---
 guix/utils.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index e9af33bdeb..7a42b49df2 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2022 Antero Mejr <[email-masked]>
 ;;; Copyright © 2023 Philip McGrath <[email-masked]>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <[email-masked]>
+;;; Copyright © 2023 Zheng Junjie <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -111,6 +112,7 @@ (define-module (guix utils)
             cxx-for-target
             ld-for-target
             pkg-config-for-target
+            strip-for-target
 
             version-compare
             version>?
@@ -784,6 +786,11 @@ (define* (pkg-config-for-target #:optional (target (%current-target-system)))
       (string-append target "-pkg-config")
       "pkg-config"))
 
+(define* (strip-for-target #:optional (target (%current-target-system)))
+  (if target
+      (string-append target "-strip")
+      "strip"))
+
 (define version-compare
   (let ((strverscmp
          (let ((sym (or (dynamic-func "strverscmp" (dynamic-link))

base-commit: 35c8d631d2bd63c64e863b5509f29fdcb7f856e6
-- 
2.41.0