From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 10:50:51 2020 Received: (at submit) by debbugs.gnu.org; 8 Aug 2020 14:50:51 +0000 Received: from localhost ([127.0.0.1]:59444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4QBO-000207-F4 for submit@debbugs.gnu.org; Sat, 08 Aug 2020 10:50:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:38536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4Exo-0007bT-Bm for submit@debbugs.gnu.org; Fri, 07 Aug 2020 22:52:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4Exn-00012G-Tj for bug-gnu-emacs@gnu.org; Fri, 07 Aug 2020 22:52:04 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:44485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4Exl-00056r-2I for bug-gnu-emacs@gnu.org; Fri, 07 Aug 2020 22:52:03 -0400 Received: by mail-ed1-x52f.google.com with SMTP id l23so2566026edv.11 for ; Fri, 07 Aug 2020 19:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boinkor-net.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=p2ZbNWhI2e++WWXdrgBSUlnRoKTFb+uMFiuhR5YQKMI=; b=Qqu1jNSuhBFYcWhCroZg92LwlDs2a3aMg824QFHqMr4l+nRyVKg+qkzi9kDX+ZSYIa 5TaEOfihSMq+jA79X9FeAqM6JJXNMrkUf6uHMzPKlj2D3Wja/5qV3+sl6zW7Fmx9P7LI DXHGpekpycpvxJYVab0mqkkEDCx+zupzRIyCZGtlrL+JAEjvLnZSBChEmAwrxHkfMf2M GjTImD9RBNnpKvd4cuxxL90RnADVbPYAyiY7aMH5CWHkESg+87Cdw6fZXu/JpQFyVci6 ucy66Rtl1sE6pGeQeVkcsppXCDNcVYtHy7RpYvTPZDKJzt2WR/8X3EfkGziBndudSdDI KveQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=p2ZbNWhI2e++WWXdrgBSUlnRoKTFb+uMFiuhR5YQKMI=; b=JL4osY/437aS5S5vo/zyns/59EAu2JOdYdwS4v0RT1tJDznE3JkngNCMwmmZlkOVnT 6C1Q119+mFN37f9Yr8FSm6CMPEGkeV9qEVb8iFFvel6bamMVmyoEpWLibW4TjIlAbRNC DDqJhUg1BSdpIxiA/V8xg+blW4a/sdKjbVq1vsCcmwOnudtwmwKbPlQBX/MoAbpH9WIH lcFj3zIO8q+0Q16Q5TvFf02aqnsSF2RVefctQuENHR/IYf+Oh7rz98ev2QnGlV8m9o3P xZGK8cYaLFHojPvtIuctIZgYehrdOwkd4yp17+ZF2l1qhuLxmr4/RfOceKnN6BI3bnL9 3O6w== X-Gm-Message-State: AOAM533d+GLua7cq0spn+dfgf9tD1d3Xa4uPtYfwem1lMJeU+68rcRdy dugu0HJ19pDXgUrHgiNiuTIyB1fjrbB2BNyypC4qnOGHu80= X-Google-Smtp-Source: ABdhPJwy0oLPoybcRplX6RQGmJHjnFAmfwdayDd4r8jpmmjYiqaP2iEhLn2+A6ksPtoWznJAqxRvJbcHvttAXBF8+1s= X-Received: by 2002:a50:bc05:: with SMTP id j5mr3717132edh.375.1596855117968; Fri, 07 Aug 2020 19:51:57 -0700 (PDT) MIME-Version: 1.0 From: Andreas Fuchs Date: Fri, 7 Aug 2020 22:51:47 -0400 Message-ID: Subject: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000108eb605ac54ce19" Received-SPF: none client-ip=2a00:1450:4864:20::52f; envelope-from=asf@boinkor.net; helo=mail-ed1-x52f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 08 Aug 2020 10:50:49 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --000000000000108eb605ac54ce19 Content-Type: text/plain; charset="UTF-8" I'm trying out emacs with native-comp on nix (working on this branch here: https://github.com/NixOS/nixpkgs/pull/94637), and am stumbling over a problem that is pretty specific to nix, it seems: As nix isolates each package to a "store" directory, you have to set specific linker flags so that gcc-jit can find -lgccjit and -lgcc_ext. This is currently done via the $LIBRARY_PATH environment variable, which works but seems pretty hackish to me (least of all because it isn't a thing that's supported on the darwin cctools linker - there, you have to pass the linker path as command-line arguments). 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. Thanks, Andreas. In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.6 (Build 19G73)) Repository revision: 80d7f710f2fab902e46aa3fddb8e1c1795420af3 Repository branch: master Windowing system distributor 'Apple', version 10.3.1894 System Description: Mac OS X 10.15.6 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=/nix/store/2j5mwh18mqpri4k1v0j05gkklyp79rvr-emacs-gcc-20200802.0 --disable-build-details --with-modules --with-ns --disable-ns-self-contained --with-nativecomp CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200' Configured features: JPEG TIFF PNG RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES NATIVE_COMP THREADS JSON PDUMPER Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib seq byte-opt gv bytecomp byte-compile cconv tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face pcase macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 53347 6820) (symbols 48 6006 0) (strings 32 15710 2115) (string-bytes 1 557531) (vectors 16 9810) (vector-slots 8 193576 7914) (floats 8 20 24) (intervals 56 194 3) (buffers 992 12)) -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --000000000000108eb605ac54ce19 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I'm trying out emacs with native-comp on nix (work= ing on this branch
here: https://github.com/NixOS/nixpkgs/pull/94637), and am stumbling=
over a problem that is pretty specific to nix, it seems: As nix isolate= s
each package to a "store" directory, you have to set specifi= c linker
flags so that gcc-jit can find -lgccjit and -lgcc_ext. This is = currently
done via the $LIBRARY_PATH environment variable, which works b= ut seems
pretty hackish to me (least of all because it isn't a thing= that's
supported on the darwin cctools linker - there, you have to = pass the
linker path as command-line arguments).

I feel like it w= ould be much better if users could specify the gcc
driver flags directly= , via gcc_jit_context_add_driver_option
(ht= tps://gcc.gnu.org/onlinedocs/jit/topics/contexts.html#c.gcc_jit_context_add= _driver_option).

That way, instead of overriding environment var= iables which might get
reset in child processes' wrapper scripts, an= emacs installation could
more directly influence the compilation step.<= br>
Thanks,
Andreas.



In GNU Emacs 28.0.50 (build 1, x8= 6_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.6 (Build 19G73))Repository revision: 80d7f710f2fab902e46aa3fddb8e1c1795420af3
Reposito= ry branch: master
Windowing system distributor 'Apple', version = 10.3.1894
System Description: Mac OS X 10.15.6

Recent messages:For information about GNU Emacs and the GNU system, type C-h C-a.

= Configured using:
'configure
--prefix=3D/nix/store/2j5mwh18mqpri4= k1v0j05gkklyp79rvr-emacs-gcc-20200802.0
--disable-build-details --with-m= odules --with-ns
--disable-ns-self-contained --with-nativecomp
CFLAGS= =3D-DMAC_OS_X_VERSION_MAX_ALLOWED=3D101200'

Configured features:=
JPEG TIFF PNG RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB
TOOLKI= T_SCROLL_BARS NS MODULES NATIVE_COMP THREADS JSON PDUMPER

Important = settings:
value of $LC_ALL: en_US.UTF-8
value of $LC_COLLATE: C
va= lue of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix

Major = mode: Fundamental

Minor modes in effect:
tooltip-mode: t
globa= l-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-b= ar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-l= ock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-enc= ryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-= number-mode: t
transient-mark-mode: t

Load-path shadows:
None = found.

Features:
(shadow sort mail-extr emacsbug message rmc puny= dired dired-loaddefs
rfc822 mml easymenu mml-sec password-cache epa der= ived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search = mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils ma= ilheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-uti= ls time-date
subr-x cl-loaddefs cl-lib seq byte-opt gv bytecomp byte-com= pile cconv
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-floa= t-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win=
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
= newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-ba= r menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock fo= nt-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-ge= neric cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-vie= t lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czec= h european ethiopic indian cyrillic chinese
composite charscript charpro= p case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloa= ded nadvice loaddefs button faces
cus-face pcase macroexp files text-pro= perties overlay sha1 md5 base64
format env code-pages mule custom widget= hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty ma= ke-network-process emacs)

Memory information:
((conses 16 53347 6= 820)
(symbols 48 6006 0)
(strings 32 15710 2115)
(string-bytes 1 5= 57531)
(vectors 16 9810)
(vector-slots 8 193576 7914)
(floats 8 20= 24)
(intervals 56 194 3)
(buffers 992 12))

--
Andreas Fuch= s, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs
--000000000000108eb605ac54ce19-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 14:30:17 2020 Received: (at 42761) by debbugs.gnu.org; 8 Aug 2020 18:30:17 +0000 Received: from localhost ([127.0.0.1]:59590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4Tbl-00014A-4P for submit@debbugs.gnu.org; Sat, 08 Aug 2020 14:30:17 -0400 Received: from mx.sdf.org ([205.166.94.24]:60957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4Tbh-000140-Vq for 42761@debbugs.gnu.org; Sat, 08 Aug 2020 14:30:16 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 078IU83f011030; Sat, 8 Aug 2020 18:30:09 GMT From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Sat, 08 Aug 2020 18:30:08 +0000 In-Reply-To: (Andreas Fuchs's message of "Fri, 7 Aug 2020 22:51:47 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Fuchs writes: > I'm trying out emacs with native-comp on nix (working on this branch > here: https://github.com/NixOS/nixpkgs/pull/94637), and am stumbling > over a problem that is pretty specific to nix, it seems: As nix > isolates > each package to a "store" directory, you have to set specific linker > flags so that gcc-jit can find -lgccjit and -lgcc_ext. This is > currently > done via the $LIBRARY_PATH environment variable, which works but > seems > pretty hackish to me (least of all because it isn't a thing that's > supported on the darwin cctools linker - there, you have to pass the > linker path as command-line arguments). > > 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). 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? Thanks Andrea -- akrl@sdf.org From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 15:31:20 2020 Received: (at 42761) by debbugs.gnu.org; 8 Aug 2020 19:31:20 +0000 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 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 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 From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Sat, 08 Aug 2020 19:31:14 +0000 In-Reply-To: (Andreas Fuchs's message of "Sat, 8 Aug 2020 15:13:53 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 15:55:34 2020 Received: (at 42761) by debbugs.gnu.org; 8 Aug 2020 19:55:34 +0000 Received: from localhost ([127.0.0.1]:59651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4UwI-00038c-2f for submit@debbugs.gnu.org; Sat, 08 Aug 2020 15:55:34 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]:36047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4UID-00028Z-SG for 42761@debbugs.gnu.org; Sat, 08 Aug 2020 15:14:10 -0400 Received: by mail-ed1-f45.google.com with SMTP id ba10so3609785edb.3 for <42761@debbugs.gnu.org>; Sat, 08 Aug 2020 12:14:09 -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=09qp25nI/CjKdeETqDIt3keGmN6p/mBsVoGou1EID+8=; b=AXAZHEfUeu+5tR2xlOL3yiOso4HpIHXM/40XEcU+Tt2XGbSzlAICgPdxrq2Yd4ieOS aiZvdOMvu3jJydxF/LE+kXoUSR3eXf+kWFUI5s9p5Na145SZLQXqOqRP8bblisMrWVT0 Q3y9DS6Bsw5Mn3TpyEiYmxO2BEANyV1+5NsCQM7ljC1y0QnzLCE+H5CLlQRDdlN2Kbjj F3VmAzLnbgQBm/EheQzPoLlCpq/uimSApHl3bMdfvp3GNUxYik8fXHuxcluMSZFbiWln TurhyUXApCcvOd9EvJNtBl4E0rW0sB2MJFakpu50+FecxhNbnu0phWhhZ0q4q7uLBoIv Pi2w== 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=09qp25nI/CjKdeETqDIt3keGmN6p/mBsVoGou1EID+8=; b=IhsVWg3wZ3fNeaqeWgUMSZYiP9m4xNyzVoMxo2QCNyWTWOvofApMZh86btXum3rtQ7 gr2P7Cfs6wzDRGcxhI72MImJgGWJc4lvFGBF+FSgNZl3nLjrGPjZYzXx/ZJyaZVxkuCa SoejrN5E+SsQKvtfh6ejmoZsBYv5dGG6wE6UaPUXyQbNkjmHQ8p796nVjaFwUebrj+fg o8KaAbAvVuvlyqmesbnYgh3NUK14rODOOQV9cwE7yq65v8CIKgCcpghz15zJ5x0QwQQT ALYW5IDtigL5xvzowCoJ8D2IEw0GqxPen66SRZQFIBLU5/kDqARReYrg+nP0Icz5mMW3 1VUg== X-Gm-Message-State: AOAM533LEIsgLcd9JrW7EWavpgAh99Psr0dBKCLC8K1emhU9ikXQ13y+ Q9utINFKNtOqZ3Mjkt961tOkQLx/NHAZxsCuftXHLw== X-Google-Smtp-Source: ABdhPJyX7hxnkPMusBqBr+afjjWrG3+2p5B8KB8PT481kLbY0GX5Z/TvDoCBrL8antCoaVlJ3JptvIIkm2BJxqP3Uic= X-Received: by 2002:a05:6402:847:: with SMTP id b7mr14852387edz.39.1596914043846; Sat, 08 Aug 2020 12:14:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andreas Fuchs Date: Sat, 8 Aug 2020 15:13:53 -0400 Message-ID: Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: Andrea Corallo Content-Type: multipart/alternative; boundary="0000000000005222c505ac628612" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42761 X-Mailman-Approved-At: Sat, 08 Aug 2020 15:55:31 -0400 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000005222c505ac628612 Content-Type: text/plain; charset="UTF-8" Hi Andrea, Thanks for the quick reply! On Sat, Aug 8, 2020 at 2:30 PM Andrea Corallo wrote: > > Andreas Fuchs 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 --0000000000005222c505ac628612 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Andrea,

Thanks for the quick reply!

On S= at, Aug 8, 2020 at 2:30 PM Andrea Corallo <akrl@sdf.org> wrote:
>
> Andreas Fuchs <asf@boinkor.net> writes:
> > I fee= l 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_j= it_context_add_driver_option).
> >
> > That way, instead = of overriding environment variables which might get
> > reset in c= hild processes' wrapper scripts, an emacs installation
> > cou= ld
> > more directly influence the compilation step.
>
&g= t; Hi Andreas,
>
> I don't think should be too difficult to= expose the driver option.=C2=A0 The
> downside is that gcc_jit_conte= xt_add_driver_option is not available in
> all libgccjits (IIRC I add= ed it to GCC 9).

That makes sense. Assuming that ~everyone would bui= ld 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-driv= er-options

I think this behavior could be made conditional on th= e presence of the
correct libgccjit ABI version, by declaring the variab= le 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 t= he
standard linker flags as before (or passing LIBRARY_PATH if that'= s
supported on their platform).

> Another option would be to s= et our self the LIBRARY_PATH before invoking
> the compiler only in t= he async process.=C2=A0 Have you already tried using
> `comp-async-en= v-modifier-form' for this?


LIBRARY_PATH does work on GNU bin= utils: the concern for my nixpkgs
branch is for usage on Darwin, where t= hat environment variable doesn't
do anything. To get anywhere there,= we have to have a way to pass
command-line arguments... /-:

Besi= des that though, I think it might be useful for folks who want to
specif= y that other linkers should be used (like gold or lld), or
passing a -sp= ecs 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
--0000000000005222c505ac628612-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 16:29:39 2020 Received: (at 42761) by debbugs.gnu.org; 8 Aug 2020 20:29:39 +0000 Received: from localhost ([127.0.0.1]:59659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4VTH-0003uQ-1T for submit@debbugs.gnu.org; Sat, 08 Aug 2020 16:29:39 -0400 Received: from mail-ed1-f53.google.com ([209.85.208.53]:34463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4VTE-0003uC-Oo for 42761@debbugs.gnu.org; Sat, 08 Aug 2020 16:29:38 -0400 Received: by mail-ed1-f53.google.com with SMTP id bs17so3701517edb.1 for <42761@debbugs.gnu.org>; Sat, 08 Aug 2020 13:29:36 -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=XsUmQRC+44LSKqPGuVDIPrIAyFjtqPkQ3lnCaaiiw+A=; b=phiyC8nRbEi0asX5CHiP8Nu1HTWwZK1wu6f6EF1YONQWryyfk0tgEgFpS0RdbsU7ID Ux/YNxdp4dmrbutLlsKlI0b087hEk6fcFg+KODGt3ZoUck5RqYIKqjgZeOuuD/vf8CgW qTpOyxdXc4r4FanZqHgMnaeV/YAiZkl+TtlqFmNvS5AWaCHiX07+b5HXYMntI5POv3Pc /cx3jstZ4w+cCIqE01Gsj/b3doZpClEEdWo0P87rVHwTh8OdH+C7YqjWelSFKbFtn5tH j6MisoUX/km95ZIjaV46oGtwHjhKp7izEzy1lPCpd9581J4Go5yt5WME25vqPvDdItTv 7TSA== 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=XsUmQRC+44LSKqPGuVDIPrIAyFjtqPkQ3lnCaaiiw+A=; b=pDYSwq7PfDSTvxs91Ja5TDlMXwX5IzVjZQFPEg6id1jSWSklgFVNyu70+yi0o4MbVl efYegDtjCbKzAwihEw66kBPt3YzpVO6LX1zxp80HAC15BGJo7MXlGou2p3GLPQM0Qpyt sEui2kdHmvOoTPsOzvtrWEKGZ28KaGSXApAJmnTxCys7EdIQan4BiA4JXxhfV6C5HEto sDG3GBxIjb0UUIRS0G9jKLdQ+HM3Dh4W1zhIsCHpx9Ov6Jt2ZzjXg/T++19YTu+hGOrY MkKShJuE/iiNVcTzrVBy6D2iFTl3WaB73T7SoE89wB5Y5F/xDPNKNK0agbKEzeXuZwEn ea0A== X-Gm-Message-State: AOAM533W2pciNGmB4/yySh3MhFy/4E5XWCTGO30Hh5UAzgCLaeMYIDhN E3d/odzReIdywQNoNk/7bVyynyZWxcMWrJ3GYFn4Pw== X-Google-Smtp-Source: ABdhPJxbt3nSnBTDuBCHYSQ/5984+vDRBcffwYm8QLJGUHGvLXVlLJIhSFfpdsGe/x7731oXqBl7ZtuDNBXSZZvWztI= X-Received: by 2002:aa7:d654:: with SMTP id v20mr14744255edr.314.1596918570706; Sat, 08 Aug 2020 13:29:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andreas Fuchs Date: Sat, 8 Aug 2020 16:29:20 -0400 Message-ID: Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000247d6305ac6394e0" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000247d6305ac6394e0 Content-Type: text/plain; charset="UTF-8" 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 > 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. Cheers, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --000000000000247d6305ac6394e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 8, 2020 at 3:31 PM Andrea Corallo <akrl@sdf.org> wrote:
> Regarfing the = gcc version: ne option would be to just ifdef the body of
> add_drive= r_options using
> LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_opt= ion and making clear
> that the customize is effective only with GCC&= gt;=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.

Agreed - that makes sense. I&= #39;ve adjusted the patch accordingly, and
de-untabified the files that = I touched (sorry about the whitespace churn,
leftover customization from= another C codebase):

ht= tps://github.com/emacs-mirror/emacs/compare/feature/native-comp...antifuchs= :allow-setting-driver-options

> 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 re= quested assignment
paperwork for GNU Emacs changes now.

Cheers,--
Andreas Fuchs, (http://|im:asf@|mailto:asf@= )boinkor.net, antifuchs
--000000000000247d6305ac6394e0-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 09 03:58:28 2020 Received: (at 42761) by debbugs.gnu.org; 9 Aug 2020 07:58:28 +0000 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 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 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 From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Sun, 09 Aug 2020 07:58:20 +0000 In-Reply-To: (Andreas Fuchs's message of "Sat, 8 Aug 2020 16:29:20 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 10 22:34:24 2020 Received: (at 42761) by debbugs.gnu.org; 11 Aug 2020 02:34:24 +0000 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 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 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) MIME-Version: 1.0 References: In-Reply-To: From: Andreas Fuchs Date: Mon, 10 Aug 2020 22:34:03 -0400 Message-ID: Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: Andrea Corallo Content-Type: multipart/alternative; boundary="00000000000028fbf705ac90e8c9" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 13 14:46:30 2020 Received: (at 42761) by debbugs.gnu.org; 13 Aug 2020 18:46:30 +0000 Received: from localhost ([127.0.0.1]:51080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6IFB-0005jg-QZ for submit@debbugs.gnu.org; Thu, 13 Aug 2020 14:46:30 -0400 Received: from mx.sdf.org ([205.166.94.24]:59487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6IF9-0005jX-3d for 42761@debbugs.gnu.org; Thu, 13 Aug 2020 14:46:28 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 07DIkP9k020344; Thu, 13 Aug 2020 18:46:25 GMT From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Thu, 13 Aug 2020 18:46:25 +0000 In-Reply-To: (Andreas Fuchs's message of "Mon, 10 Aug 2020 22:34:03 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Fuchs writes: > 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, >> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (gcc_jit_context *ctxt, co= nst 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 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.=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 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=C2=A0 > additional changes to emit "-L" library path entries), and > asynchronously=C2=A0 > compiles code, too! Sounds great. Some small notes: > + static void > + add_driver_options () > + { > + Lisp_Object options =3D Fsymbol_value (Qcomp_native_driver_options); > +=20 > + #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option I think here would be better to use something like #if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option) || defined (= WINDOWSNT) plus the pragma to cleanup the warning as we do in Fcomp_libgccjit_version. > + while (CONSP (options)) > + { > + gcc_jit_context_add_driver_option (comp.ctxt, SSDATA (XCAR (optio= ns))); > + options =3D XCDR (options); > + } > + #else > + if (CONSP (options)) > + { > + xsignal1 (Qnative_compiler_error, > + build_string ("Customizing native compiler options via = `comp-native-driver-options' is only available on libgccjit version 9 and a= bove.")); We should break this line to be max 80 columns wide. > + } > + #endif > + } [...] With those changes looks good to me once the paperwork is completed. Thanks! Andrea =20=20 --=20 akrl@sdf.org From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 19 10:37:43 2020 Received: (at 42761) by debbugs.gnu.org; 19 Aug 2020 14:37:43 +0000 Received: from localhost ([127.0.0.1]:40667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8PDj-00067u-Jg for submit@debbugs.gnu.org; Wed, 19 Aug 2020 10:37:43 -0400 Received: from mail-ej1-f49.google.com ([209.85.218.49]:42858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8PDh-00067h-MG for 42761@debbugs.gnu.org; Wed, 19 Aug 2020 10:37:42 -0400 Received: by mail-ej1-f49.google.com with SMTP id g19so26540812ejc.9 for <42761@debbugs.gnu.org>; Wed, 19 Aug 2020 07:37:41 -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=3x6/3S2mw0w2Aw5S0UbYSvUC3JnYzDjmXwvSTIUhdS8=; b=iCCO18yqBOQVcjoDx8fjdWjSeOnZbO959KDm3rkq2w5R5CVgriq4rkIkr20aDJtH5z crYG0Kfs/L+JS1SOiqQAsVT5benGtamUErsVcZvmzqF3X8MgrvgapAQ5wT7LZgSjHwMi 3rDrqxXfgz5k8el9QGwT1uO9M46Z5HmqJXXRy2XVlSBhASbDjwjpZ0g9FpKH4VprUmZd sr1WJYk5HVUt4x9CRWeS7v/a+3pZXuwpYf46SVnE+H6kvyshPH/KrJs1MPzQxcdZR45k 0A6Jx1Lx34n5VV9JKxNFp3xlQ23hgNa01DBo9ORRQfiyGLM3OxYObBvhBZBiSbdP2/33 gsvA== 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=3x6/3S2mw0w2Aw5S0UbYSvUC3JnYzDjmXwvSTIUhdS8=; b=oukOKYfO/sewxDvFLipZtTQzboESvrDFVDbgn0NLhSFAHsoxg6A4OrL0vI8ZZAY2S0 21nduZvd7glLC4jQM3dB6YLZFlh9d59j6CBm182/tkFMuvyf8Jm+qUcZCxs2e6f+3Ef1 JPUTO8f4TwuZMRDtuq43L+XetmMpgAuzmrSTiAgYs2VFN3QEo0ZQzHXS4R9+KkzH+D09 1w5F8G0XomDM0qleKBajhe5sg8Qo/JzO+L7Ghifqd2co7ZGdqkvCCz4TTFP5f+La/TIH qRDE0f15wscUnCnaU6p3Pm3g/EVehcGwtz2TvO/q+IBVEnQNJSl0DxKlreMEvVjKKSWk DcAg== X-Gm-Message-State: AOAM530oIZDshqVDpI1lJcoktrZWrvCIkxcteU3OTBM19jcJy5rnfylR TiH2vvoO/r6Q4ozmi9KND3v6jptqdEUKmOiosrHbQw== X-Google-Smtp-Source: ABdhPJx7jrdQvOJ+o7BuEGtMrQa9nEyJOaLwEv1OnfXZnbSCrRlekkPRRYI6vzKB8u/TMrKzo7GRcJBMUeQ1eKR5CNA= X-Received: by 2002:a17:906:82c1:: with SMTP id a1mr24957056ejy.172.1597847855510; Wed, 19 Aug 2020 07:37:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andreas Fuchs Date: Wed, 19 Aug 2020 10:37:24 -0400 Message-ID: Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000d5594605ad3bf164" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000d5594605ad3bf164 Content-Type: text/plain; charset="UTF-8" Thanks for the notes - I've pushed an updated version that includes the (hopefully) corrected #if / #pragma usage to remain compatible on windows, broke the long line & resolved the merge conflict against the latest HEAD of feature/native-comp. I also just got word from the FSF that my copyright assignment for GNU Emacs is completed (and received the countersigned assignment papers as PDF) - if the patch looks good to you, I think legally you're ok to merge (-: Cheers, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --000000000000d5594605ad3bf164 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the notes - I've pushed an updated ver= sion that includes the (hopefully) corrected #if / #pragma usage to remain = compatible on windows, broke the long line & resolved the merge conflic= t against the latest HEAD of feature/native-comp.

= I also just got word from the FSF that my copyright assignment for GNU Emac= s is completed (and received the countersigned assignment papers as PDF) - = if the patch looks good to you, I think legally you're ok to merge (-:<= /div>

Cheers,
--
Andreas Fuchs= , (http://|im:asf@|mailto:asf@)boinkor.net, antifuc= hs
--000000000000d5594605ad3bf164-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 19 11:41:39 2020 Received: (at 42761) by debbugs.gnu.org; 19 Aug 2020 15:41:39 +0000 Received: from localhost ([127.0.0.1]:40789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8QDb-0007ho-Cg for submit@debbugs.gnu.org; Wed, 19 Aug 2020 11:41:39 -0400 Received: from mx.sdf.org ([205.166.94.24]:63714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8QDZ-0007hc-9U for 42761@debbugs.gnu.org; Wed, 19 Aug 2020 11:41:38 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 07JFfXlx008597; Wed, 19 Aug 2020 15:41:33 GMT From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Wed, 19 Aug 2020 15:41:33 +0000 In-Reply-To: (Andreas Fuchs's message of "Wed, 19 Aug 2020 10:37:24 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Fuchs writes: > Thanks for the notes - I've pushed an updated version that includes > the (hopefully) corrected #if / #pragma usage to remain compatible on > windows, broke the long line & resolved the merge conflict against > the latest HEAD of feature/native-comp. > > I also just got word from the FSF that my copyright assignment for > GNU Emacs is completed (and received the countersigned assignment > papers as PDF) - if the patch looks good to you, I think legally > you're ok to merge (-: Hi Andreas, Super thanks! I've rebased your branched, did some minor changes (broke two long lines and squashed two commits). I pushed it in scratch/native-comp-gcc-driver-options as I was thinking: 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'. Any thoughts? Andrea -- akrl@sdf.org From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 20 10:13:14 2020 Received: (at 42761) by debbugs.gnu.org; 20 Aug 2020 14:13:14 +0000 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 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 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) MIME-Version: 1.0 References: In-Reply-To: From: Andreas Fuchs Date: Thu, 20 Aug 2020 10:12:54 -0400 Message-ID: Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000098abc05ad4fb815" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 20 12:43:55 2020 Received: (at 42761) by debbugs.gnu.org; 20 Aug 2020 16:43:55 +0000 Received: from localhost ([127.0.0.1]:43794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8nfP-0006rk-Dz for submit@debbugs.gnu.org; Thu, 20 Aug 2020 12:43:55 -0400 Received: from mx.sdf.org ([205.166.94.24]:52203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8nfM-0006rY-8Y for 42761@debbugs.gnu.org; Thu, 20 Aug 2020 12:43:54 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 07KGhood013404; Thu, 20 Aug 2020 16:43:50 GMT From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Thu, 20 Aug 2020 16:43:50 +0000 In-Reply-To: (Andreas Fuchs's message of "Thu, 20 Aug 2020 10:12:54 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Fuchs writes: > 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. > =C2=A0 > 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=C2=A0even 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=C2=A0bill well, though. Mmhh I guess a third way would be to expose a function the return a list of all the available and effective features (ATM we have also `comp-libgccjit-version'). Dunno, unless somebody has some formed opinion I'm fine also with exposing for now `comp-native-driver-options-available-p'. Andrea --=20 akrl@sdf.org From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 22 00:14:53 2020 Received: (at 42761) by debbugs.gnu.org; 22 Aug 2020 04:14:53 +0000 Received: from localhost ([127.0.0.1]:48611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9Kvc-0000CM-R2 for submit@debbugs.gnu.org; Sat, 22 Aug 2020 00:14:53 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:39640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9KvX-0000Bz-Px for 42761@debbugs.gnu.org; Sat, 22 Aug 2020 00:14:51 -0400 Received: by mail-ej1-f48.google.com with SMTP id md23so4130695ejb.6 for <42761@debbugs.gnu.org>; Fri, 21 Aug 2020 21:14:47 -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=CXaqOxMpLODzgKrT0u6qq4HzU8kQ+0yNwE5tKgT9WPY=; b=LhFhHIji+nHJyTE4Yq4mwUgfXUbkkXfl/z3spV/LI79sYW/A+Eu83HQmnGbTKqx3do 8zDVYy5t0WsCPB92hHskeJYKOk1Cp43MsuwJ4W2Zkw0uf2tUbZQpjLy61eXPeUgu1mYQ hGbHMGMA2XTx2ruG47APZIIFL+4OoF/wSFg0tDdx/PkIQ1odEa1l5abK5bwKZpftUS41 MQpiaWdWnmBG5VEhzwggfPYhl+nlwOGCN6bOuh34yNffE9ymu+r8ue6vzNVKUOsnrFRk AKEgH50sB0fwcwFIL/5LeReHfyq/ZKlT+8AiTqxbwy7uLQwRsLJfCJUZvu1fLzNegKUS KIXQ== 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=CXaqOxMpLODzgKrT0u6qq4HzU8kQ+0yNwE5tKgT9WPY=; b=X05okCWrzvo6rtZHhYhyWaknfEGvWwCMJk92xeSaH1XOcproR4eL0BTQPvqAfzKnAG SpVFWBrU5CQEuscDBi+YGxqPVFzLyisw/UYpGHsGi9uzJhP7lBDLeidh8dZTaZZ4szOK 6Bj6jpVz5N2aKyVXXD5CndcXIYGJy2HdueOtymchpOMBWGj8tpC/nPptc2Mjh583izet oNxIWxRqwjYEvkgzDHLOiuvzRnnr50hqv3mEO+3T3z1hWwzTYsekGInMlXFwBSZ+9HtC ma1PjFSJDeJ+FZ3L8nsNnZGUMzLQuGsm7rDSWkzY7bTHOoTVeAbOakKx6h0bT+Ogohnq LBeg== X-Gm-Message-State: AOAM531eX/BahvdNVhkcbIIis4fTWlIywb+aeZvORsf3GXCmDG3guwC6 mhKeAZKEhQ1LitXyu4JPY6emmdeW+hjljJ9IfCg44A== X-Google-Smtp-Source: ABdhPJz/QCo7NIBJVS+jUVJzFU/Tr5CwIGmKetR9Wu7JngGh40HuUgfviu4/k/cZ94EHsPto8af0eG3FNmwnP+zsu0I= X-Received: by 2002:a17:907:a8c:: with SMTP id by12mr5673098ejc.554.1598069681748; Fri, 21 Aug 2020 21:14:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andreas Fuchs Date: Sat, 22 Aug 2020 00:14:30 -0400 Message-ID: Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000b5134f05ad6f975b" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000b5134f05ad6f975b Content-Type: text/plain; charset="UTF-8" On Thu, Aug 20, 2020 at 12:43 PM Andrea Corallo wrote: > Mmhh I guess a third way would be to expose a function the return a list > of all the available and effective features (ATM we have also > `comp-libgccjit-version'). > > Dunno, unless somebody has some formed opinion I'm fine also with > exposing for now `comp-native-driver-options-available-p'. I went ahead and pushed the change where I implement `comp-native-driver-options-available-p' to my fork's scratch/native-comp-gcc-driver-options branch at https://github.com/antifuchs/emacs/tree/scratch/native-comp-gcc-driver-options. Hope that works! Cheers, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --000000000000b5134f05ad6f975b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Aug 20, 2020 at 12:43 PM Andrea C= orallo <akrl@sdf.org> wrote:
Mmhh I guess a third way would be to expose a function the return a list of all the available and effective features (ATM we have also
`comp-libgccjit-version').

Dunno, unless somebody has some formed opinion I'm fine also with
exposing for now `comp-native-driver-options-available-p'.
=

I went ahead and pushed the change where I implement=C2= =A0`comp-native-driver-options-available-p' to my fork's scratch/na= tive-comp-gcc-driver-options branch at=C2=A0https://github.= com/antifuchs/emacs/tree/scratch/native-comp-gcc-driver-options. Hope t= hat works!

Cheers,
--
Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs
--000000000000b5134f05ad6f975b-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 24 04:49:50 2020 Received: (at 42761) by debbugs.gnu.org; 24 Aug 2020 08:49:50 +0000 Received: from localhost ([127.0.0.1]:56006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kA8Ao-00029t-Gh for submit@debbugs.gnu.org; Mon, 24 Aug 2020 04:49:50 -0400 Received: from mx.sdf.org ([205.166.94.24]:56778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kA8Ak-00029g-Cz for 42761@debbugs.gnu.org; Mon, 24 Aug 2020 04:49:49 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 07O8ni36004217; Mon, 24 Aug 2020 08:49:44 GMT From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Mon, 24 Aug 2020 08:49:43 +0000 In-Reply-To: (Andreas Fuchs's message of "Sat, 22 Aug 2020 00:14:30 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Fuchs writes: > On Thu, Aug 20, 2020 at 12:43 PM Andrea Corallo wrote: > > Mmhh I guess a third way would be to expose a function the return > a list > of all the available and effective features (ATM we have also > `comp-libgccjit-version'). >=20=20=20=20 > Dunno, unless somebody has some formed opinion I'm fine also with > exposing for now `comp-native-driver-options-available-p'. > > > I went ahead and pushed the change where I implement=C2=A0 > `comp-native-driver-options-available-p' to my fork's scratch/ > native-comp-gcc-driver-options branch at=C2=A0https://github.com/antifuchs > /emacs/tree/scratch/native-comp-gcc-driver-options. Hope that works! Hi Andreas, I pulled your branch, changed few stuffs on top and pushed to scratch/native-comp-gcc-driver-options. Please have a look to see you are satisfied and works for you so we can merge it. Thanks Andrea --=20 akrl@sdf.org From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 15:07:40 2020 Received: (at 42761) by debbugs.gnu.org; 26 Aug 2020 19:07:40 +0000 Received: from localhost ([127.0.0.1]:40852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kB0ln-0002wa-W2 for submit@debbugs.gnu.org; Wed, 26 Aug 2020 15:07:40 -0400 Received: from mail-ed1-f41.google.com ([209.85.208.41]:47084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kB0li-0002wI-Nd for 42761@debbugs.gnu.org; Wed, 26 Aug 2020 15:07:38 -0400 Received: by mail-ed1-f41.google.com with SMTP id k25so2690586edj.13 for <42761@debbugs.gnu.org>; Wed, 26 Aug 2020 12:07:34 -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=LW775e87HNIx5YiMWFduGtcXEeiGCJpIK0mDCTOqJrE=; b=g5U4OXDTBQwM+eRJnW/gblJ+BmZIJlE9npKTTgFoXunZMVP65yFfPO/MRam7wVBWc5 t5+/zr9Ic06HzEBGlVH9h419bQGVj3FtDcPaWFHndlfh4QyvSGkq41txAdK4fMoaurTP vvrNWPCm9bh7E0ymZMCA4woVPUzjDqGtbmm8gGt7p47R5QrQx5YL5WcykfltRvcztrOt IC4RdKSgthrcFrC4W7yPmMf48dMMEKrhgGkptnDtzU5MlSjjhQOU3wrMj+CRnrCRVZBt S4yxoAUbtJNYcMxVtQbnHBbqZO8BMk9PO7iJVgXehb3Swsnnpg7OqqHPi4otaR3Pf5Vj 9png== 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=LW775e87HNIx5YiMWFduGtcXEeiGCJpIK0mDCTOqJrE=; b=rnVZFBTcGJggXZTShA65pJ2tXWpXwdanMZu05inwLgBgWtoEmJN5esD1qGZJ9YJvmC b5ed1zxHWbvv7hygLysTo6fKRVNl1W8xe+ls5Ljgzu0qL7A53CaHxj53IGH/dS2nsKwP rURWL/GjW2F2gkDLskeDmPQ+Z0G3ZWLUyLodbekK6QGTLJat2PMrTSqIyYps3gMc8INq 8aK/2Va/iP1ZBVGs8/cKJa4k+rcsBBkB8Y2hfRtMTQJ6W8X20NRulJ5NLDCcOqBMqIUo 9946zegsjip3a8Bi25/cnPLIliPXH0dy3UO33emR5LY1/ff4SMQVqGj0kDFNhsNw0Yak SjGw== X-Gm-Message-State: AOAM532wd92P86AU/dpgeuKHKfD2VGWQKaLxB2Aq8z+XZfBLE3HhTswr 9TAGCam10v6SbMVVeT4w7kut5CT2+aP9rLu7Sg8/nA== X-Google-Smtp-Source: ABdhPJzpLFQatHW+PE/7syVqaTNzHc6nwa3eqbYcWgDnrx6II9COBxU2TNtrgsRc6Wy73xvkbf7eCBnmRmZucOBAhmo= X-Received: by 2002:a50:bf01:: with SMTP id f1mr16749730edk.369.1598468848717; Wed, 26 Aug 2020 12:07:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andreas Fuchs Date: Wed, 26 Aug 2020 15:07:17 -0400 Message-ID: Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? To: Andrea Corallo Content-Type: multipart/alternative; boundary="000000000000e9a9ad05adcc874c" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42761 Cc: 42761@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000e9a9ad05adcc874c Content-Type: text/plain; charset="UTF-8" On Mon, Aug 24, 2020 at 4:49 AM Andrea Corallo wrote: > Hi Andreas, > > I pulled your branch, changed few stuffs on top and pushed to > scratch/native-comp-gcc-driver-options. > > Please have a look to see you are satisfied and works for you so we can > merge it. > I tested it out & it does work when compiled outside of nix - I see a weird failure about internal functions not being defined when I install it as part of nix, but I've convinced myself that this is related to the eln cache directory change that went in since I started this work & that still requires handling on the nix side, nothing to do with my patch on the emacs side (: I think you can merge this! Thanks so much! -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs --000000000000e9a9ad05adcc874c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 24, 2020 at 4:49 AM Andrea Corall= o <akrl@sdf.org> wrote:
Hi Andreas,

I pulled your branch, changed few stuffs on top and pushed to
scratch/native-comp-gcc-driver-options.

Please have a look to see you are satisfied and works for you so we can
merge it.

I tested it out & it does= work when compiled outside of nix - I see a weird failure about internal f= unctions not being defined when I install it as part of nix, but I've c= onvinced myself that this is related to the eln cache directory change that= went in since I started this work & that still requires handling on th= e nix side, nothing to do with my patch on the emacs side (:

=
I think you can merge this! Thanks so much!=C2=A0
-- =
Andreas Fuchs, (http://|im:a= sf@|mailto:asf@)boinkor.net, antifuchs
--000000000000e9a9ad05adcc874c-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 15:56:21 2020 Received: (at 42761-done) by debbugs.gnu.org; 26 Aug 2020 19:56:21 +0000 Received: from localhost ([127.0.0.1]:40891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kB1Wu-000471-P2 for submit@debbugs.gnu.org; Wed, 26 Aug 2020 15:56:20 -0400 Received: from mx.sdf.org ([205.166.94.24]:64547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kB1Wr-00046p-R2 for 42761-done@debbugs.gnu.org; Wed, 26 Aug 2020 15:56:19 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 07QJuDBL004866; Wed, 26 Aug 2020 19:56:13 GMT From: Andrea Corallo To: Andreas Fuchs Subject: Re: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options? References: Date: Wed, 26 Aug 2020 19:56:13 +0000 In-Reply-To: (Andreas Fuchs's message of "Wed, 26 Aug 2020 15:07:17 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42761-done Cc: 42761-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Fuchs writes: > I tested it out & it does work when compiled outside of nix - I see a > weird failure about internal functions not being defined when I > install it as part of nix, but I've convinced myself that this is > related to the eln cache directory change that went in since I > started this work & that still requires handling on the nix side, > nothing to do with my patch on the emacs side (: > > I think you can merge this! Thanks so much!=C2=A0 Merged as aa526c9470, thank you! We can always improve it later on if we feel. Ciao Andrea PS closing this --=20 akrl@sdf.org From unknown Mon Jun 16 23:54:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 24 Sep 2020 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator