-
Notifications
You must be signed in to change notification settings - Fork 377
/
Dockerfile.x86_64-unknown-freebsd
46 lines (36 loc) · 1.44 KB
/
Dockerfile.x86_64-unknown-freebsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM ubuntu:20.04 as cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh
FROM cross-base as build
RUN echo "export ARCH=x86_64" > /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=x86_64-unknown-freebsd13-
ENV CROSS_SYSROOT=/usr/local/x86_64-unknown-freebsd13
COPY freebsd-gcc.sh /usr/bin/"$CROSS_TOOLCHAIN_PREFIX"gcc.sh
COPY toolchain.cmake /opt/toolchain.cmake
COPY freebsd-fetch-best-mirror.sh /
COPY freebsd-setup-packagesite.sh /
COPY freebsd-install-package.sh /
ENV CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc.sh \
AR_x86_64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_x86_64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_x86_64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_x86_64_unknown_freebsd=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_freebsd="--sysroot=$CROSS_SYSROOT" \
X86_64_UNKNOWN_FREEBSD_OPENSSL_DIR="$CROSS_SYSROOT" \
PKG_CONFIG_PATH="${CROSS_SYSROOT}/libdata/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=FreeBSD \
CROSS_CMAKE_SYSTEM_PROCESSOR=amd64 \
CROSS_CMAKE_CRT=freebsd \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64"