bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42761: 28.0.50; [feature/native-comp] allow customizing command line


From: Andrea Corallo
Subject: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options?
Date: Sat, 08 Aug 2020 18:30:08 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Andreas Fuchs <asf@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@sdf.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]