File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 - aarch64-linux-android
3434 - aarch64-unknown-linux-gnu
3535 - aarch64-unknown-linux-musl
36+ - aarch64-unknown-freebsd
3637 - arm-linux-androideabi
3738 - arm-unknown-linux-gnueabi
3839 - arm-unknown-linux-gnueabihf
Original file line number Diff line number Diff line change 1+ FROM ubuntu:20.04
2+ ARG DEBIAN_FRONTEND=noninteractive
3+
4+ COPY common.sh lib.sh /
5+ RUN /common.sh
6+
7+ COPY cmake.sh /
8+ RUN /cmake.sh
9+
10+ COPY xargo.sh /
11+ RUN /xargo.sh
12+
13+ RUN echo "export ARCH=aarch64" > /freebsd-arch.sh
14+ COPY freebsd-common.sh /
15+ COPY freebsd.sh /
16+ RUN /freebsd.sh
17+
18+ COPY freebsd-install.sh /
19+ COPY freebsd-extras.sh /
20+ RUN /freebsd-extras.sh
21+
22+ ENV CROSS_TOOLCHAIN_PREFIX=aarch64-unknown-freebsd12-
23+ ENV CROSS_SYSROOT=/usr/local/aarch64-unknown-freebsd12
24+
25+ COPY freebsd-gcc.sh /usr/bin/"$CROSS_TOOLCHAIN_PREFIX"gcc.sh
26+ COPY toolchain.cmake /opt/toolchain.cmake
27+
28+ ENV CARGO_TARGET_AARCH64_UNKNOWN_FREEBSD_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc.sh \
29+ AR_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"ar \
30+ CC_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"gcc \
31+ CXX_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"g++ \
32+ CMAKE_TOOLCHAIN_FILE_aarch64_unknown_freebsd=/opt/toolchain.cmake \
33+ BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_freebsd="--sysroot=$CROSS_SYSROOT" \
34+ AARCH64_UNKNOWN_FREEBSD_OPENSSL_DIR="$CROSS_SYSROOT" \
35+ CROSS_CMAKE_SYSTEM_NAME=FreeBSD \
36+ CROSS_CMAKE_SYSTEM_PROCESSOR=amd64 \
37+ CROSS_CMAKE_CRT=freebsd \
38+ CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64"
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ set -euo pipefail
88
99export FREEBSD_ARCH=
1010case " ${ARCH} " in
11+ aarch64) # releases are under http://ftp.freebsd.org/pub/FreeBSD/releases/
12+ FREEBSD_ARCH=arm64 # http://ftp.freebsd.org/pub/FreeBSD/releases/arm64/
13+ ;;
1114 x86_64)
1215 FREEBSD_ARCH=amd64
1316 ;;
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ set -euo pipefail
1010# shellcheck disable=SC1091
1111. freebsd-install.sh
1212
13+ case " ${FREEBSD_ARCH} " in
14+ arm64) # extras mirrors are under https://pkg.freebsd.org/
15+ FREEBSD_ARCH=aarch64 # https://pkg.freebsd.org/FreeBSD:13:aarch64/
16+ ;;
17+ esac
18+
1319main () {
1420 apt-get update && apt-get install --assume-yes --no-install-recommends \
1521 curl \
Original file line number Diff line number Diff line change @@ -407,6 +407,7 @@ pub mod tests {
407407 assert_eq ! ( arch!( "arm-unknown-linux-gnueabihf" ) ?, Architecture :: Arm ) ;
408408 assert_eq ! ( arch!( "armv7-unknown-linux-gnueabihf" ) ?, Architecture :: Arm ) ;
409409 assert_eq ! ( arch!( "aarch64-unknown-linux-gnu" ) ?, Architecture :: Arm64 ) ;
410+ assert_eq ! ( arch!( "aarch64-unknown-freebsd" ) ?, Architecture :: Arm64 ) ;
410411 assert_eq ! ( arch!( "mips-unknown-linux-gnu" ) ?, Architecture :: Mips ) ;
411412 assert_eq ! (
412413 arch!( "mips64-unknown-linux-gnuabi64" ) ?,
@@ -424,6 +425,10 @@ pub mod tests {
424425 fn os_from_target ( ) -> Result < ( ) > {
425426 assert_eq ! ( Os :: from_target( & t!( "x86_64-apple-darwin" ) ) ?, Os :: Darwin ) ;
426427 assert_eq ! ( Os :: from_target( & t!( "x86_64-unknown-freebsd" ) ) ?, Os :: Freebsd ) ;
428+ assert_eq ! (
429+ Os :: from_target( & t!( "aarch64-unknown-freebsd" ) ) ?,
430+ Os :: Freebsd
431+ ) ;
427432 assert_eq ! ( Os :: from_target( & t!( "x86_64-unknown-netbsd" ) ) ?, Os :: Netbsd ) ;
428433 assert_eq ! ( Os :: from_target( & t!( "sparcv9-sun-solaris" ) ) ?, Os :: Solaris ) ;
429434 assert_eq ! ( Os :: from_target( & t!( "sparcv9-sun-illumos" ) ) ?, Os :: Illumos ) ;
Original file line number Diff line number Diff line change @@ -233,6 +233,11 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
233233 platforms : & [ ImagePlatform :: X86_64_UNKNOWN_LINUX_GNU ] ,
234234 sub : None
235235 } ,
236+ ProvidedImage {
237+ name : "aarch64-unknown-freebsd" ,
238+ platforms : & [ ImagePlatform :: X86_64_UNKNOWN_LINUX_GNU ] ,
239+ sub : None
240+ } ,
236241 ProvidedImage {
237242 name : "x86_64-unknown-netbsd" ,
238243 platforms : & [ ImagePlatform :: X86_64_UNKNOWN_LINUX_GNU ] ,
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ impl TargetTriple {
155155 "x86_64-unknown-dragonfly" => Some ( "dragonflybsd-amd64" ) ,
156156 "i686-unknown-freebsd" => Some ( "freebsd-i386" ) ,
157157 "x86_64-unknown-freebsd" => Some ( "freebsd-amd64" ) ,
158+ "aarch64-unknown-freebsd" => Some ( "freebsd-arm64" ) ,
158159 "x86_64-unknown-netbsd" => Some ( "netbsd-amd64" ) ,
159160 "sparcv9-sun-solaris" => Some ( "solaris-sparc" ) ,
160161 "x86_64-sun-solaris" => Some ( "solaris-amd64" ) ,
Original file line number Diff line number Diff line change @@ -409,6 +409,14 @@ cpp = true
409409dylib = true
410410std = true
411411
412+ [[target ]]
413+ target = " aarch64-unknown-freebsd"
414+ os = " ubuntu-latest"
415+ cpp = true
416+ dylib = true
417+ std = true
418+ build-std = true
419+
412420[[target ]]
413421target = " x86_64-unknown-netbsd"
414422os = " ubuntu-latest"
You can’t perform that action at this time.
0 commit comments