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: Sun, 09 Aug 2020 07:58:20 +0000 Message-ID: References: Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6221"; 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 Sun Aug 09 09:59:09 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 1k4gEX-0001TX-Io for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 09:59:09 +0200 Original-Received: from localhost ([::1]:59936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4gEW-0007iM-LK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 03:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4gEQ-0007i6-6x for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 03:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4gEP-0007e8-Td for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 03:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4gEP-0005oX-Ry for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 03:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Aug 2020 07:59: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.159695990822310 (code B ref 42761); Sun, 09 Aug 2020 07:59:01 +0000 Original-Received: (at 42761) by debbugs.gnu.org; 9 Aug 2020 07:58:28 +0000 Original-Received: from localhost ([127.0.0.1]:59921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4gDs-0005nm-Dz for submit@debbugs.gnu.org; Sun, 09 Aug 2020 03:58:28 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:60513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4gDp-0005na-5b for 42761@debbugs.gnu.org; Sun, 09 Aug 2020 03:58:27 -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 0797wKNn016651; Sun, 9 Aug 2020 07:58:21 GMT In-Reply-To: (Andreas Fuchs's message of "Sat, 8 Aug 2020 16:29:20 -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:184384 Archived-At: Andreas Fuchs writes: > On Sat, Aug 8, 2020 at 3:31 PM Andrea Corallo wrote: >> 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>=9. >> >> 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. > > Agreed - that makes sense. I've adjusted the patch accordingly, and > de-untabified the files that I touched (sorry about the whitespace > churn, > leftover customization from another C codebase): > > https://github.com/emacs-mirror/emacs/compare/feature/ > native-comp...antifuchs:allow-setting-driver-options >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. >> Do you already have copyright paperwork done? > > I signed copyright assignment papers for gnus back in 2001, but those > are only valid for those changes to gnus. I've requested assignment > paperwork for GNU Emacs changes now. Super! Thanks Andrea -- akrl@sdf.org