me
/
guix
Archived
1
0
Fork 0

gnu: custom-gcc-gccgo: Remove procedure.

* gnu/packages/gcc.scm (custom-gcc-gccgo): Remove procedure.
(make-gccgo): Use custom-gcc procedure.
Efraim Flashner 2022-02-22 13:00:59 +02:00
parent 5cc9d41d86
commit e4779e0610
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 1 additions and 37 deletions

View File

@ -885,42 +885,6 @@ as the 'native-search-paths' field."
(find-files (string-append (assoc-ref outputs "out") "/bin") (find-files (string-append (assoc-ref outputs "out") "/bin")
".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|lto)(-.*)?$")))))))))) ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|lto)(-.*)?$"))))))))))
(define* (custom-gcc-gccgo gcc name languages
#:optional
(search-paths (package-native-search-paths gcc))
#:key (separate-lib-output? #t))
;; TODO: remove CUSTOM-GCC-GCCGO when regex changes for CUSTOM-GCC are
;; merged into master <https://issues.guix.gnu.org/49010>
"Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS
as the 'native-search-paths' field."
(package (inherit gcc)
(name name)
(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|lto)(-.*)?$"))))))))))
(define %generic-search-paths (define %generic-search-paths
;; This is the language-neutral search path for GCC. Entries in $CPATH are ;; This is the language-neutral search path for GCC. Entries in $CPATH are
;; not considered "system headers", which means GCC can raise warnings for ;; not considered "system headers", which means GCC can raise warnings for
@ -992,7 +956,7 @@ misnomer.")))
(define (make-gccgo gcc) (define (make-gccgo gcc)
"Return a gccgo package based on GCC." "Return a gccgo package based on GCC."
(let ((gccgo (custom-gcc-gccgo gcc "gccgo" '("go") %generic-search-paths))) (let ((gccgo (custom-gcc gcc "gccgo" '("go") %generic-search-paths)))
(package (package
(inherit gccgo) (inherit gccgo)
(synopsis "Go frontend to GCC") (synopsis "Go frontend to GCC")