From 946856e9c242d4a6fb5f839d8cae0acfafecdfc6 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 25 Dec 2020 15:45:08 +0000 Subject: [PATCH] fix(big-sur): add Xcode CLI tools lib directory to runtime LIBRARY_PATH --- patches/native-comp-env-setup.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patches/native-comp-env-setup.patch b/patches/native-comp-env-setup.patch index d99b983..aac06ea 100644 --- a/patches/native-comp-env-setup.patch +++ b/patches/native-comp-env-setup.patch @@ -2,7 +2,7 @@ diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 25e2de9..bcedd31 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el -@@ -2801,6 +2801,53 @@ queued with LOAD %" +@@ -2801,6 +2801,57 @@ queued with LOAD %" (comp-run-async-workers) (message "Compilation started.")))) @@ -13,6 +13,8 @@ index 25e2de9..bcedd31 100644 + (string-match-p "\.app\/Contents\/MacOS\/?$" + invocation-directory)) + (let* ((library-path-env (getenv "LIBRARY_PATH")) ++ (devtools-dir ++ "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib") + (gcc-base-dir (concat invocation-directory "lib/gcc")) + (gcc-version (car (seq-filter + (lambda (dir) (string-match-p "^[0-9]+$" dir)) @@ -28,6 +30,8 @@ index 25e2de9..bcedd31 100644 + (darwin-dir (concat darwin-base-dir "/" darwin-version)) + (lib-paths (append + (list gcc-dir darwin-dir) ++ (if (file-directory-p devtools-dir) ++ (list devtools-dir) (list)) + (if library-path-env (list library-path-env) (list))))) + + (when (and gcc-dir darwin-dir)