-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile.cross-x86_64
More file actions
24 lines (22 loc) · 974 Bytes
/
Dockerfile.cross-x86_64
File metadata and controls
24 lines (22 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ghcr.io/cross-rs/cross:main
# Install additional build tools and headers
# gcc-10/g++-10 required to avoid GCC 9 memcmp bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189)
RUN apt-get update && \
apt-get install -y \
build-essential \
gcc-10 \
g++-10 \
curl \
jq \
pkg-config \
libclang-dev \
clang && \
rm -rf /var/lib/apt/lists/*
# Set up environment variables for x86_64 cross-compilation
ENV CC_x86_64_unknown_linux_gnu=x86_64-linux-gnu-gcc-10
ENV CXX_x86_64_unknown_linux_gnu=x86_64-linux-gnu-g++-10
ENV AR_x86_64_unknown_linux_gnu=x86_64-linux-gnu-ar
ENV STRIP_x86_64_unknown_linux_gnu=x86_64-linux-gnu-strip
ENV BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu="-I/usr/include -I/usr/include/x86_64-linux-gnu"
ENV CFLAGS_x86_64_unknown_linux_gnu="-I/usr/include -I/usr/include/x86_64-linux-gnu"
ENV CPPFLAGS_x86_64_unknown_linux_gnu="-I/usr/include -I/usr/include/x86_64-linux-gnu"