[PATCH] gnu: Add libgccjit.

  • Done
  • quality assurance status badge
Details
2 participants
  • LaFreniere, Joseph
  • Ludovic Courtès
Owner
unassigned
Submitted by
LaFreniere, Joseph
Severity
normal

Debbugs page

L
L
LaFreniere, Joseph wrote on 12 Mar 2020 14:56
(address . guix-patches@gnu.org)
87tv2tnsoe.fsf@lafreniere.xyz
Patch file is attached. I have no experience building or
packaging GCC, so any feedback is appreciated. That being said, I
_believe_ this recipe follows the build instructions at
correctly.

This is toward the eventual goal of packaging gccemacs

--
Joseph LaFreniere
From 8b08b302f6bf601f5c95513a56b7b0b54b0dc95c Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Wed, 11 Mar 2020 21:48:59 -0500
Subject: [PATCH] gnu: Add libgccjit.

* gnu/packages/gcc.scm (libgccjit): New variable.
---
gnu/packages/gcc.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index ead50bb1dc..03fdeb02e1 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -690,6 +690,34 @@ as the 'native-search-paths' field."
;; report two gfortran@5 that are in fact identical.
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
(custom-gcc gcc-4.9 "gccgo" '("go")
%generic-search-paths
--
2.25.1
L
L
Ludovic Courtès wrote on 16 Mar 2020 06:07
(name . LaFreniere, Joseph)(address . joseph@lafreniere.xyz)(address . 40045@debbugs.gnu.org)
87zhcge9ci.fsf@gnu.org
Hi!

"LaFreniere, Joseph" <joseph@lafreniere.xyz> skribis:

Toggle quote (7 lines)
>>From 8b08b302f6bf601f5c95513a56b7b0b54b0dc95c Mon Sep 17 00:00:00 2001
> From: Joseph LaFreniere <joseph@lafreniere.xyz>
> Date: Wed, 11 Mar 2020 21:48:59 -0500
> Subject: [PATCH] gnu: Add libgccjit.
>
> * gnu/packages/gcc.scm (libgccjit): New variable.

LGTM! I added a copyright line for you and pushed.

BTW, it seems that we can remove all the libraries under lib/ except
libgccjit.so itself (i.e., libgomp, libitm, etc.). Could you give it a
try?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 16 Mar 2020 06:08
control message for bug #40045
(address . control@debbugs.gnu.org)
87y2s0e9c5.fsf@gnu.org
tags 40045 fixed
close 40045
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 40045@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40045
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch