diff mbox series

[bug#44775] WIP: Add gccemacs

Message ID 874kljnk8z.fsf@asu.edu
State Work in progress
Headers show
Series [bug#44775] WIP: Add gccemacs | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

John Soo Nov. 21, 2020, 9:15 a.m. UTC
Hi Guix,

I was curious how fast this gccemacs branch might be, so I got it to
compile.

It feels fast but there are bugs and the closure is huge. Also these
patches do not use any of the parameterization machinery.

I just thought I would share my work.

Thanks,

John

Comments

zimoun Nov. 23, 2020, 10:22 p.m. UTC | #1
Hi John,

On Sat, 21 Nov 2020 at 01:15, John Soo <jsoo1@asu.edu> wrote:

> I was curious how fast this gccemacs branch might be, so I got it to
> compile.

Thanks!  This motivates me to resume what had been discussed here [1]:
be able to somehow run:

--8<---------------cut here---------------start------------->8---
 guix build emacs-magit emacs-foo emacs-bar --with-input=emacs=gccemacs
--8<---------------cut here---------------end--------------->8---

At least, have a package transformation that allow to rebuild all the
Emacs packages with the ’gccemacs’ VM instead of the current Emacs 27 one.


> It feels fast but there are bugs and the closure is huge. Also these
> patches do not use any of the parameterization machinery.

What do you mean by “parameterization machinery”?  The new
’with-parameter’ introduced here [2] or the package transformation that
replaces all the dependencies (explicit and implicit).


1: <https://yhetil.org/guix-bugs/868scwtt34.fsf@gmail.com/>
2: <https://yhetil.org/guix-devel/87eeku8trb.fsf@gnu.org>


All the best,
simon
John Soo Nov. 24, 2020, 3:06 p.m. UTC | #2
Hi zimoun,

zimoun <zimon.toutoune@gmail.com> writes:

> Thanks!  This motivates me to resume what had been discussed here [1]:
> be able to somehow run:
>
>  guix build emacs-magit emacs-foo emacs-bar --with-input=emacs=gccemacs
>
> At least, have a package transformation that allow to rebuild all the
> Emacs packages with the ’gccemacs’ VM instead of the current Emacs 27 one.
>
>
>> It feels fast but there are bugs and the closure is huge. Also these
>> patches do not use any of the parameterization machinery.
>
> What do you mean by “parameterization machinery”?  The new
> ’with-parameter’ introduced here [2] or the package transformation that
> replaces all the dependencies (explicit and implicit).
>
>
> 1: <https://yhetil.org/guix-bugs/868scwtt34.fsf@gmail.com/>
> 2: <https://yhetil.org/guix-devel/87eeku8trb.fsf@gnu.org>

I am referring to https://yhetil.org/guix-devel/87eeku8trb.fsf@gnu.org

--with-parameter=gccemacs or similar seem to be required since the
native-comp branch requires a different source, configure flags, and
probably native-search-paths at least.

There appears to be a separate compiled artifact directory under
$out/lib/emacs/$version/native-lisp/$version-triple which has the
compiled native libraries (.eln files). That directory seems to not be
in the search path.  That appears to be causing the first error
I see. I am not sure which env variable would be tweaked to pick those
paths up.

Hope that helps!

John
Morgan Smith Nov. 29, 2020, 2:14 a.m. UTC | #3
Have you seen this gccemacs package? I haven't looked into it myself but
it might help you.

https://github.com/flatwhatson/guix-channel
diff mbox series

Patch

From f23ebabab5e57b22b45fea3a26f9a1814331f39a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 21 Nov 2020 00:59:14 -0800
Subject: [PATCH 3/3] gnu: Add gcceamcs-no-x.

* gnu/packages/emacs.scm (gccemacs-no-x): New variable.
---
 gnu/packages/emacs.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 6312fde3ad..721a13f429 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -487,6 +487,26 @@  editor (from the native compilation branch)")
      ((#:configure-flags flags ''())
       `(cons "--with-nativecomp" ,flags))))))
 
+(define-public gccemacs-no-x
+  (package/inherit emacs-next-no-x
+   (name "gccemacs-no-x")
+   (version gccemacs-version)
+   (source gccemacs-source)
+   (synopsis "The extensible, customizable, self-documenting text
+editor (console only, from the native compilation branch)")
+   (build-system gnu-build-system)
+   (inputs
+    `(("libgccjit" ,(canonical-package libgccjit))
+      ,@(package-inputs emacs-next-no-x)))
+   (arguments
+    (substitute-keyword-arguments (package-arguments emacs-next-no-x)
+      ((#:phases p)
+       `(modify-phases ,p
+          (add-after 'bootstrap 'add-libgccjit-gcc-lib-to-library-path
+            ,add-libgccjit-gcc-lib-to-library-path)))
+      ((#:configure-flags flags ''())
+       `(cons "--with-nativecomp" ,flags))))))
+
 (define-public emacs-no-x-toolkit
   (package/inherit emacs
     (name "emacs-no-x-toolkit")
-- 
2.29.1