* [bug#40045] [PATCH] gnu: Add libgccjit.
@ 2020-03-12 21:56 LaFreniere, Joseph
2020-03-16 13:07 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: LaFreniere, Joseph @ 2020-03-12 21:56 UTC (permalink / raw)
To: 40045
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
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
https://gcc.gnu.org/onlinedocs/jit/internals/index.html#packaging-notes
correctly.
This is toward the eventual goal of packaging gccemacs
(https://akrl.sdf.org/gccemacs.html).
--
Joseph LaFreniere
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-libgccjit.patch --]
[-- Type: text/x-patch, Size: 2025 bytes --]
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(+)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [bug#40045] [PATCH] gnu: Add libgccjit.
2020-03-12 21:56 [bug#40045] [PATCH] gnu: Add libgccjit LaFreniere, Joseph
@ 2020-03-16 13:07 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-03-16 13:07 UTC (permalink / raw)
To: LaFreniere, Joseph; +Cc: 40045
Hi!
"LaFreniere, Joseph" <joseph@lafreniere.xyz> skribis:
>>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’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-16 13:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-12 21:56 [bug#40045] [PATCH] gnu: Add libgccjit LaFreniere, Joseph
2020-03-16 13:07 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).