Skip to content

Commit

Permalink
Use gcc-14 since this is the default in core24
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Murray <murray.alex@gmail.com>
  • Loading branch information
alexmurray committed Oct 30, 2024
1 parent 2c7ffe7 commit d836623
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ parts:
- debhelper
- dpkg-dev
- gawk
- gcc-13
- g++-13
- gcc-14
- g++-14
- libacl1-dev
- libasound2-dev
- libdbus-1-dev
- libgccjit-13-dev
- libgccjit-14-dev
- libgif-dev
- libgnutls28-dev
- libgpm-dev
Expand Down Expand Up @@ -105,8 +105,8 @@ parts:
- zlib1g-dev
stage-packages:
- gsettings-desktop-schemas
- gcc-13 # for tree-sitter
- g++-13 # for tree-sitter
- gcc-14 # for tree-sitter
- g++-14 # for tree-sitter
- gvfs
- gvfs-libs
- ibus-gtk3
Expand Down Expand Up @@ -143,7 +143,7 @@ parts:
- libfreetype6
- libgbm1
- libgccjit0
- libgccjit-13-dev
- libgccjit-14-dev
- libgcc-s1
- libgcrypt20
- libgd3
Expand Down Expand Up @@ -270,14 +270,14 @@ parts:
stage:
- -usr/share/emacs/site-lisp
build-environment:
- CC: "gcc-13"
- CXX: "g++-13"
- CC: "gcc-14"
- CXX: "g++-14"
- CFLAGS: "${CFLAGS:+$CFLAGS} -O2"
- NATIVE_FULL_AOT: "1"
- LD_LIBRARY_PATH: "$SNAPCRAFT_STAGE/usr/lib"
override-pull: |
craftctl default
# ensure we hard-code our copy of gcc-13 and g++13 for tree-sitter
# ensure we hard-code our copy of gcc-14 and g++14 for tree-sitter
# otherwise it will use the system installed ones which will have a
# different libc version and we will fail to load them
patch -p1 < $SNAPCRAFT_PROJECT_DIR/treesit.patch
Expand Down
4 changes: 2 additions & 2 deletions treesit.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ index d7502560fea..dbdbdb193c0 100644
(workdir (expand-file-name "repo"))
(source-dir (expand-file-name (or source-dir "src") workdir))
- (cc (or cc (seq-find #'executable-find '("cc" "gcc" "c99"))
+ (cc (or cc (concat (file-name-as-directory (getenv "EMACS_SNAP_DIR")) "usr/bin/gcc-13")
+ (cc (or cc (concat (file-name-as-directory (getenv "EMACS_SNAP_DIR")) "usr/bin/gcc-14")
;; If no C compiler found, just use cc and let
;; `call-process' signal the error.
"cc"))
- (c++ (or c++ (seq-find #'executable-find '("c++" "g++"))
+ (c++ (or c++ (concat (file-name-as-directory (getenv "EMACS_SNAP_DIR")) "usr/bin/g++-13")
+ (c++ (or c++ (concat (file-name-as-directory (getenv "EMACS_SNAP_DIR")) "usr/bin/g++-14")
"c++"))
(soext (or (car dynamic-library-suffixes)
(signal 'treesit-error '("Emacs cannot figure out the file extension for dynamic libraries for this system, because `dynamic-library-suffixes' is nil"))))
Expand Down

0 comments on commit d836623

Please sign in to comment.