From patchwork Sat Jun 18 06:46:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Lepiller X-Patchwork-Id: 40104 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7189427BBEA; Sat, 18 Jun 2022 07:55:40 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2835527BBE9 for ; Sat, 18 Jun 2022 07:55:40 +0100 (BST) Received: from localhost ([::1]:33086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2SMt-00049I-5U for patchwork@mira.cbaines.net; Sat, 18 Jun 2022 02:55:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2SMJ-000495-4y for guix-patches@gnu.org; Sat, 18 Jun 2022 02:55:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2SMI-0008Dk-SR for guix-patches@gnu.org; Sat, 18 Jun 2022 02:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2SMI-0000oz-LN for guix-patches@gnu.org; Sat, 18 Jun 2022 02:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56051] Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Jun 2022 06:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56051 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 56051@debbugs.gnu.org Cc: Hi@lepiller.eu, Guix!@lepiller.eu X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16555352953138 (code B ref -1); Sat, 18 Jun 2022 06:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jun 2022 06:54:55 +0000 Received: from localhost ([127.0.0.1]:47429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2SLw-0000oI-TX for submit@debbugs.gnu.org; Sat, 18 Jun 2022 02:54:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:40568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2SLu-0000o9-AE for submit@debbugs.gnu.org; Sat, 18 Jun 2022 02:54:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2SLt-00047r-KQ for guix-patches@gnu.org; Sat, 18 Jun 2022 02:54:37 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:58226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2SLq-00084W-KA for guix-patches@gnu.org; Sat, 18 Jun 2022 02:54:37 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id b37179fd; Sat, 18 Jun 2022 06:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :cc:subject:date:message-id:mime-version :content-transfer-encoding; s=dkim; bh=sGE/yvgnA1SjXEQDakGXYpWm3 r1ChcObDGFLfXBEPCc=; b=Sd/J9CBhUwc9+JcNluSe8zBoap/+2u3tS9GW3vHDU 1Uk45/aAS40LE2zHKeet/7XHyfMh1BT5wd4dZoHih1QpaG54IMV7SiGimPD8ILSu 4rWuXynxdfYC42NwVqhAnVcKMi/bT9F261npb6G09yrYN6HHu6Syp30/yVeMryW4 HgfU00GmJXoJCq3kT6WB3pskKhto93aLdfPiozFVX0QeCjUrc0bntlVQQJbf/EMJ r7w2T5oncDOrLa3tlYYacUYaSeX5MtLhfxtKDVKaNWfL3qjBiEbTmh4V8V/nNP2b 1biUpR2Am+6sOdvKCWA+oityFWyj0LjKS0lME4IDMEf+w== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a0f28e66 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 18 Jun 2022 06:46:46 +0000 (UTC) From: Julien Lepiller Date: Sat, 18 Jun 2022 08:46:32 +0200 Message-Id: <20220618064632.29319-1-julien@lepiller.eu> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This patch ensures that we don't record a reference to gcc-toolchain in the result of `guix pull`. With this, we save 150 MB of closure. This is a patch to fix the first issue I found in https://issues.guix.gnu.org/56030. From f96742e204f6b98401f49f7d1066257d7355c873 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 18 Jun 2022 08:17:59 +0200 Subject: [PATCH] guix: self: Do not record reference to gcc-toolchain. The ld-wrapper from gcc-toolchain records a reference to the library path through rpath, but this is not needed. By explicitely using rpath flags instead, we save 150 MB of closure. * guix/self.scm (quiet-guile): Do not record reference to gcc-toolchain. --- guix/self.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/self.scm b/guix/self.scm index 9a64051c32..36ada4d171 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -569,10 +569,12 @@ (define build (filter package? packages)))) ":")) (setenv "LIBRARY_PATH" #$(file-append gcc "/lib")) + (setenv "GUIX_LD_WRAPPER_DISABLE_RPATH" "1") (invoke "gcc" #$(local-file source) "-Wall" "-g0" "-O2" "-I" #$(file-append guile "/include/guile/" effective) "-L" #$(file-append guile "/lib") + "-Wl,-rpath" #$(file-append guile "/lib") #$(string-append "-lguile-" effective) "-o" (string-append #$output "/bin/guile")))))