GNU bug report logs -
#42761
28.0.50; [feature/native-comp] allow customizing command line/driver options?
Previous Next
Reported by: Andreas Fuchs <asf <at> boinkor.net>
Date: Sat, 8 Aug 2020 14:51:01 UTC
Severity: normal
Found in version 28.0.50
Done: Andrea Corallo <akrl <at> sdf.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 42761 <at> debbugs.gnu.org (full text, mbox):
Andreas Fuchs <asf <at> boinkor.net> writes:
> I'm trying out emacs with native-comp on nix (working on this branch
> here: https://github.com/NixOS/nixpkgs/pull/94637), and am stumbling
> over a problem that is pretty specific to nix, it seems: As nix
> isolates
> each package to a "store" directory, you have to set specific linker
> flags so that gcc-jit can find -lgccjit and -lgcc_ext. This is
> currently
> done via the $LIBRARY_PATH environment variable, which works but
> seems
> pretty hackish to me (least of all because it isn't a thing that's
> supported on the darwin cctools linker - there, you have to pass the
> linker path as command-line arguments).
>
> I feel like it would be much better if users could specify the gcc
> driver flags directly, via gcc_jit_context_add_driver_option
> (https://gcc.gnu.org/onlinedocs/jit/topics/contexts.html#
> c.gcc_jit_context_add_driver_option).
>
> That way, instead of overriding environment variables which might get
> reset in child processes' wrapper scripts, an emacs installation
> could
> more directly influence the compilation step.
Hi Andreas,
I don't think should be too difficult to expose the driver option. The
downside is that gcc_jit_context_add_driver_option is not available in
all libgccjits (IIRC I added it to GCC 9).
Another option would be to set our self the LIBRARY_PATH before invoking
the compiler only in the async process. Have you already tried using
`comp-async-env-modifier-form' for this?
Thanks
Andrea
--
akrl <at> sdf.org
This bug report was last modified 4 years and 266 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.