From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? Date: Sat, 08 Aug 2020 19:31:14 +0000 Message-ID: References: Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28126"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 42761@debbugs.gnu.org To: Andreas Fuchs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 08 21:32:18 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 1k4UZm-0007Aq-8u for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 21:32:18 +0200 Original-Received: from localhost ([::1]:36512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4UZk-00057K-Og for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 15:32:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4UZW-00056n-QN for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 15:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4UZW-0004z8-H0 for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 15:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4UZW-0002a8-Dc for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 15:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Aug 2020 19:32:02 +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.15969150809876 (code B ref 42761); Sat, 08 Aug 2020 19:32:02 +0000 Original-Received: (at 42761) by debbugs.gnu.org; 8 Aug 2020 19:31:20 +0000 Original-Received: from localhost ([127.0.0.1]:59646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4UYq-0002ZD-AS for submit@debbugs.gnu.org; Sat, 08 Aug 2020 15:31:20 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:57982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4UYo-0002Z4-3w for 42761@debbugs.gnu.org; Sat, 08 Aug 2020 15:31:18 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 078JVEf7001362; Sat, 8 Aug 2020 19:31:15 GMT In-Reply-To: (Andreas Fuchs's message of "Sat, 8 Aug 2020 15:13:53 -0400") 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:184368 Archived-At: Andreas Fuchs writes: > That makes sense. Assuming that ~everyone would build the native-comp > branch with a recent (>=3D9) 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.=C2=A0 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 (-; Hi Andreas, didn't know LIBRARY_PATH works only with binutils. Agree this sounds useful. Regarfing the gcc version: ne option would be to just ifdef the body of add_driver_options using LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option and making clear that the customize is effective only with GCC>=3D9. But I think would be better to raise an error if comp-native-driver-options is not empty and gcc_jit_context_add_command_line_option is not available. I think we should make this clear in the customize doc. Do you already have copyright paperwork done? Thanks! Andrea PS I may have missed parts of your patch cause I think is untabifying all touched files generating a very big diff. --=20 akrl@sdf.org