-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to new emacs-29.1 release
- Loading branch information
Showing
5 changed files
with
116 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: build-snap | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: snapcore/action-build@v1 |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el b/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el | ||
index e97832455b9..b04cfa00c33 100644 | ||
--- a/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el | ||
+++ b/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el | ||
@@ -186,8 +186,7 @@ and above." | ||
:type '(repeat string) | ||
:version "28.1") | ||
|
||
-(defcustom native-comp-driver-options (when (eq system-type 'darwin) | ||
- '("-Wl,-w")) | ||
+(defcustom native-comp-driver-options (when (getenv "SNAP") (list (concat "--sysroot=" (file-name-as-directory (getenv "SNAP"))) (concat "-B" (file-name-as-directory (getenv "SNAP")) "usr/lib/gcc/"))) | ||
"Options passed verbatim to the native compiler's back-end driver. | ||
Note that not all options are meaningful; typically only the options | ||
affecting the assembler and linker are likely to be useful. |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git a/lisp/treesit.el b/lisp/treesit.el | ||
index d7502560fea..dbdbdb193c0 100644 | ||
--- a/lisp/treesit.el | ||
+++ b/lisp/treesit.el | ||
@@ -2952,11 +2952,11 @@ function signals an error." | ||
(default-directory (make-temp-file "treesit-workdir" t)) | ||
(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-10") | ||
;; 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++-10") | ||
"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")))) | ||
@@ -2981,20 +2981,27 @@ function signals an error." | ||
(message "Compiling library") | ||
;; cc -fPIC -c -I. parser.c | ||
(treesit--call-process-signal | ||
- cc nil t nil "-fPIC" "-c" "-I." "parser.c") | ||
+ cc nil t nil "-fPIC" "-c" "-I." | ||
+ "--sysroot" (file-name-as-directory (getenv "EMACS_SNAP_DIR")) | ||
+ "parser.c") | ||
;; cc -fPIC -c -I. scanner.c | ||
(when (file-exists-p "scanner.c") | ||
(treesit--call-process-signal | ||
- cc nil t nil "-fPIC" "-c" "-I." "scanner.c")) | ||
+ cc nil t nil "-fPIC" "-c" "-I." | ||
+ "--sysroot" (file-name-as-directory (getenv "EMACS_SNAP_DIR")) | ||
+ "scanner.c")) | ||
;; c++ -fPIC -I. -c scanner.cc | ||
(when (file-exists-p "scanner.cc") | ||
(treesit--call-process-signal | ||
- c++ nil t nil "-fPIC" "-c" "-I." "scanner.cc")) | ||
+ c++ nil t nil "-fPIC" "-c" "-I." | ||
+ "--sysroot" (file-name-as-directory (getenv "EMACS_SNAP_DIR")) | ||
+ "scanner.cc")) | ||
;; cc/c++ -fPIC -shared *.o -o "libtree-sitter-${lang}.${soext}" | ||
(apply #'treesit--call-process-signal | ||
(if (file-exists-p "scanner.cc") c++ cc) | ||
nil t nil | ||
`("-fPIC" "-shared" | ||
+ "--sysroot" ,(file-name-as-directory (getenv "EMACS_SNAP_DIR")) | ||
,@(directory-files | ||
default-directory nil | ||
(rx bos (+ anychar) ".o" eos)) |