just gfortran-11 now.

simplification…
This commit is contained in:
Yann Dupont 2021-12-03 18:16:55 +01:00
parent 71041fabb6
commit 99758426c6

View file

@ -1,86 +1,15 @@
(define-module (glicid packages gcc) (define-module (glicid packages gcc)
; #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
; #:use-module (guix build-system python)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages commencement) #:use-module (gnu packages commencement)
#:use-module (gnu packages gcc) #:use-module (gnu packages gcc)
#:use-module (srfi srfi-1)
) )
(define*
(custom-gcc gcc name languages
#:optional (search-paths (package-native-search-paths gcc))
#:key (separate-lib-output? #t)
)
"Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS as the 'native-search-paths' field."
(package
(inherit gcc)
(name (string-append name "-upstream" ))
(outputs
(if separate-lib-output?
(package-outputs gcc)
(delete "lib" (package-outputs gcc))
)
)
(native-search-paths search-paths)
(properties
(alist-delete 'hidden? (package-properties gcc))
)
(arguments
(substitute-keyword-arguments (package-arguments gcc)
(
(#:modules modules %gnu-build-system-modules)
`(,@modules
(srfi srfi-1)
(srfi srfi-26)
(ice-9 regex)
)
)
(
(#:configure-flags flags)
`(cons
(string-append
"--enable-languages="
,(string-join languages ",")
)
(remove (cut string-match "--enable-languages.*" <>) ,flags)
)
)
((#:phases phases)
`(modify-phases ,phases
(add-after 'install 'remove-broken-or-conflicting-files
(lambda* (#:key outputs #:allow-other-keys)
(for-each delete-file
(find-files (string-append (assoc-ref outputs "out") "/bin") ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)")
)
#t
)
)
)
)
)
)
)
)
(define %generic-search-paths ;; beware : access to internal functions… this is probably not the good way…
;; This is the language-neutral search path for GCC. Entries in $CPATH are
;; not considered "system headers", which means GCC can raise warnings for (define custom-gcc (@@ (gnu packages gcc) custom-gcc) )
;; issues in those headers. 'CPATH' is the only one that works for (define %generic-search-paths (@@ (gnu packages gcc) %generic-search-paths ))
;; front-ends not in the C family.
(list
(search-path-specification
(variable "CPATH")
(files '("include"))
)
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib" "lib64"))
)
)
)
(define-public gfortran-11 (define-public gfortran-11
(hidden-package (hidden-package
@ -90,26 +19,6 @@
) )
) )
(define-public gfortran-10
(hidden-package
(custom-gcc gcc-10 "gfortran" '("fortran")
%generic-search-paths
)
)
)
(define-public gfortran-toolchain-10
(package
(inherit (make-gcc-toolchain gfortran-10))
(synopsis "Complete GCC tool chain for fortean lang development")
(description "This package provides a complete GCC tool chain for
fortran lang development to be installed in user profiles. This includes
fortran, as well as libc (headers and binaries, plus debugging symbols
in the @code{debug} output), and binutils."
)
)
)
(define-public gfortran-toolchain-11 (define-public gfortran-toolchain-11
(package (package
(inherit (make-gcc-toolchain gfortran-11)) (inherit (make-gcc-toolchain gfortran-11))