Subject: bug#55657: libgccjit is unusable

From: Andrew Whatson <[email-masked]>
Date: Thu, 4 Aug 2022 04:48:03 +0000

Hi John, Liliana,

Sorry I haven't jumped in before now, I appreciate your efforts to
bring emacs native-comp to guix!

On Thu, 4 Aug 2022 at 04:26, Liliana Marie Prikler
<[email-masked]> wrote:
>
> while this does help insofar as I now know which snippet I forgot to
> copy, I do still think that this leaves us with two unreasonable
> options if we want to use emacs to compile other packages:
>
> 1. Propagate gcc-toolchain from emacs.
> 2. Patch LIBRARY_PATH not just before configuration, but also via a
> wrapper.
>
> At the very least I don't see how Emacs would be able to compile other
> packages to native code without either of the above.
>
> WDYT?

The solution used in the package-definition in my channel is to patch
`comp.el` to directly reference the necessary gcc/glibc paths instead
of relying on the environment.  This occurs in the
"patch-driver-options" step immediately after the "set-libgccjit-path"
step mentioned earlier.  This makes gcc-toolchain part of emacs
closure, without requiring it to be propagated into the profile.

If I understand the problem correctly, that should suffice?

Cheers,
Andrew