From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MyFXMIbHw2SeWAEASxT56A (envelope-from ) for ; Fri, 28 Jul 2023 15:49:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0Os3L4bHw2TRoQAAauVa8A (envelope-from ) for ; Fri, 28 Jul 2023 15:49:58 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 65CCC516F5 for ; Fri, 28 Jul 2023 15:49:57 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=cUREf4tV; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690552198; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=F+I3dzLAlS4LsnCUmVgDhONE08JpwSLZGIhDv8GA19E=; b=GSsT9sor1tuHJmG5vJaefQtPdp6FTFQfA6ad2htFTdVuejA87ImxqWSvymkQGEGVwl88ab u5H/+GRhMraejEamCXDl1BKYMUXRWPri275BixJQcmT6CJHfXs3rVisWoeCdGyGSSaLer0 HkEUwCVGvoMXAHzSxF75YlsxsGs/HOXGHP/0Q/PJh7KgQiCdYuWhJvik+KvjpadtWC/GWS +nW5+Y8YQHzw4nurqLGBxGxeEzpOk2zweSsGFPaefgVEbY/cDOjvtc6nuS5oPg59YtaseQ 7iA/KAx/6QHMVSTPoCduyPXP7dkeg7VbvhNOhUszX01P+rY30vG+FMxEBZoyfQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=qq.com header.s=s201512 header.b=cUREf4tV; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690552198; a=rsa-sha256; cv=none; b=H4M02ZjWs/VmYX5FP3wIU8NTM7mbwAw1HKmnhUVInx9IyMMJtO6BjAZHE9s/3A72StkL0G vsnVgm0okwbwXW/vAPebQjrizbpMvVp8IH90+di8s94lzLv8JV0Tw2zRyy5mfdZPPvVCoU uhwpb39hjsW1gRaWGh3O7PTVCa6LioisGZxssmyJ6BpvtlMAuyjw7cHXZhu8WuSWqBctUs VZ7ATvT5Nv8ZpRrojEl78rEfqWGFGGaa0TDhwnfgIg314FYfN6e5Y2GAjz+6v4i7/wADDo TxT/IB2M2vFpSR4+c+4t5SMPtwXfCPbejOMVWRMZz0XtGlJhZKzZ57DMZA/VrQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPNcd-0004Zz-8b; Fri, 28 Jul 2023 09:35:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPNca-0004ZT-VI for guix-patches@gnu.org; Fri, 28 Jul 2023 09:35:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPNcZ-0005Ni-Lw; Fri, 28 Jul 2023 09:35:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPNcU-0000nr-9u; Fri, 28 Jul 2023 09:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64845] [PATCH v3 1/2] utils: Add 'strip-for-target'. References: In-Reply-To: Resent-From: Zheng Junjie <873216071@qq.com> Original-Sender: "Debbugs-submit" Resent-CC: mail@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 28 Jul 2023 13:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64845@debbugs.gnu.org Cc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 64845-submit@debbugs.gnu.org id=B64845.16905512553020 (code B ref 64845); Fri, 28 Jul 2023 13:35:02 +0000 Received: (at 64845) by debbugs.gnu.org; 28 Jul 2023 13:34:15 +0000 Received: from localhost ([127.0.0.1]:44129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPNbi-0000md-8I for submit@debbugs.gnu.org; Fri, 28 Jul 2023 09:34:14 -0400 Received: from out203-205-251-59.mail.qq.com ([203.205.251.59]:48911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <873216071@qq.com>) id 1qPNbd-0000m7-UE for 64845@debbugs.gnu.org; Fri, 28 Jul 2023 09:34:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1690551238; bh=F+I3dzLAlS4LsnCUmVgDhONE08JpwSLZGIhDv8GA19E=; h=From:To:Subject:Date; b=cUREf4tVqPjTakjY0yqxS/7LNdc30ruNkqvRniqIyhU9aAAXXmagOo96qn6zZzZAT 2HMIImgvEeVcsT5CuyXgX14e1Bm6JsTx51BZeUvpMkiG6DM01c0tDEBuU2+F2wTIt+ Qr9j0K0X8Rc6+rssxNYMbM5pe9Tsh13IqrM6Z2KA= Received: from localhost.localdomain ([111.0.51.72]) by newxmesmtplogicsvrsza10-0.qq.com (NewEsmtp) with SMTP id 87910A99; Fri, 28 Jul 2023 21:33:57 +0800 X-QQ-mid: xmsmtpt1690551237t8g8pyuo2 Message-ID: X-QQ-XMAILINFO: MR/iVh5QLeieP7PkXk5/DKifqp/DYeClpHRm8hcnbgiK17qcWKI7JAxjPE72jL iu97/SKICPOi/0pQdoVeGebDNyw86IC/cR62Xqj9DfSNXASxsbH4+efDETp76moe+LBrxQM2POAP 3A59NScUfkjRC2tPTzi0YSBQ1qEgBVbtZ2hO3esZj0f/6AFrmPxDMdgB93h0p1lgaTWK3Tq+7vZE gkI7TblW3YzgFS1aorOWFuX6xFcEcAxrm2GwrYc68aL/kaa2wHxFDUoIPi68aG4sAN5OfVGNgIp9 zA6lNtcl4XvVLqJ6pS8wOn9fJG06rc5/cnG0R5G62mXhMQ6nzIhnDH1c1lfgazbXu6ycLCeVDiYU WeJkeCJUTJvZ29NjGhsU8V3GbL8Vj0XOqrjvrTFpGi/88mkDgrsZk+RqhtqXvRnUWmiy3TKJqN6t ZIHPU+k57QYgoyQjGs/2NZKCeIE6nG0zRKAnUajqcPaaSk+hqF8P676IEGRBt49z0EYt38AY3RtQ PcFs5LXFSnZ002TB75iVCsqGWeXmo5pFEwoBqQ5gWWG9oCEyyytCkCBMUmfx/ObrEyf017NRJBSL Q3vUnSAewabYWcDympNHgxJORawYZlfAKjpG/jCuZMVz0rrxtKZW3bB/E00A7vW4Qbh0s0cc8jTT gAnUCbYyZ4+6P+aLMO86oasUv7mnI//9R38+EanSD+9HVicJPWC9DDMbwO6jlFTMVbdNw/+qOxUI UrnOWAGZGOGItIqfgs58g/GG+i8fzppvkkzSeWCYFTVJZKyolqX8Eg2AogP+9QyW8fS9Ar04hExc ul7pohFhRqG5XD3vq9obAVrtTXsZHHqC7IxNWChS50fzlNPwVpy+6pJQPTzDwspr7XChjuGYMAQm sK2hF9zxPe+I0C3QjMNUGszvr4qtudo0rrlYvX2Tm1BBMMSmTSPSqM7OFTk/jA7F0Gz9M4zr+hBl J/2To6kHfLFtqAxK4oip0bSeqhNIN4x5zBYHckWY8ryky/2OtGGQ== X-QQ-XMRINFO: NS+P29fieYNw95Bth2bWPxk= Date: Fri, 28 Jul 2023 21:33:52 +0800 X-OQ-MSGID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Zheng Junjie <873216071@qq.com> X-ACL-Warn: , Zheng Junjie via Guix-patches From: Zheng Junjie via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -5.14 X-Migadu-Queue-Id: 65CCC516F5 X-Migadu-Spam-Score: -5.14 X-Migadu-Scanner: mx0.migadu.com X-TUID: UiUC37Nr3YIK * 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 ;;; Copyright © 2023 Philip McGrath ;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; 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