Skip to content

Commit

Permalink
emacs-29: fix native comp on intel with std env
Browse files Browse the repository at this point in the history
  • Loading branch information
d12frosted committed Apr 28, 2022
1 parent edb5b25 commit 3a61eae
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions Formula/emacs-plus@29.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class EmacsPlusAT29 < EmacsBase
local_patch "no-frame-refocus-cocoa", sha: "fb5777dc890aa07349f143ae65c2bcf43edad6febfd564b01a2235c5a15fcabd" if build.with? "no-frame-refocus"
local_patch "fix-window-role", sha: "1f8423ea7e6e66c9ac6dd8e37b119972daa1264de00172a24a79a710efcb8130"
local_patch "system-appearance", sha: "d6ee159839b38b6af539d7b9bdff231263e451c1fd42eec0d125318c9db8cd92"
local_patch "fix-MAC_LIBS-inference-on-Intel", sha: "e336dd571732fffb3c71fa31c35084f6529dc1e432f35aed3406f1eae14e5a32" if build.with? "native-comp"

#
# Install
Expand Down
26 changes: 26 additions & 0 deletions patches/emacs-29/fix-MAC_LIBS-inference-on-Intel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From ccf4835f5dadbbe2a0c41e29c88fb37029209b42 Mon Sep 17 00:00:00 2001
From: Boris Buliga <boris@d12frosted.io>
Date: Thu, 28 Apr 2022 18:22:13 +0300
Subject: [PATCH] fix MAC_LIBS inference on Intel

---
configure.ac | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7c8638a471..dcbb25c063 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4125,8 +4125,7 @@ if test "${with_native_compilation}" != "no"; then
if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then
MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
grep libgccjit.h))"
- MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \
- grep libgccjit.so\$))"
+ MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | grep libgccjit.dylib\$ || $BREW ls -v libgccjit | grep libgccjit.so\$))"
fi
fi

--
2.35.1

3 comments on commit 3a61eae

@jsmestad
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d12frosted just curious what does this do or solve? (just learning)

@d12frosted
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsmestad see #455 :) Some explanations of this 'quick fix' are here - #455 (comment) Another quick option would be just removing these brew related lines as they were skipped previously anyways. Once I have more time I will try to come with better solution than this.

@d12frosted
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsmestad turns out Emacs upstream took the same approach, but with better shell-fu - emacs-mirror/emacs@faa29fa

Please sign in to comment.