unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38436] [PATCH] gnu; Add gfortran-toolchain
@ 2019-11-29 17:46 Konrad Hinsen
  2019-12-02 15:01 ` [bug#38436] [PATCH] gnu: " Konrad Hinsen
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Konrad Hinsen @ 2019-11-29 17:46 UTC (permalink / raw)
  To: 38436

* gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
* gnu/packages/commencement.scm: (make-gcc-toolchain): Added argument "language"
---
 gnu/packages/commencement.scm | 52 +++++++++++++++++++++++------------
 1 file changed, 34 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 6a382c7517..8c57af749e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2515,16 +2515,23 @@ COREUTILS-FINAL vs. COREUTILS, etc."
 ;;; GCC toolchain.
 ;;;
 
+;;; Toolchain packages combine everything needed for compilation,
+;;; and ensure that ld-wrapper comes before binutils' ld in the
+;;; user's profile, as otherwise dynamic library lookup would not
+;;; work correctly.
+
 ;; Using the following procedure, a gcc toolchain targeting glibc-2.27 can be
 ;; instantiated like this:
 ;;
 ;; (define-public gcc-glibc-2.27-toolchain
 ;;   (make-gcc-toolchain gcc glibc-2.27))
 
-(define* (make-gcc-toolchain gcc
-                            #:optional
-                            (libc #f))
-  "Return a complete toolchain for GCC. If LIBC is specified, target that libc."
+(define* (make-gcc-toolchain language
+                             gcc
+                             #:optional
+                             (libc #f))
+  "Return a complete toolchain for GCC. If LIBC is specified, target that libc.
+  Insert LANGUAGE into the documentation strings."
   (let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
         (libc (if libc libc glibc-final)))
     (package
@@ -2557,17 +2564,19 @@ COREUTILS-FINAL vs. COREUTILS, etc."
       (search-paths (package-search-paths gcc))
 
       (license (package-license gcc))
-      (synopsis "Complete GCC tool chain for C/C++ development")
+      (synopsis (format #f
+                        "Complete GCC tool chain for ~a development"
+                        language))
       (description
-       "This package provides a complete GCC tool chain for C/C++ development to
-be   installed in user profiles.  This includes GCC, as well as libc (headers
-an  d binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
+       (format
+        #f
+        "This package provides a complete GCC tool chain for ~a development to
+be installed in user profiles.  This includes GCC, as well as libc (headers
+and binaries, plus debugging symbols in the @code{debug} output), and Binutils."
+        language))
       (home-page "https://gcc.gnu.org/")
       (outputs '("out" "debug" "static"))
 
-      ;; 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
-      ;; before Binutils' ld in the user's profile.
       (inputs `(("gcc" ,gcc)
                 ("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper")))
                 ("binutils" ,binutils-final)
@@ -2576,27 +2585,34 @@ an  d binaries, plus debugging symbols in the @code{debug} output), and Binutils
                 ("libc-static" ,libc "static"))))))
 
 (define-public gcc-toolchain
-  (make-gcc-toolchain gcc-final))
+  (make-gcc-toolchain "C/C++" gcc-final))
 
 (define-public gcc-toolchain-4.8
-  (make-gcc-toolchain gcc-4.8))
+  (make-gcc-toolchain "C/C++" gcc-4.8))
 
 (define-public gcc-toolchain-4.9
-  (make-gcc-toolchain gcc-4.9))
+  (make-gcc-toolchain "C/C++" gcc-4.9))
 
 (define-public gcc-toolchain-5
-  (make-gcc-toolchain gcc-5))
+  (make-gcc-toolchain "C/C++" gcc-5))
 
 (define-public gcc-toolchain-6
-  (make-gcc-toolchain gcc-6))
+  (make-gcc-toolchain "C/C++" gcc-6))
 
 (define-public gcc-toolchain-7
   gcc-toolchain)
 
 (define-public gcc-toolchain-8
-  (make-gcc-toolchain gcc-8))
+  (make-gcc-toolchain "C/C++" gcc-8))
 
 (define-public gcc-toolchain-9
-  (make-gcc-toolchain gcc-9))
+  (make-gcc-toolchain "C/C++" gcc-9))
+
+;; Provide the toolchain package only for the version of gfortran
+;; that is used by Guix intenally to build Fortran libraries,
+;; because combining code compiled with different versions can
+;; cause problems.
+(define-public gfortran-toolchain
+  (make-gcc-toolchain "Fortran" gfortran))
 
 ;;; commencement.scm ends here
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-12-14 23:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 17:46 [bug#38436] [PATCH] gnu; Add gfortran-toolchain Konrad Hinsen
2019-12-02 15:01 ` [bug#38436] [PATCH] gnu: " Konrad Hinsen
2019-12-09 14:30   ` Ludovic Courtès
2019-12-10 13:11     ` Konrad Hinsen
2019-12-10 14:38       ` Ludovic Courtès
2019-12-11 10:30         ` Konrad Hinsen
2019-12-11 10:30 ` Konrad Hinsen
2019-12-11 11:12   ` Ludovic Courtès
2019-12-11 20:34     ` Konrad Hinsen
2019-12-12 13:20       ` Ludovic Courtès
2019-12-12 15:19         ` Konrad Hinsen
2019-12-12 21:22           ` Ludovic Courtès
2019-12-13 12:56             ` Konrad Hinsen
2019-12-13 12:53 ` Konrad Hinsen
2019-12-13 12:56   ` Jonathan Brielmaier
2019-12-14 23:22   ` bug#38436: " Ludovic Courtès

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).