Skip to content

Commit

Permalink
feat: support mac arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson authored and Gauthier Roebroeck committed Aug 23, 2022
1 parent d06cdc3 commit 20d9f29
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
# binaries
test/helloworld
a.out

.idea
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM buildpack-deps:stretch-curl
FROM buildpack-deps:bullseye-curl
MAINTAINER Manfred Touron <[email protected]> (https://github.com/moul)

# Install deps
Expand Down Expand Up @@ -61,11 +61,11 @@ RUN apt-get install -y mingw-w64 \

#Build arguments
ARG osxcross_repo="tpoechtrager/osxcross"
ARG osxcross_revision="542acc2ef6c21aeb3f109c03748b1015a71fed63"
ARG darwin_sdk_version="10.10"
ARG darwin_osx_version_min="10.6"
ARG darwin_version="14"
ARG darwin_sdk_url="https://www.dropbox.com/s/yfbesd249w10lpc/MacOSX${darwin_sdk_version}.sdk.tar.xz"
ARG osxcross_revision="17bb5e2d0a46533c1dd525cf4e9a80d88bd9f00e"
ARG darwin_sdk_version="11.3"
ARG darwin_osx_version_min="10.9"
ARG darwin_version="20.4"
ARG darwin_sdk_url="https://drive.google.com/uc?export=download&id=1jIUPgFwlco6SR20CGTUkHzNQuyP9AtOY"

# ENV available in docker image
ENV OSXCROSS_REPO="${osxcross_repo}" \
Expand Down Expand Up @@ -95,9 +95,9 @@ RUN mkdir -p "/tmp/osxcross"

# Create symlinks for triples and set default CROSS_TRIPLE
ENV LINUX_TRIPLES=arm-linux-gnueabi,arm-linux-gnueabihf,aarch64-linux-gnu,mipsel-linux-gnu,powerpc64le-linux-gnu \
DARWIN_TRIPLES=x86_64h-apple-darwin${DARWIN_VERSION},x86_64-apple-darwin${DARWIN_VERSION},i386-apple-darwin${DARWIN_VERSION} \
DARWIN_TRIPLES=x86_64h-apple-darwin${DARWIN_VERSION},x86_64-apple-darwin${DARWIN_VERSION},aarch64-apple-darwin${DARWIN_VERSION},i386-apple-darwin${DARWIN_VERSION} \
WINDOWS_TRIPLES=i686-w64-mingw32,x86_64-w64-mingw32 \
CROSS_TRIPLE=x86_64-linux-gnu
CROSS_TRIPLE=aarch64-apple-darwin
COPY ./assets/osxcross-wrapper /usr/bin/osxcross-wrapper
RUN mkdir -p /usr/x86_64-linux-gnu; \
for triple in $(echo ${LINUX_TRIPLES} | tr "," " "); do \
Expand Down
2 changes: 2 additions & 0 deletions assets/crossbuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ case "${CROSS_TRIPLE}" in
CROSS_TRIPLE="mipsel-linux-gnu" ;;
powerpc64le-linux-gnu|powerpc|powerpc64|powerpc64le)
CROSS_TRIPLE="powerpc64le-linux-gnu" ;;
arm64-apple-darwin|osx|osx64|darwin|darwin64)
CROSS_TRIPLE="aarch64-apple-darwin${DARWIN_VERSION}" ;;
x86_64-apple-darwin|osx|osx64|darwin|darwin64)
CROSS_TRIPLE="x86_64-apple-darwin${DARWIN_VERSION}" ;;
x86_64h-apple-darwin|osx64h|darwin64h|x86_64h)
Expand Down

0 comments on commit 20d9f29

Please sign in to comment.