2022-12-16 16:07:56 +01:00
|
|
|
ARG ORG=dockcross
|
|
|
|
FROM ${ORG}/base:latest
|
2021-10-04 12:51:28 +02:00
|
|
|
|
|
|
|
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
2021-08-11 01:07:37 +02:00
|
|
|
|
|
|
|
ENV XCC_PREFIX /usr/xcc
|
|
|
|
ENV CROSS_TRIPLE aarch64-w64-mingw32
|
|
|
|
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}-cross
|
|
|
|
|
2022-05-20 10:04:04 +02:00
|
|
|
ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20220323/llvm-mingw-20220323-msvcrt-ubuntu-18.04-x86_64.tar.xz
|
2021-08-11 01:07:37 +02:00
|
|
|
ENV DOWNLOAD_URL=${DOWNLOAD_URL}
|
|
|
|
|
|
|
|
RUN mkdir -p ${CROSS_ROOT} && wget -qO- "${DOWNLOAD_URL}" | tar xJvf - --strip 1 -C ${CROSS_ROOT}/ > /dev/null
|
|
|
|
|
|
|
|
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
|
|
|
|
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
|
2021-08-11 21:48:36 +02:00
|
|
|
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
|
|
|
|
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \
|
2021-08-11 01:07:37 +02:00
|
|
|
LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld \
|
|
|
|
FC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gfortran
|
|
|
|
|
|
|
|
COPY Toolchain.cmake ${CROSS_ROOT}/
|
|
|
|
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
|
|
|
|
|
|
|
# Linux kernel cross compilation variables
|
|
|
|
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
|
|
|
ENV CROSS_COMPILE ${CROSS_TRIPLE}-
|
|
|
|
ENV ARCH arm64
|
|
|
|
|
|
|
|
#include "common.label-and-env"
|