-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1271: feat: add aarch64-unknown-freebsd image r=Emilgardis a=YOU54F 👋🏾 Thanks for Cross, we've been using it at the pact-foundation to build cross platform targets, and I've gone through the target list and attempted to build for everything I can. See [PR here](pact-foundation/pact-reference#276) I've managed to build for freebsd in a parallels vm on a mac m1 pro, but makes sense to try and apply that to a Docker image. Relates to #975 Still requires testing but thought I would drop it here for others to have a look at / test / try out Co-authored-by: Yousaf Nabi <you@saf.dev>
- Loading branch information
Showing
9 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"description": "add aarch64-unknown-freebsd image.", | ||
"type": "added", | ||
"breaking": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM ubuntu:20.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY common.sh lib.sh / | ||
RUN /common.sh | ||
|
||
COPY cmake.sh / | ||
RUN /cmake.sh | ||
|
||
COPY xargo.sh / | ||
RUN /xargo.sh | ||
|
||
RUN echo "export ARCH=aarch64" > /freebsd-arch.sh | ||
COPY freebsd-common.sh / | ||
COPY freebsd.sh / | ||
RUN /freebsd.sh | ||
|
||
COPY freebsd-install.sh / | ||
COPY freebsd-extras.sh / | ||
RUN /freebsd-extras.sh | ||
|
||
ENV CROSS_TOOLCHAIN_PREFIX=aarch64-unknown-freebsd12- | ||
ENV CROSS_SYSROOT=/usr/local/aarch64-unknown-freebsd12 | ||
|
||
COPY freebsd-gcc.sh /usr/bin/"$CROSS_TOOLCHAIN_PREFIX"gcc.sh | ||
COPY toolchain.cmake /opt/toolchain.cmake | ||
|
||
ENV CARGO_TARGET_AARCH64_UNKNOWN_FREEBSD_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc.sh \ | ||
AR_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"ar \ | ||
CC_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"gcc \ | ||
CXX_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"g++ \ | ||
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_freebsd=/opt/toolchain.cmake \ | ||
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_freebsd="--sysroot=$CROSS_SYSROOT" \ | ||
AARCH64_UNKNOWN_FREEBSD_OPENSSL_DIR="$CROSS_SYSROOT" \ | ||
CROSS_CMAKE_SYSTEM_NAME=FreeBSD \ | ||
CROSS_CMAKE_SYSTEM_PROCESSOR=amd64 \ | ||
CROSS_CMAKE_CRT=freebsd \ | ||
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters