Skip to content

Supporting aarch64-apple-darwin #72

Closed
@shepmaster

Description

@shepmaster

I was hoping that OpenSSL would accept the PR that adds support to their build system for aarch64-apple-darwin, but with 1.1.1h released without it, it seems unlikely by the end of 2020. As such, I'd like to discuss how the project feels about applying our own patches on top of the official release.

Specifically, the patch in question only modifies the build system to use existing pieces in new ways.

With that applied, and a single line added to this crate to map target triples, it's possible to cross-compile to aarch64-apple-darwin:

% SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.0 --show-sdk-platform-version) cargo +462ec6baef52edea591eab1a070ed4e18b80d094 build --target=aarch64-apple-darwin --features vendored
   Compiling cc v1.0.60
   Compiling pkg-config v0.3.18
   Compiling autocfg v1.0.1
   Compiling libc v0.2.77
   Compiling bitflags v1.2.1
   Compiling foreign-types-shared v0.1.1
   Compiling openssl v0.10.30 (/Users/shep/Projects/rust-openssl/openssl)
   Compiling cfg-if v0.1.10
   Compiling lazy_static v1.4.0
   Compiling foreign-types v0.3.2
   Compiling openssl-src v111.10.2+1.1.1g (/Users/shep/Projects/openssl-src-rs)
   Compiling openssl-sys v0.9.58 (/Users/shep/Projects/rust-openssl/openssl-sys)
    Finished dev [unoptimized + debuginfo] target(s) in 29.71s

This should make it possible to build Cargo for this platform as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions