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: Fri, 7 Aug 2020 22:51:47 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000108eb605ac54ce19" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35885"; mail-complaints-to="usenet@ciao.gmane.io" To: 42761@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 08 16:51:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4QBj-0009Bw-CU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 16:51:11 +0200 Original-Received: from localhost ([::1]:54328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4QBi-0007SH-ET for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 10:51:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4QBa-0007OC-7J for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 10:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4QBZ-0003Gx-So for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 10:51:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4QBZ-00020i-Ru for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 10:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Fuchs Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Aug 2020 14:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42761 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15968982517700 (code B ref -1); Sat, 08 Aug 2020 14:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Aug 2020 14:50:51 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) 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-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 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:184358 Archived-At: --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--