From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Fuchs Newsgroups: gmane.emacs.bugs Subject: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? Date: Mon, 10 Aug 2020 22:34:03 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000028fbf705ac90e8c9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29717"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42761@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 11 04:35:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5K87-0007Yy-Qq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Aug 2020 04:35:12 +0200 Original-Received: from localhost ([::1]:41932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5K86-0006Ze-9i for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Aug 2020 22:35:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5K7y-0006ZL-G3 for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 22:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5K7y-0007kj-6z for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 22:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k5K7x-0000fS-Tz for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 22:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Fuchs Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Aug 2020 02:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42761 X-GNU-PR-Package: emacs Original-Received: via spool by 42761-submit@debbugs.gnu.org id=B42761.15971132642508 (code B ref 42761); Tue, 11 Aug 2020 02:35:01 +0000 Original-Received: (at 42761) by debbugs.gnu.org; 11 Aug 2020 02:34:24 +0000 Original-Received: from localhost ([127.0.0.1]:38114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5K7M-0000eN-7Y for submit@debbugs.gnu.org; Mon, 10 Aug 2020 22:34:24 -0400 Original-Received: from mail-ed1-f44.google.com ([209.85.208.44]:37591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5K7I-0000e9-23 for 42761@debbugs.gnu.org; Mon, 10 Aug 2020 22:34:22 -0400 Original-Received: by mail-ed1-f44.google.com with SMTP id i26so7902425edv.4 for <42761@debbugs.gnu.org>; Mon, 10 Aug 2020 19:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boinkor-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ua0nPULoxQhDQ610hUycmVimN5Pz2lYwQCJo//JbFX4=; b=Vf5rPtdEdaYJgQuVntTt+3sGyMYxe2PQufci67xDS+hregnC+VS+S5/RZvNSafOwzu slfZYZoxrCzX2PIfuKAkr8bxLMZdBkroKoBeLwCYOmszRq1CyHCzwbx7UZdkZJvPTzw5 z2SqrNZWE9FuA8Rrjtuw0ZEEt87q2GyZVXFyczYFdw3fTODnBDSrjRyVMfjhgWr07v0K uB6EUnwMDb7IL6M1D18FvGSnrSkhhg81xdvVbLbrEhDG7WXkMXJjvooys8LZNbU1lc/m fGjOyRhbmkMMBZTyyVTOM0sGnUDPwNwxCuL9eqp4IsrJfU/nlwiipsBCSMjFkfuhkNId 75lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ua0nPULoxQhDQ610hUycmVimN5Pz2lYwQCJo//JbFX4=; b=Zx5RWLS/u7gXXrH2y0RxyUbUwWe6cSOci4eIYFrk7FMWJK5i2fW3QOHMP475z2epTB Lsb0LkRwcQLw7LVE61n31PL4NEOm2rumjcZ5MCxLNWSzwHZ6P6s5B5DHF2bTfh27DHM8 inyo6mYR2IXebhpuV0cLa+L7+LHA+8B0qZbusdcXPDpoEc4cPe6T2EMhM5/be983IkJx u0NQmJm/KeUyGueij0Tj/6XHc+aCvHDN08aV4lXlVqAZmM9/Kiip/5v4J5j7nk8UoUgU J12JCcSpyb2uR2RBjZtz85+gGr6uvqk2D4ZHmZ6iJtQgjBa3JysVyV57XYK8+XyoVBCd cZ0A== X-Gm-Message-State: AOAM5331/VYXvoIFMnLaubFND8BTya0nyoS2zVToK2QZLfcW8njvPaKf FuT15uHUkmxxZeGe7YlKjsfCE1DUAeRj0/AR648DFA== X-Google-Smtp-Source: ABdhPJyM7Bgt8p3sqKxcBYWc9HUL+3030ibboO/kP+EQx+Ar3HEFjBb8BVGw4NI0M+mhZWUHgp8XjuAuuQVZUyAzvrg= X-Received: by 2002:aa7:da46:: with SMTP id w6mr24246314eds.7.1597113253809; Mon, 10 Aug 2020 19:34:13 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184616 Archived-At: --00000000000028fbf705ac90e8c9 Content-Type: text/plain; charset="UTF-8" On Sun, Aug 9, 2020 at 3:58 AM Andrea Corallo wrote: > From the patch: > > + #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option > > + DEF_DLL_FN (void, gcc_jit_context_add_driver_option, > > + (gcc_jit_context *ctxt, const char *optname)); > > + #endif > [...] > > + #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option > > + LOAD_DLL_FN (library, gcc_jit_context_add_driver_option); > > + #endif > > The above should not be ifdef'd as they allow the function to be used > only if present in the library in use at runtime on Windows systems. > > Unfortunatelly we do not have such system for Linux where the decision > to include the call is done at compile time. So unless we implement > that too also the call site has to be a little changed to handle this. > > Please have a look for that into in Fcomp_libgccjit_version where we use > gcc_jit_version_*. These are the only "optional" libgccjit entry point > we used so far. Ah, I misread the #ifdef condition above those. Makes sense, I've adjusted the branch and added one more commit that should ensure we pass the `comp-native-driver-options' to async compilation child processes correctly. This patch builds on my system, builds on darwin under nix (with some additional changes to emit "-L" library path entries), and asynchronously compiles code, too! Cheers, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --00000000000028fbf705ac90e8c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Aug 9, 2020 at 3:58 AM Andrea Cor= allo <akrl@sdf.org= > wrote:
> From the patch:
> > + #ifdef LIBGCCJIT_HAVE_gc= c_jit_context_add_command_line_option
> > + DEF_DLL_FN (void, gcc_= jit_context_add_driver_option,
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (gcc_jit_context *ctxt, const char *optname));
> > += #endif
> [...]
> > + #ifdef LIBGCCJIT_HAVE_gcc_jit_context_= add_command_line_option
> > + =C2=A0 LOAD_DLL_FN (library, gcc_jit= _context_add_driver_option);
> > + #endif
>
> The abov= e should not be ifdef'd as they allow the function to be used
> o= nly if present in the library in use at runtime on Windows systems.
>=
> Unfortunatelly we do not have such system for Linux where the dec= ision
> to include the call is done at compile time.=C2=A0 So unless = we implement
> that too also the call site has to be a little changed= to handle this.
>
> Please have a look for that into in Fcomp= _libgccjit_version where we use
> gcc_jit_version_*.=C2=A0 These are = the only "optional" libgccjit entry point
> we used so far.=

Ah, I misread the #ifdef condition above those. Makes sense, I'= ve adjusted
the branch and added one more commit that should ensure we p= ass the
`comp-native-driver-options' to async compilation child proc= esses
correctly.

This patch builds on my system, builds on darwin= under nix (with some=C2=A0
additional changes to emi= t "-L" library path entries), and asynchronously=C2=A0
compiles code, too!

Cheers,
--
Andreas Fuchs, (http://|im:asf@|mailto:asf@)boink= or.net, antifuchs
--00000000000028fbf705ac90e8c9--