From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70246: 30.0.50; Update INSTALL for native compilation Date: Sat, 06 Apr 2024 22:53:31 +0200 Message-ID: <87plv29pro.fsf@gmx.net> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32001"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 70246@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 06 22:54:27 2024 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 1rtD3T-00089T-FG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Apr 2024 22:54:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtD30-0004kO-U5; Sat, 06 Apr 2024 16:53:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtD2y-0004jt-Gh for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:53:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtD2y-0006sV-8d for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:53:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtD34-0006vU-4r for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Apr 2024 20:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70246 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.171243683326606 (code B ref -1); Sat, 06 Apr 2024 20:54:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Apr 2024 20:53:53 +0000 Original-Received: from localhost ([127.0.0.1]:41068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtD2u-0006v4-Hb for submit@debbugs.gnu.org; Sat, 06 Apr 2024 16:53:53 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:42490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtD2p-0006um-Vs for submit@debbugs.gnu.org; Sat, 06 Apr 2024 16:53:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtD2e-0004hL-2J for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:53:36 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtD2b-0006ne-RQ for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:53:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1712436811; x=1713041611; i=stephen.berman@gmx.net; bh=lpga54yniCrZwh+w0p/RChI/sqYpWyDADigvggz+oBY=; h=X-UI-Sender-Class:From:To:Subject:Date; b=PxHxsRJsg/w85HZuCJmoaApD/7gR0g2h5X7P16Tv7vI0/InZqgBHdYXrLd2Ku09E VITP3m0vxYgIfX4s2irrqBhiZRmFxvTnTkCzgQl8SX4Wgy3AUtsyUxfaBQL5qmjC2 F99Nrg3xBmLaVTj/xUnN7L+qFcARPQbv30M//yHTPX8/M7GOcw4pVOtNAVHdLUksG trr4fITgo+wwVkfmC73seAdeentu1XYP4JReCI6vonmdPI7BMMoEGdb0KoW0HfQQC N2owIPbKez6dWRN/XPZzK8j8EXvbhSd3P5eY2yG0Lx41DcqeoVOTTFikS1voDcG2/ QZFEJDmzsS+LkA0YXA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.94.0]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Msq24-1sm96h2XDk-00tAPx for ; Sat, 06 Apr 2024 22:53:31 +0200 X-Provags-ID: V03:K1:N1YPv0vzdfxFGRQw9zcRTgxrPX6nVteroVPiKfCAs9DAveNLc07 fIx3JTtazDgknzlq610km1DF0J/XcJol/8t/l9tFPtW6bTzmPSMNA/xxdGGB29S205nU0mV npuh0+6wpQBHrlHqf8csc9uQFmFWCrEi6wxw8GSlNpkewMrRi9r88QZFfOwzC5Y3ClDiLsi 6eVU24a7+lNq8ph0hsTbA== UI-OutboundReport: notjunk:1;M01:P0:bFC4pxUIkx0=;KgHveBJhm7vMLUBYkcdS6Jf057V SqZt/glt1UPRedelEWKFgEnX/fp3/L146agEQlsZNZ5MLiXFRtC5im01QQQfodfoytqovbeD5 j/E3MNRGTBFbD65jFbirv1X6L4IYUaOqwPP6bRuKGMHHYfj3famrJsXMrZYsVTY6Jgv33mOdy anUUGO6harWVNPQcs+9ZgooljcsKGdL5suSrqszfUtMlZoQUP3FpDapnVmZb4zcxWTIWPyz+8 itebAOxUPgtHQ39mYPEwB1IxD8+mal1MOf57Pq/aw1TkdyNlsFs+8Y8xWlPi7kqL8fzZZnE7h yqVOlr5eRUniTDrCZlmht+wa13GTH91sUTEcrFQP31itEDOby5AHpmh4BsUWZQqNbgxLa8Wo+ pPlPCrZKBU4PTtbl9nd/DcK8gabVDDOs/BGJ6DnnN9XEjbDGANvFytRGtAc+DbAmH3yVBBlOn Qd+Sqi47tWOBE7Wm/VSHto9u0UKDGqLbOVJkzUE2TYjw7RdjuVgIZ9PbnGcu8/gSJ/OcOv74w PPB1Yd9wl5COTq7HcWU9R6NnO6Dj4E7zeggRPQytEabQmYAmMhXDfCRiiKIRvOSGu7jPX3c/8 ns1TU75WyMhM2mHIPhCPJ2H8Q6WxXux/W0j5qsr/VQX+um8TsWc35Ik9Jdx4r+3H3DLVsFRy3 EyZ+4CzpxOGcCKY0jOj/Nh/yrE1NllTQDntz6NvPSNbJBAd2XE8R8AsM65NqsAwuKauT1z2J8 FfTUtSICHiuE3pLgxZVVdjywXypx4NsjMV4zxhcw0VPLwbg7p6fr+0u+ZTntm1Ge5DyrBLtU Received-SPF: pass client-ip=212.227.17.22; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282825 Archived-At: --=-=-= Content-Type: text/plain The INSTALL file in the Emacs sources makes no reference to native compilation. The attached patch is an attempt to fill this gap (but I'm not sure about the default locations of installed natively compiled Lisp files, since I do not install Emacs when I build and do not have a distribution installation of Emacs built with native compilation to check). In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-03-31 built on strobelfs Repository revision: 09f381d70d8852d90cdd3c8d7e1e2786dbc61f92 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101011 System Description: Linux From Scratch r12.1-30 Configured using: 'configure 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: INSTALL patch Content-Transfer-Encoding: quoted-printable diff --git a/INSTALL b/INSTALL index 2aaa02f37d7..0682320924a 100644 =2D-- a/INSTALL +++ b/INSTALL @@ -264,6 +264,26 @@ to force GTK+ to run under Broadway, start Emacs like= this: The GNUstep build also supports the Wayland window system. If that is what you want, see nextstep/INSTALL. +* Native compilation of Lisp files + +In addition to byte-compiling files of Lisp code, Emacs can also produce +"native code", which usually runs several times faster than the +corresponding byte-compiled code. To build Emacs with this feature, +your system must have not only have GCC (the C compiler) and Binutils +(the assembler and linker) but also the 'libgccjit' shared library, +which is part of the GCC distribution. If these components are +available, building Emacs will automatically produce natively-compiled +Lisp code. + +By default, Emacs natively compiles only pre-loaded Lisp files during +the build process; other Lisp files are natively compiled +"just-in-time", i.e, when they are loaded in the running Emacs. If you +want Emacs to natively compile all Lisp files during the build ("ahead +of time"), use the 'configure' option '--with-native-compilation=3Daot'. +If you do not want natively compiled Lisp code even if your system +satisfies the build requirements, use the 'configure' option +'--with-native-compilation=3Dno'. + DETAILED BUILDING AND INSTALLATION: (This is for a Unix or Unix-like system. For GNUstep and macOS, @@ -552,13 +572,25 @@ need to create them if you have nothing to put in th= em. 5) Refer to the file './etc/TERMS' for information on fields you may wish to add to various termcap entries. (This is unlikely to be necessar= y.) -6) Run 'make' in the top directory of the Emacs distribution to finish -building Emacs in the standard way. The final executable file is -named 'src/emacs'. You can execute this file "in place" without -copying it, if you wish; then it automatically uses the sibling -directories ../lisp, ../lib-src, ../info. - -Or you can "install" the executable and the other files into their +6) After building Emacs, you can invoke the Emacs executable "in place", +i.e., from the directory where it was built, or you can first install it +and then invoke the installed executable. + +6a) Run 'make' in the top directory of the Emacs distribution to finish +building Emacs in the standard way. The final executable file is named +'src/emacs'. You can execute this file "in place" without copying it, +if you wish; then it automatically uses the sibling directories ../lisp, +../lib-src, ../info, ../native-lisp (if built with support for native +compilation). + +6b) If you built Emacs in a directory outside of the source directory +("out-of-tree"), it still uses the ../lisp and ../info directories in +the source directory (because byte-compiled Lisp files and Info files +are machine-independent), but the ../lib-src and ../native-lisp files in +the build directory (because these compiled files are +machine-dependent). + +6c) Or you can "install" the executable and the other files into their installed locations, with 'make install'. By default, Emacs's files are installed in the following directories: @@ -574,6 +606,11 @@ are installed in the following directories: at the same time; in particular, you don't have to make Emacs unavailable while installing a new version. +'/usr/local/share/emacs/VERSION/native-lisp' holds the natively compiled + pre-loaded Emacs Lisp files. + +'~/.emacs.d/eln-cache/' holds the remaining natively compiled Lisp files. + '/usr/local/share/emacs/VERSION/etc' holds the Emacs tutorial, the DOC file, and other architecture-independent files Emacs might need while running. --=-=-=--