[bug#63393,2/2] gnu: make-gcc-toolchain: Add 'lib' outputs.
Commit Message
* gnu/packages/commencement.scm (make-gcc-toolchain): Add 'lib' outputs.
---
gnu/packages/commencement.scm | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
Comments
Hi,
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> * gnu/packages/commencement.scm (make-gcc-toolchain): Add 'lib' outputs.
[...]
> (filter-map (match-lambda
> (("libc-debug" . _) #f)
> (("libc-static" . _) #f)
> + (("gcc-lib" . _) #f)
> + (("gcc-debug" . _) #f)
I would include gcc:lib in “out” (thus not adding a “lib” output to
‘gcc-toolchain’).
Yes, gcc:lib includes *.a and *.la, but those are already part of the
‘gcc-toolchain’ closure:
--8<---------------cut here---------------start------------->8---
$ guix size gcc-toolchain |head -6
store item total self
/gnu/store/jv78mm3dmr6fl2hhy1bkbhfpm702v3gq-gcc-12.3.0 292.6 169.4 41.2%
/gnu/store/zh4x65snfis7svs6906gj1z8i7dx2j3m-binutils-2.38 95.5 54.9 13.4%
/gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9 134.0 53.1 12.9%
/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35 40.6 38.8 9.4%
/gnu/store/gmv6n5vy5qcsn71pkapg2hnknyn1p7g3-gcc-12.3.0-lib 76.8 36.2 8.8%
--8<---------------cut here---------------end--------------->8---
However, I’d leave out gcc:debug because (0) it’s unrelated :-), (1)
‘gcc-final’ has no “debug” output, and (2) it’s really for a niche
(folks developing compiler plugins, typically).
I’d also leave out the /lib directory of Binutils, which is again rarely
useful.
WDYT?
Thanks,
Ludo’.
@@ -14,6 +14,7 @@
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
+;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3444,15 +3445,30 @@ (define* (make-gcc-toolchain gcc
(filter-map (match-lambda
(("libc-debug" . _) #f)
(("libc-static" . _) #f)
+ (("gcc-lib" . _) #f)
+ (("gcc-debug" . _) #f)
((_ . directory) directory))
%build-inputs))
(union-build (assoc-ref %outputs "debug")
(list (assoc-ref %build-inputs
- "libc-debug")))
+ "libc-debug")
+ (assoc-ref %build-inputs
+ "gcc-debug")))
+
(union-build (assoc-ref %outputs "static")
(list (assoc-ref %build-inputs
"libc-static")))
+
+ (union-build (assoc-ref %outputs "lib")
+ (list (assoc-ref %build-inputs
+ "ld-wrapper")
+ (assoc-ref %build-inputs
+ "binutils")
+ (assoc-ref %build-inputs
+ "gcc-lib")
+ (assoc-ref %build-inputs
+ "libc")))
#t))))
(native-search-paths
@@ -3474,7 +3490,7 @@ (define* (make-gcc-toolchain gcc
binaries, plus debugging symbols in the @code{debug} output), and Binutils. GCC
is the GNU Compiler Collection.")
(home-page "https://gcc.gnu.org/")
- (outputs '("out" "debug" "static"))
+ (outputs '("out" "debug" "static" "lib"))
;; The main raison d'être of this "meta-package" is (1) to conveniently
;; install everything that we need, and (2) to make sure ld-wrapper comes
@@ -3484,8 +3500,9 @@ (define* (make-gcc-toolchain gcc
("binutils" ,binutils-final)
("libc" ,libc)
("libc-debug" ,libc "debug")
- ("libc-static" ,libc "static"))))))
-
+ ("libc-static" ,libc "static")
+ ("gcc-lib" ,gcc "lib")
+ ("gcc-debug" ,gcc "debug"))))))
(define-public gcc-toolchain-4.8
(make-gcc-toolchain gcc-4.8))