gnu: Add libgccjit.

* gnu/packages/gcc.scm (libgccjit): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Joseph LaFreniere 2020-03-11 21:48:59 -05:00 committed by Ludovic Courtès
parent e8cec7cc12
commit 76d2b9a2e8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -7,6 +7,7 @@
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com> ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -690,6 +691,34 @@ (define-public gfortran
;; report two gfortran@5 that are in fact identical. ;; report two gfortran@5 that are in fact identical.
gfortran-7) gfortran-7)
(define-public libgccjit
(package
(inherit gcc-9)
(name "libgccjit")
(outputs (delete "lib" (package-outputs gcc)))
(properties (alist-delete 'hidden? (package-properties gcc)))
(arguments
(substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
(guix build utils)
(ice-9 regex)
(srfi srfi-1)
(srfi srfi-26))
,@(package-arguments gcc))
((#:configure-flags flags)
`(append `("--enable-host-shared"
,(string-append "--enable-languages=jit"))
(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-public gccgo-4.9 (define-public gccgo-4.9
(custom-gcc gcc-4.9 "gccgo" '("go") (custom-gcc gcc-4.9 "gccgo" '("go")
%generic-search-paths %generic-search-paths