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 #53
This commit is contained in:
2021-11-27 01:23:45 +00:00
parent fb5362ce18
commit 3bd78d130a
2 changed files with 5 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ var DefaultEmacsEntitlements = []string{
"com.apple.security.cs.allow-jit",
"com.apple.security.network.client",
"com.apple.security.cs.disable-library-validation",
"com.apple.security.cs.allow-dyld-environment-variables",
"com.apple.security.automation.apple-events",
}

View File

@@ -50,6 +50,7 @@ var entitlementsTestCases = []struct {
"com.apple.security.cs.allow-jit",
"com.apple.security.network.client",
"com.apple.security.cs.disable-library-validation",
"com.apple.security.cs.allow-dyld-environment-variables",
"com.apple.security.automation.apple-events",
},
//nolint:lll
@@ -64,6 +65,8 @@ var entitlementsTestCases = []struct {
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.automation.apple-events</key>
<true/>
</dict>
@@ -78,6 +81,7 @@ func TestDefaultEmacsEntitlements(t *testing.T) {
"com.apple.security.cs.allow-jit",
"com.apple.security.network.client",
"com.apple.security.cs.disable-library-validation",
"com.apple.security.cs.allow-dyld-environment-variables",
"com.apple.security.automation.apple-events",
},
DefaultEmacsEntitlements,