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: Thu, 20 Aug 2020 10:12:54 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000098abc05ad4fb815" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26944"; 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 Thu Aug 20 16:14: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 1k8lKT-0006up-ED for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 16:14:09 +0200 Original-Received: from localhost ([::1]:37988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8lKS-0007Xg-Gu for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 10:14:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8lKM-0007XZ-KB for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 10:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8lKM-0007oi-A0 for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 10:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8lKM-00049I-6C for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 10:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Fuchs Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Aug 2020 14:14: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.159793279415884 (code B ref 42761); Thu, 20 Aug 2020 14:14:02 +0000 Original-Received: (at 42761) by debbugs.gnu.org; 20 Aug 2020 14:13:14 +0000 Original-Received: from localhost ([127.0.0.1]:43292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8lJa-000487-1r for submit@debbugs.gnu.org; Thu, 20 Aug 2020 10:13:14 -0400 Original-Received: from mail-ej1-f42.google.com ([209.85.218.42]:43382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8lJX-00047t-57 for 42761@debbugs.gnu.org; Thu, 20 Aug 2020 10:13:12 -0400 Original-Received: by mail-ej1-f42.google.com with SMTP id m22so2654156eje.10 for <42761@debbugs.gnu.org>; Thu, 20 Aug 2020 07:13:11 -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=s9p5+rfUULeCc8YjguPG884Bzs2ZqCcctTnKnce9D8M=; b=khhe5Ym2YiwUJXonUZzx5hJYGA9v3B0OGhBNe7xTgMCJUSKlu6dKT4LuM0qqLFwh9R TmrpA4TfuKIVztuKCQdFBPjHq9mpBBCUVJGPNvRbwJBKkMiYG4znZbMhVMsZBP6GszZj IUhyM/dyPjFVXWXRyCjPflyAbdNRtm43t2O0vUsPTe2Kl1fPR3HDfT2E3TbfYVcNNUM4 vPj+hFgSVEcVpeANB2x1w2He7Td0D6eyUcOV/1dPf6z4Z+YQbYoYFpFwsRTQfTXJatRS EoD96GZwmQB2XmqWi6FFUPylKLXeuo46rZd4aQOzRv8OdafvuzPfj35DsDNiKN4kUViW yC8A== 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=s9p5+rfUULeCc8YjguPG884Bzs2ZqCcctTnKnce9D8M=; b=K0jEGv4NChfq+Fo/Et2HxLbjbKhZILTR8fyptI1+AmMCaonrtpbMjzua/2Q9U7OfR2 tpRiSiUof+RK4GS6nYpeYVy14CvPi5J78g7TNCcuh1IZ+BI69wTTPxASSQjvPz8NQ4g1 URRWNmBSSVWqCUVGU2e38bzOtoQBTRYmboHIifem7pn82leXRa7TjPyP7mAFITGc59Zg nj0eWqHEk7SIoxCkvoDML2VAqKjaiwOAGdqazpjzgyzCgSORNSxOqSFgnOJYdKljlzoE TN3q+FOpGcu3bewOGOtklVfS9eF32TbYQQ1uMpccNJMnDZq0szEMeFT49S/eIJstGowI RDwA== X-Gm-Message-State: AOAM530z5Mbg/LKXle/h2P5Y69LK9e2pQ2VhXX/1/OmraypDfOWhTdxT 9M9gdwe2eBOOlDw0pxZsTWNGfMmreD6hYpe3gEcdxg== X-Google-Smtp-Source: ABdhPJx3uopPugc1f8Xrz1bHyflcLJyqquX+gNS5PoErQUeobRo0o/VLRwvT1F5HxQfijIIP5rEBXCujqg9JWTUIIMM= X-Received: by 2002:a17:906:82c1:: with SMTP id a1mr3437865ejy.172.1597932785201; Thu, 20 Aug 2020 07:13:05 -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:185696 Archived-At: --000000000000098abc05ad4fb815 Content-Type: text/plain; charset="UTF-8" On Wed, Aug 19, 2020 at 11:41 AM Andrea Corallo wrote: > Okay if the libgccjit feature is not available we raise an error, but > how the user is supposed to test for this feature without compiling? > > 'comp-libgccjit-version' starts working only if gcc_jit_version_major is > available otherwise return nil, and I added gcc_jit_version_major into > GCC10 :/ > > We need to offer a way to the user to check for that before going for > compilation. The only idea I've at the moment is that we expose a > function to set these instead of using 'comp-native-driver-options'. > Ah! That's a good point about users being unable to tell if their options will work until they try to compile. I would like to keep the driver-option setting interface as a variable holding a list, as that still allows users to edit them with the emacs-provided functions to do so. With a function accessor, we'd have to add functions to add/remove/map over/etc the options, which emacs already provides with `add-to-list' and friends. I think we could expose a predicate `comp-native-driver-options-available-p' that'll return t if the necessary facility exists. For some extra credit, maybe we could even have that predicate test whether a given set of driver options has a chance of succeeding (I guess that this would have to attempt a no-op compile to exercise the compiler->linker chain). A predicate to test for compatibility would be the nicest and would fit the bill well, though. -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --000000000000098abc05ad4fb815 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Aug 19, 2020 at 11:41 AM Andrea C= orallo <akrl@sdf.org> wrote:
<= /div>
Okay if the libgccjit feature is not available we raise an error, bu= t
how the user is supposed to test for this feature without compiling?

'comp-libgccjit-version' starts working only if gcc_jit_version_maj= or is
available otherwise return nil, and I added gcc_jit_version_major into
GCC10 :/

We need to offer a way to the user to check for that before going for
compilation.=C2=A0 The only idea I've at the moment is that we expose a=
function to set these instead of using 'comp-native-driver-options'= .

Ah! That's a good point about use= rs being unable to tell if their options will work until they try to compil= e.

I would like to keep the driver-option setting = interface as a variable holding a list, as that still allows users to edit = them with the emacs-provided functions to do so. With a function accessor, = we'd have to add functions to add/remove/map over/etc the options, whic= h emacs already provides with `add-to-list' and friends.
=C2= =A0
I think we could expose a predicate `comp-native-driver-optio= ns-available-p' that'll return t if the necessary facility exists.<= br>

For some extra credit, maybe we could=C2=A0eve= n have that predicate test whether a given set of driver options has a chan= ce of succeeding (I guess that this would have to attempt a no-op compile t= o exercise the compiler->linker chain). A predicate to test for compatib= ility would be the nicest and would fit the=C2=A0bill well, though.

--
Andrea= s Fuchs, (http://|im:asf@|mailto:= asf@)boinkor.net, = antifuchs
--000000000000098abc05ad4fb815--