Skip to content

Commit 3bd78d1

Browse files
committed
feat(native-comp): no longer require gcc homebrew formula
This finally makes Emacs.app with native-comp fully self-contained, no longer requiring the GCC Homebrew formula to be installed when loading *.eln files that link against /usr/local/lib/gcc/11/libgcc_s.1.dylib. By adding the signing entitlement com.apple.security.cs.allow-dyld-environment-variables, which allows dynamic library loading to be controlled via DYLD_* environment variables. It seems the lack of this was preventing Emacs from loading the bundled libgcc_s.1.dylib file from Contents/Frameworks. Fixes jimeh#53
1 parent fb5362c commit 3bd78d1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pkg/sign/entitlements.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var DefaultEmacsEntitlements = []string{
1414
"com.apple.security.cs.allow-jit",
1515
"com.apple.security.network.client",
1616
"com.apple.security.cs.disable-library-validation",
17+
"com.apple.security.cs.allow-dyld-environment-variables",
1718
"com.apple.security.automation.apple-events",
1819
}
1920

pkg/sign/entitlements_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ var entitlementsTestCases = []struct {
5050
"com.apple.security.cs.allow-jit",
5151
"com.apple.security.network.client",
5252
"com.apple.security.cs.disable-library-validation",
53+
"com.apple.security.cs.allow-dyld-environment-variables",
5354
"com.apple.security.automation.apple-events",
5455
},
5556
//nolint:lll
@@ -64,6 +65,8 @@ var entitlementsTestCases = []struct {
6465
<true/>
6566
<key>com.apple.security.cs.disable-library-validation</key>
6667
<true/>
68+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
69+
<true/>
6770
<key>com.apple.security.automation.apple-events</key>
6871
<true/>
6972
</dict>
@@ -78,6 +81,7 @@ func TestDefaultEmacsEntitlements(t *testing.T) {
7881
"com.apple.security.cs.allow-jit",
7982
"com.apple.security.network.client",
8083
"com.apple.security.cs.disable-library-validation",
84+
"com.apple.security.cs.allow-dyld-environment-variables",
8185
"com.apple.security.automation.apple-events",
8286
},
8387
DefaultEmacsEntitlements,

0 commit comments

Comments
 (0)