mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2026-10-10 19:36:32 +00:00
Add support for linking NSS statically on macOS
This is an attmept to link with NSS statically on macOS (both Intel and
Apple M1).
Statically linking with NSS is a total mess and completely
undocumented. There are 20+ .a files to link with, and their linking
order matters. The main reference for this commit is a Mozilla Rust code
responsible for statically linking NSS:
https://github.com/mozilla/application-services/blob/b2690fd2e4cc3e8e10b6868ab0de8b79c89d3a93/components/support/rc_crypto/nss/nss_b uild_common/src/lib.rs#L94
Unfortunately, even with that in hand, a lot of hacking is needed to
make it all work.
This commit is contained in:
+4
-1
@@ -126,7 +126,10 @@ $(NSS_VERSION).tar.gz:
|
||||
$(nss_static_libs): $(NSS_VERSION).tar.gz
|
||||
tar xf $(NSS_VERSION).tar.gz
|
||||
cd $(NSS_VERSION)/nss
|
||||
./build.sh -o --disable-tests --static
|
||||
./build.sh -o --disable-tests --static --python=python3
|
||||
# Hack for macOS: Remove dynamic libraries to force the linker to use the
|
||||
# static ones when linking curl.
|
||||
rm -Rf $(nss_install_dir)/lib/*.dylib
|
||||
|
||||
|
||||
boringssl.zip:
|
||||
|
||||
Reference in New Issue
Block a user