[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57086] [PATCH v3 1/7] gnu: Parameterize libgccjit.
From: |
Liliana Marie Prikler |
Subject: |
[bug#57086] [PATCH v3 1/7] gnu: Parameterize libgccjit. |
Date: |
Thu, 25 Aug 2022 07:25:03 -0000 |
* gnu/packages/gcc.scm (make-libgccjit): New variable.
(libgccjit): Define in terms of make-libgccjit.
---
gnu/packages/gcc.scm | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 4c496e31b2..66f0766646 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -968,31 +968,33 @@ (define-public gdc-11
(custom-gcc gcc-11 "gdc" '("d")
%generic-search-paths)))
-(define-public libgccjit
+(define-public (make-libgccjit gcc)
(package
- (inherit gcc-9)
+ (inherit gcc)
(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))
+ (substitute-keyword-arguments (package-arguments gcc)
+ ((#:modules _ '())
+ '((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 regex)
+ (srfi srfi-1)
+ (srfi srfi-26)))
((#:configure-flags flags)
- `(append `("--enable-host-shared"
- ,(string-append "--enable-languages=jit"))
+ #~(cons* "--enable-host-shared"
+ "--enable-languages=jit"
(remove (cut string-match "--enable-languages.*" <>)
- ,flags)))
+ #$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-.*)"))))))))
+ #~(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-.*)"))))))))
(synopsis "GCC library generating machine code on-the-fly at runtime")
(description
"This package is part of the GNU Compiler Collection and provides an
@@ -1003,6 +1005,8 @@ (define-public libgccjit
compilers. The just-in-time (jit) part of the name is now something of a
misnomer.")))
+(define-public libgccjit (make-libgccjit gcc-9))
+
(define (make-gccgo gcc)
"Return a gccgo package based on GCC."
(let ((gccgo (custom-gcc gcc "gccgo" '("go") %generic-search-paths)))
--
2.37.2
- [bug#57086] [PATCH 0/6] Add native compilation to Emacs, (continued)
- [bug#57086] [PATCH v3 0/7] Add native compilation to Emacs, Liliana Marie Prikler, 2022/08/25
- [bug#57086] [PATCH v3 2/7] gnu: libgccjit: Build with bootstrapped gcc., Liliana Marie Prikler, 2022/08/25
- [bug#57086] [PATCH v3 3/7] gnu: libgccjit: Build multiple versions., Liliana Marie Prikler, 2022/08/25
- [bug#57086] [PATCH v3 5/7] guix: emacs-utils: Add emacs-compile-directory., Liliana Marie Prikler, 2022/08/25
- [bug#57086] [PATCH v3 6/7] build-system: emacs: Use native compilation., Liliana Marie Prikler, 2022/08/25
- [bug#57086] [PATCH v3 7/7] gnu: emacs-yasnippet: Fix build., Liliana Marie Prikler, 2022/08/25
- [bug#57086] [PATCH v3 4/7] gnu: emacs: Build with native compilation., Liliana Marie Prikler, 2022/08/25
- [bug#57086] [PATCH v3 1/7] gnu: Parameterize libgccjit.,
Liliana Marie Prikler <=