unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 56051@debbugs.gnu.org
Cc: Hi@lepiller.eu, Guix!@lepiller.eu
Subject: [bug#56051]
Date: Sat, 18 Jun 2022 08:46:32 +0200	[thread overview]
Message-ID: <20220618064632.29319-1-julien@lepiller.eu> (raw)

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 <julien@lepiller.eu>
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")))))
 
-- 
2.35.1





             reply	other threads:[~2022-06-18  6:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-18  6:46 Julien Lepiller [this message]
2022-06-18  6:58 ` [bug#56051] [PATCH] guix: self: Do not record reference to gcc-toolchain Julien Lepiller
2022-06-18  9:45   ` Maxime Devos
2022-06-18 12:13     ` Julien Lepiller
2022-06-18 17:23       ` Maxime Devos
2022-06-18 17:53         ` Julien Lepiller
2022-06-18 19:08           ` Maxime Devos
2022-06-18 20:14             ` bug#56051: " Julien Lepiller
2022-06-18 20:20               ` [bug#56051] " Maxime Devos

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=20220618064632.29319-1-julien@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=56051@debbugs.gnu.org \
    --cc=Guix!@lepiller.eu \
    --cc=Hi@lepiller.eu \
    /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).