-
-
Save abstraction/dc4988a75a4193336c1baba35407c8d1 to your computer and use it in GitHub Desktop.
Revisions
-
abidanBrito revised this gist
May 10, 2024 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ## tree-sitter, libjansson (C JSON library), pure GTK and mailutils. # Exit on error and print out commands before executing them. set -euxo pipefail # Let's set the number of jobs to something reasonable; keep 2 cores # free to avoid choking the computer during compilation. @@ -28,14 +28,14 @@ sudo apt install -y build-essential \ libgtk-3-dev \ libtree-sitter-dev \ libmagick++-dev \ #libwebkit2gtk-4.1-dev \ # Get dependencies for gcc-10 and the build process. sudo apt update -y sudo apt install -y gcc-11 \ g++-11 \ libgccjit0 \ libgccjit-11-dev \ autoconf \ # Get dependencies for fast JSON. @@ -44,7 +44,7 @@ sudo apt install -y libjansson4 libjansson-dev # Get GNU Mailutils (protocol-independent mail framework). sudo apt install -y mailutils # Enable source packages and get dependencies for whatever # Emacs version Ubuntu supports by default. # # Taken from here: @@ -57,7 +57,7 @@ sudo apt install -y mailutils DEBIAN_FRONTEND=noninteractive # Needed for compiling libgccjit or we'll get cryptic error messages. export CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11 # Configure and run. # NOTE(abi): binaries should go to /usr/local/bin by default. @@ -82,6 +82,8 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 --with-tree-sitter \ --with-wide-int \ --with-json \ --with-modules \ --without-dbus \ --with-gnutls \ --with-mailutils \ --without-pop \ @@ -93,9 +95,7 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 #--prefix="" # output binaries location #--with-x-toolkit=lucid # supposedly more stable #--with-xwidgets # Compiler flags: # -O2 -> Turn on a bunch of optimization flags. There's also -O3, but it increases # the instruction cache footprint, which may end up reducing performance. @@ -111,7 +111,7 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # NOTE(abi): NATIVE_FULL_AOT=1 ensures native compilation ahead-of-time for all # elisp files included in the distribution. make -j${JOBS} NATIVE_FULL_AOT=1 \ && make install # Return to the original path. popd -
Abidán Brito revised this gist
Jan 7, 2024 . No changes.There are no files selected for viewing
-
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/usr/bin/env bash ## Author: Abidán Brito ## This script builds GNU Emacs 29.1 with support for native elisp compilation, ## tree-sitter, libjansson (C JSON library), pure GTK and mailutils. # Exit on error and print out commands before executing them. -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ## Author: Abidán Brito ## This script builds GNU Emacs 29 with support for native elisp compilation, ## tree-sitter, libjansson (C JSON library), pure GTK and mailutils. # Exit on error and print out commands before executing them. set -euxo pipefail -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -97,12 +97,12 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 #--without-dbus # Compiler flags: # -O2 -> Turn on a bunch of optimization flags. There's also -O3, but it increases # the instruction cache footprint, which may end up reducing performance. # -pipe -> Reduce temporary files to the minimum. # -mtune=native -> Optimize code for the local machine (under ISA constraints). # -march=native -> Enable all instruction subsets supported by the local machine. # -fomit-frame-pointer -> Small functions don't need a frame pointer (optimization). # # https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/ CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 36 additions and 25 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,33 +60,34 @@ DEBIAN_FRONTEND=noninteractive export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # Configure and run. # NOTE(abi): binaries should go to /usr/local/bin by default. # # Options: # --with-native-compilation -> use the libgccjit native compiler # --with-pgtk -> better font rendering # --with-x-toolkit=gtk3 -> widgets toolkit # --with-tree-sitter -> syntax parsing # --with-wide-int -> larger file size limit # --with-json -> fast JSON # --with-gnutls -> TLS/SSL # --with-mailutils -> e-mail # --without-pop -> no pop3 (insecure channels) # --with-cairo -> vector graphics backend # --with-imagemagick -> raster images backend ./autogen.sh \ && ./configure \ --with-native-compilation \ --with-pgtk \ --with-x-toolkit=gtk3 \ --with-tree-sitter \ --with-wide-int \ --with-json \ --with-gnutls \ --with-mailutils \ --without-pop \ --with-cairo \ --with-imagemagick \ # Other interesting compilation options: # #--prefix="" # output binaries location @@ -95,8 +96,18 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 #--with-modules #--without-dbus # Compiler flags: # -O2 -> Turn on a bunch of optimization flags. There's also -O3, but it increases # the instruction cache footprint, which may end up reducing performance. # -pipe -> Reduce temporary files to the minimum. # -mtune=native -> Optimize code for the local machine (under ISA constraints). # -march=native-> Enable all instruction subsets supported by the local machine. # -fomit-frame-pointer -> Small functions don't need a frame pointer (optimization). # # https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/ CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Build. # NOTE(abi): NATIVE_FULL_AOT=1 ensures native compilation ahead-of-time for all # elisp files included in the distribution. make -j${JOBS} NATIVE_FULL_AOT=1 \ -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,17 +73,17 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # NOTE(abi): binaries should go to /usr/local/bin by default. ./autogen.sh \ && ./configure \ --with-native-compilation # use the libgccjit native compiler \ --with-pgtk # better font rendering \ --with-x-toolkit=gtk3 # widgets toolkit \ --with-tree-sitter # syntax parsing \ --with-wide-int # larger file size limit \ --with-json # fast JSON \ --with-gnutls # TLS/SSL \ --with-mailutils # e-mail \ --without-pop # no pop3 (insecure channels) \ --with-cairo # vector graphics backend \ --with-imagemagick # raster images backend \ CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,8 +89,8 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # Other interesting compilation options: # #--prefix="" # output binaries location #--with-x-toolkit=lucid # supposedly more stable #--with-xwidgets #--with-modules #--without-dbus -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,6 @@ sudo apt install -y build-essential \ libgif-dev \ libxpm-dev \ libncurses-dev \ libgtk-3-dev \ libtree-sitter-dev \ libmagick++-dev \ -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -74,23 +74,23 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # NOTE(abi): binaries should go to /usr/local/bin by default. ./autogen.sh \ && ./configure \ --with-native-compilation \ # use the libgccjit native compiler --with-pgtk \ # better font rendering --with-x-toolkit=gtk3 \ # widgets toolkit --with-tree-sitter \ # syntax parsing --with-wide-int \ # larger file size limit --with-json \ # fast JSON --with-gnutls \ # TLS/SSL --with-mailutils \ # e-mail --without-pop \ # no pop3 (insecure channels) --with-cairo \ # vector graphics backend --with-imagemagick \ # raster images backend CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Other interesting compilation options: # #--prefix="" # output binaries location #--with-x-toolkit=lucid # supposedly more stable #--with-xwidgets #--with-modules -
Abidán Brito revised this gist
Jan 6, 2024 . 1 changed file with 3 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -68,7 +68,8 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # -pipe -> Reduce temporary files to the minimum. # -mtune=native -> Optimize code for the local machine (under ISA constraints). # -march=native -> Enable all instruction subsets supported by the local machine. # -fomit-frame-pointer -> Small functions don't need a frame pointer (optimization). # https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/ # # NOTE(abi): binaries should go to /usr/local/bin by default. ./autogen.sh \ @@ -86,11 +87,7 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 --with-x-toolkit=gtk3 \ --with-imagemagick \ CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Other interesting compilation options: # -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ set -euxo pipefail JOBS=`nproc --ignore=2` # Clone repo locally and get into it. git clone --depth 1 --branch emacs-29 git://git.savannah.gnu.org/emacs.git pushd emacs # Get essential dependencies. @@ -25,6 +25,7 @@ sudo apt install -y build-essential \ libgif-dev \ libxpm-dev \ libncurses-dev \ #libncurses5-dev \ libgtk-3-dev \ libtree-sitter-dev \ libmagick++-dev \ -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,7 @@ sudo apt install -y build-essential \ libxpm-dev \ libncurses-dev \ libgtk-3-dev \ libtree-sitter-dev \ libmagick++-dev \ #libwebkit2gtk-4.0-dev \ -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,8 +16,7 @@ git clone --branch emacs-29 git://git.savannah.gnu.org/emacs.git pushd emacs # Get essential dependencies. sudo apt install -y build-essential \ texinfo \ libgnutls28-dev \ libjpeg-dev \ @@ -32,8 +31,7 @@ sudo apt install -y # Get dependencies for gcc-10 and the build process. sudo apt update -y sudo apt install -y gcc-10 \ g++-10 \ libgccjit0 \ libgccjit-10-dev \ -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,7 +37,7 @@ sudo apt install -y g++-10 \ libgccjit0 \ libgccjit-10-dev \ autoconf \ # Get dependencies for fast JSON. sudo apt install -y libjansson4 libjansson-dev -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,8 @@ git clone --branch emacs-29 git://git.savannah.gnu.org/emacs.git pushd emacs # Get essential dependencies. sudo apt install -y build-essential \ texinfo \ libgnutls28-dev \ libjpeg-dev \ @@ -31,7 +32,8 @@ sudo apt install -y build-essential \ # Get dependencies for gcc-10 and the build process. sudo apt update -y sudo apt install -y gcc-10 \ g++-10 \ libgccjit0 \ libgccjit-10-dev \ -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 20 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,9 +25,9 @@ sudo apt install -y build-essential \ libgif-dev \ libxpm-dev \ libncurses-dev \ libgtk-3-dev \ libmagick++-dev \ #libwebkit2gtk-4.0-dev \ # Get dependencies for gcc-10 and the build process. sudo apt update -y @@ -70,21 +70,32 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # # NOTE(abi): binaries should go to /usr/local/bin by default. ./autogen.sh \ && ./configure \ --prefix="$HOME/.local/opt/emacs/" \ --with-native-compilation \ # use the libgccjit native compiler --with-json \ --with-gnutls \ --with-mailutils \ --with-tree-sitter \ --with-wide-int \ # larger file size limit --without-pop \ # no pop3 email via insecure channels --with-cairo \ --with-pgtk \ # better font rendering --with-x-toolkit=gtk3 \ --with-imagemagick \ # -pipe -> reduces the number of temporary files # -mtune -> redundant if -march is set to the same # -fomit-frame-pointer -> optimization, small functions don't need a frame pointer # https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/ CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" # Other interesting compilation options: # #--with-x-toolkit=lucid # supposedly more stable #--with-xwidgets #--with-modules #--without-dbus # Build. # -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,8 @@ sudo apt update -y sudo apt install -y gcc-10 \ g++-10 \ libgccjit0 \ libgccjit-10-dev \ autoconf # Get dependencies for fast JSON. sudo apt install -y libjansson4 libjansson-dev -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ sudo apt install -y build-essential \ libxpm-dev \ libncurses-dev \ libgtk-3-dev #libwebkit2gtk-4.0-dev #libmagick++-dev # Get dependencies for gcc-10 and the build process. -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ sudo apt install -y build-essential \ libxpm-dev \ libncurses-dev \ libgtk-3-dev libwebkit2gtk-4.0-dev #libmagick++-dev # Get dependencies for gcc-10 and the build process. -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ sudo apt install -y build-essential \ libgif-dev \ libxpm-dev \ libncurses-dev \ libgtk-3-dev #libwebkit2gtk-4.0-dev #libmagick++-dev -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ sudo apt install -y build-essential \ libgif-dev \ libxpm-dev \ libncurses-dev \ #libgtk-3-dev #libwebkit2gtk-4.0-dev #libmagick++-dev -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -74,18 +74,16 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 --with-gnutls \ --with-mailutils \ --with-cairo \ --with-pgtk \ --with-x-toolkit=lucid CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Other interesting compilation options: # #--with-x-toolkit=gtk3 # less stable than lucid #--with-xwidgets #--with-imagemagick # Build. # -
Abidán Brito revised this gist
Jan 5, 2024 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -75,6 +75,7 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 --with-mailutils \ --with-cairo \ --with-pgtk CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Other interesting compilation options: @@ -83,7 +84,9 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 #--with-x-toolkit=gtk3 #--with-xwidgets #--with-imagemagick # https://ubuntuhandbook.org/index.php/2021/12/compile-gnu-emacs-source-ubuntu/ #--with-x-toolkit=lucid # Build. # # NOTE(abi): NATIVE_FULL_AOT=1 ensures native compilation ahead-of-time for all -
Abidán Brito revised this gist
Sep 25, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ## Author: Abidán Brito ## This script builds GNU Emacs 29 with support for native elisp compilation, ## libjansson (C JSON library), pure GTK and mailutils. # Exit on error and print out commands before executing them. set -euxo pipefail -
Abidán Brito revised this gist
Sep 25, 2023 . No changes.There are no files selected for viewing
-
Abidán Brito renamed this gist
Sep 25, 2023 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/usr/bin/env bash ## Author: Abidán Brito ## This script builds GNU Emacs 29 with support for native elisp compilation, ## libjansson (C JSON library) and mailutils. # Exit on error and print out commands before executing them. @@ -12,7 +12,7 @@ set -euxo pipefail JOBS=`nproc --ignore=2` # Clone repo locally and get into it. git clone --branch emacs-29 git://git.savannah.gnu.org/emacs.git pushd emacs # Get essential dependencies. @@ -73,7 +73,8 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 --with-json \ --with-gnutls \ --with-mailutils \ --with-cairo \ --with-pgtk CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Other interesting compilation options: -
abidanBrito revised this gist
Feb 5, 2022 . 1 changed file with 23 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ## Author: Abidán Brito ## This script builds GNU Emacs 28 with support for native elisp compilation, ## libjansson (C JSON library) and mailutils. # Exit on error and print out commands before executing them. set -euxo pipefail @@ -25,21 +25,23 @@ sudo apt install -y build-essential \ libgif-dev \ libxpm-dev \ libncurses-dev \ libgtk-3-dev #libwebkit2gtk-4.0-dev #libmagick++-dev # Get dependencies for gcc-10 and the build process. sudo apt update -y sudo apt install -y gcc-10 \ g++-10 \ libgccjit0 \ libgccjit-10-dev # Get dependencies for fast JSON. sudo apt install -y libjansson4 libjansson-dev # Get GNU Mailutils (protocol-independent mail framework). sudo apt install -y mailutils # Enable source packages and get dependencies for whatever # Emacs version Ubuntu supports by default. # @@ -65,26 +67,28 @@ export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # -march=native -> Enable all instruction subsets supported by the local machine. # -fomit-frame-pointer -> I'm not sure what this does yet... # # NOTE(abi): binaries should go to /usr/local/bin by default. ./autogen.sh \ && ./configure --with-native-compilation \ --with-json \ --with-gnutls \ --with-mailutils \ --with-cairo CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Other interesting compilation options: # #--with-pgtk (Emacs 29) #--with-x-toolkit=gtk3 #--with-xwidgets #--with-imagemagick # Build. # # NOTE(abi): NATIVE_FULL_AOT=1 ensures native compilation ahead-of-time for all # elisp files included in the distribution. make -j${JOBS} NATIVE_FULL_AOT=1 \ && sudo make install # Return to the original path. popd -
abidanBrito created this gist
Feb 5, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,90 @@ #!/usr/bin/env bash ## Author: Abidán Brito ## This script builds GNU Emacs 28 with support for native elisp compilation, ## libjansson (C JSON library), mailutils, and Webkit widgets (xwidgets). # Exit on error and print out commands before executing them. set -euxo pipefail # Let's set the number of jobs to something reasonable; keep 2 cores # free to avoid choking the computer during compilation. JOBS=`nproc --ignore=2` # Clone repo locally and get into it. git clone --branch emacs-28 git://git.savannah.gnu.org/emacs.git pushd emacs # Get essential dependencies. sudo apt install -y build-essential \ texinfo \ libgnutls28-dev \ libjpeg-dev \ libpng-dev \ libtiff5-dev \ libgif-dev \ libxpm-dev \ libncurses-dev \ libmagick++-dev # Get dependencies for gcc-10 and the build process. sudo apt update -y \ && apt install -y gcc-10 g++-10 libgccjit0 libgccjit-10-dev # Get dependencies for fast JSON. sudo apt install -y libjansson4 libjansson-dev # Get GNU Mailutils (protocol-independent mail framework). sudo apt install -y mailutils # Get Xwidgets dependencies. sudo apt install -y libgtk-3-dev # Enable source packages and get dependencies for whatever # Emacs version Ubuntu supports by default. # # Taken from here: # https://www.masteringemacs.org/article/speed-up-emacs-libjansson-native-elisp-compilation #sudo sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list \ # && apt update \ # && apt build-dep -y emacs # Stop debconf from complaining about postfix nonsense. DEBIAN_FRONTEND=noninteractive # Needed for compiling libgccjit or we'll get cryptic error messages. export CC=/usr/bin/gcc-10 CXX=/usr/bin/g++-10 # Configure and run. # # Compiler flags: # -O2 -> Turn on a bunch of optimization flags. There's also -O3, but it increases # the instruction cache footprint, which may end up reducing performance. # -pipe -> Reduce temporary files to the minimum. # -mtune=native -> Optimize code for the local machine (under ISA constraints). # -march=native -> Enable all instruction subsets supported by the local machine. # -fomit-frame-pointer -> I'm not sure what this does yet... # # NOTE(abi): binaries should go to /opt/emacs. If you remove the --prefix argument # they should go to /usr/local/bin by default. ./autogen.sh \ && ./configure --with-native-compilation \ --with-json \ --with-gnutls \ --with-mailutils \ --with-cairo \ --with-imagemagick \ --with-x-toolkit=gtk3 \ --with-xwidgets \ --prefix=/opt/emacs \ CFLAGS="-O2 -pipe -mtune=native -march=native -fomit-frame-pointer" # Build. # # NOTE(abi): NATIVE_FULL_AOT=1 ensures native compilation ahead-of-time for # all elisp files included in the distribution. make -j${JOBS} NATIVE_FULL_AOT=1 sudo make install # Return to the original path. popd