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.
This commit is contained in:
Julien Lepiller 2022-06-18 08:53:11 +02:00
parent 3f8bb2d6b9
commit 319b8331b2
No known key found for this signature in database
GPG key ID: 53D457B2D636EE82

View file

@ -569,10 +569,12 @@ (define build
(filter package? packages)))) (filter package? packages))))
":")) ":"))
(setenv "LIBRARY_PATH" #$(file-append gcc "/lib")) (setenv "LIBRARY_PATH" #$(file-append gcc "/lib"))
(setenv "GUIX_LD_WRAPPER_DISABLE_RPATH" "1")
(invoke "gcc" #$(local-file source) "-Wall" "-g0" "-O2" (invoke "gcc" #$(local-file source) "-Wall" "-g0" "-O2"
"-I" #$(file-append guile "/include/guile/" effective) "-I" #$(file-append guile "/include/guile/" effective)
"-L" #$(file-append guile "/lib") "-L" #$(file-append guile "/lib")
"-Wl,-rpath" #$(file-append guile "/lib")
#$(string-append "-lguile-" effective) #$(string-append "-lguile-" effective)
"-o" (string-append #$output "/bin/guile"))))) "-o" (string-append #$output "/bin/guile")))))