From: Andreas Fuchs <asf@boinkor.net>
To: Andrea Corallo <akrl@sdf.org>
Cc: 42761@debbugs.gnu.org
Subject: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options?
Date: Sat, 8 Aug 2020 15:13:53 -0400 [thread overview]
Message-ID: <CAOHxn7zEm1vgtkQh=e+-CjqTdchua_DZM7qj_qUN3bjaRe9+Nw@mail.gmail.com> (raw)
In-Reply-To: <xjf4kpdc7nz.fsf@sdf.org>
[-- Attachment #1: Type: text/plain, Size: 2246 bytes --]
Hi Andrea,
Thanks for the quick reply!
On Sat, Aug 8, 2020 at 2:30 PM Andrea Corallo <akrl@sdf.org> wrote:
>
> Andreas Fuchs <asf@boinkor.net> writes:
> > 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).
That makes sense. Assuming that ~everyone would build the native-comp
branch with a recent (>=9) gcc release, I cut a branch here that
implements this (it does pass the driver options, too!):
https://github.com/antifuchs/emacs/compare/allow-setting-driver-options
I think this behavior could be made conditional on the presence of the
correct libgccjit ABI version, by declaring the variable in C code,
and then everyone on a newer gcc would be able to reap the benefits,
and everyone else could still use the branch, but only with the
standard linker flags as before (or passing LIBRARY_PATH if that's
supported on their platform).
> 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?
LIBRARY_PATH does work on GNU binutils: the concern for my nixpkgs
branch is for usage on Darwin, where that environment variable doesn't
do anything. To get anywhere there, we have to have a way to pass
command-line arguments... /-:
Besides that though, I think it might be useful for folks who want to
specify that other linkers should be used (like gold or lld), or
passing a -specs argument... I don't know if that's supported at all
yet, but adding this option would be an easy way of finding out how
unsupported it is (-;
Cheers,
--
Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs
[-- Attachment #2: Type: text/html, Size: 2851 bytes --]
next prev parent reply other threads:[~2020-08-08 19:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-08 2:51 bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? Andreas Fuchs
2020-08-08 18:30 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-08 19:13 ` Andreas Fuchs [this message]
2020-08-08 19:31 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-08 20:29 ` Andreas Fuchs
2020-08-09 7:58 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-11 2:34 ` Andreas Fuchs
2020-08-13 18:46 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-19 14:37 ` Andreas Fuchs
2020-08-19 15:41 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-20 14:12 ` Andreas Fuchs
2020-08-20 16:43 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-22 4:14 ` Andreas Fuchs
2020-08-24 8:49 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-26 19:07 ` Andreas Fuchs
2020-08-26 19:56 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOHxn7zEm1vgtkQh=e+-CjqTdchua_DZM7qj_qUN3bjaRe9+Nw@mail.gmail.com' \
--to=asf@boinkor.net \
--cc=42761@debbugs.gnu.org \
--cc=akrl@sdf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.