unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zheng Junjie via Guix-patches via <guix-patches@gnu.org>
To: 64845@debbugs.gnu.org
Cc: "Christopher Baines" <mail@cbaines.net>,
	"Josselin Poiret" <dev@jpoiret.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Ricardo Wurmus" <rekado@elephly.net>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#64845] [PATCH v3 1/2] utils: Add 'strip-for-target'.
Date: Fri, 28 Jul 2023 21:33:52 +0800	[thread overview]
Message-ID: <tencent_75E7D498ACA3BF5C9DF0728792E2DAEE4D07@qq.com> (raw)
In-Reply-To: <tencent_A089532DFC26692A4696DF9FA64E52B95106@qq.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1263 bytes --]

* 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 <antero@mailbox.org>
 ;;; Copyright © 2023 Philip McGrath <philip@philipmcgrath.com>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; 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





      parent reply	other threads:[~2023-07-28 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  7:45 [bug#64845] [PATCH] gnu: fcode-utils: Fix cross-compilation Zheng Junjie via Guix-patches via
2023-07-25 17:11 ` Vagrant Cascadian
2023-07-26  6:03 ` [bug#64845] [PATCH v2] " Zheng Junjie via Guix-patches via
2023-07-26 12:34 ` [bug#64845] [PATCH] " Maxime Devos
2023-07-28 13:33 ` Zheng Junjie via Guix-patches via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_75E7D498ACA3BF5C9DF0728792E2DAEE4D07@qq.com \
    --to=guix-patches@gnu.org \
    --cc=64845@debbugs.gnu.org \
    --cc=873216071@qq.com \
    --cc=dev@jpoiret.xyz \
    --cc=ludo@gnu.org \
    --cc=mail@cbaines.net \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).