mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-18 00:49:25 +02:00
Compare commits
20 Commits
Update_too
...
Update_rea
Author | SHA1 | Date | |
---|---|---|---|
a4cb929bef | |||
84cab46099 | |||
4481ba2a8e | |||
da8d9a8208 | |||
f84173c7e4 | |||
29ccbad9aa | |||
5c45f72a87 | |||
526cab12a8 | |||
92102d9138 | |||
6a512eeb08 | |||
88222c9793 | |||
e6e3cde831 | |||
1ce323ce7e | |||
47f1545e66 | |||
bd6d6d77d4 | |||
37ece838f8 | |||
bca0a99e99 | |||
3c74c2f0d2 | |||
d76d2ae8c5 | |||
ed942b52f5 |
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -53,9 +53,9 @@ jobs:
|
||||
linux-x64-clang, linux-s390x, linux-x64, linux-x86,
|
||||
linux-mips, linux-ppc64le, web-wasm,
|
||||
manylinux2014-x64, manylinux2014-x86,
|
||||
windows-static-x64, windows-static-x64-posix, windows-static-x86,
|
||||
windows-shared-x64, windows-shared-x64-posix, windows-shared-x86,
|
||||
linux-riscv64, linux-riscv32, linux-m68k-uclibc, linux-xtensa-uclibc]
|
||||
windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-armv7,
|
||||
windows-shared-x64, windows-shared-x64-posix, windows-shared-x86, windows-arm64,
|
||||
linux-riscv64, linux-riscv32, linux-m68k-uclibc, linux-xtensa-uclibc, linux-x64-tinycc]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v2
|
||||
|
10
Makefile
10
Makefile
@ -15,24 +15,24 @@ BIN = ./bin
|
||||
# These images are built using the "build implicit rule"
|
||||
STANDARD_IMAGES = android-arm android-arm64 android-x86 android-x86_64 \
|
||||
linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \
|
||||
linux-armv5 linux-armv5-musl linux-m68k-uclibc linux-s390x \
|
||||
linux-armv5 linux-armv5-musl linux-m68k-uclibc linux-s390x linux-x64-tinycc \
|
||||
linux-armv6 linux-armv6-lts linux-armv6-musl \
|
||||
linux-armv7l-musl linux-armv7 linux-armv7a \
|
||||
linux-mips linux-ppc64le linux-riscv64 linux-riscv32 linux-xtensa-uclibc \
|
||||
windows-static-x86 windows-static-x64 windows-static-x64-posix \
|
||||
windows-shared-x86 windows-shared-x64 windows-shared-x64-posix
|
||||
windows-static-x86 windows-static-x64 windows-static-x64-posix windows-armv7 \
|
||||
windows-shared-x86 windows-shared-x64 windows-shared-x64-posix windows-arm64
|
||||
|
||||
# Generated Dockerfiles.
|
||||
GEN_IMAGES = android-arm android-arm64 \
|
||||
linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \
|
||||
manylinux2014-x64 manylinux2014-x86 \
|
||||
web-wasm linux-mips \
|
||||
web-wasm linux-mips windows-arm64 windows-armv7 \
|
||||
windows-static-x86 windows-static-x64 windows-static-x64-posix \
|
||||
windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \
|
||||
linux-armv7 linux-armv7a linux-armv7l-musl \
|
||||
linux-armv6 linux-armv6-lts linux-armv6-musl \
|
||||
linux-armv5 linux-armv5-musl linux-ppc64le linux-s390x \
|
||||
linux-riscv64 linux-riscv32 linux-m68k-uclibc linux-xtensa-uclibc
|
||||
linux-riscv64 linux-riscv32 linux-m68k-uclibc linux-x64-tinycc linux-xtensa-uclibc
|
||||
|
||||
GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES))
|
||||
|
||||
|
21
README.md
21
README.md
@ -102,6 +102,7 @@ The dockcross script will execute the given command-line inside the container, a
|
||||
| dockcross/linux-x86 | x86 | GCC | Linux |
|
||||
| dockcross/linux-x64 | x86_64 | GCC | Linux |
|
||||
| dockcross/linux-x64-clang | x86_64 | Clang | Linux |
|
||||
| dockcross/linux-x64-tinycc | x86_64 | tcc + GCC | Linux |
|
||||
| dockcross/web-wasm | JS | LLVM | Web (JS) |
|
||||
| dockcross/windows-shared-x86 | x86 | GCC | Windows |
|
||||
| dockcross/windows-shared-x64 | x86_64 | GCC | Windows |
|
||||
@ -109,6 +110,8 @@ The dockcross script will execute the given command-line inside the container, a
|
||||
| dockcross/windows-static-x86 | x86 | GCC | Windows |
|
||||
| dockcross/windows-static-x64 | x86_64 | GCC | Windows |
|
||||
| dockcross/windows-static-x64-posix | x86_64 | GCC | Windows |
|
||||
| dockcross/windows-armv7 | ARMv7 | Clang | Windows |
|
||||
| dockcross/windows-arm64 | ARMv8 | Clang | Windows |
|
||||
|
||||
## Cross compilers
|
||||
|
||||
@ -269,6 +272,12 @@ Linux clang x86_64/amd64 compiler. Since the Docker image is natively x86_64, th
|
||||
|
||||
Linux i686 cross compiler.
|
||||
|
||||
### dockcross/linux-x64-tinycc
|
||||
|
||||
 
|
||||
|
||||
Linux tcc compiler for C compiler, and GCC for C++ compiler, for linux x86_64/amd64 arch.
|
||||
|
||||
### dockcross/manylinux2014-x64
|
||||
|
||||
 
|
||||
@ -325,6 +334,18 @@ linking.
|
||||
|
||||
32-bit Windows cross-compiler based on [MXE/MinGW-w64](https://mxe.cc/) with win32 threads and dynamic linking.
|
||||
|
||||
### dockcross/windows-armv7
|
||||
|
||||
 
|
||||
|
||||
ARMv7 32-bit Windows cross-compiler based on [LLVM/MinGW-w64](https://github.com/mstorsjo/llvm-mingw)
|
||||
|
||||
### dockcross/windows-arm64
|
||||
|
||||
 
|
||||
|
||||
ARMv8 64-bit Windows cross-compiler based on [llvm-mingw](https://github.com/mstorsjo/llvm-mingw)
|
||||
|
||||
## Summary legacy cross compilers
|
||||
|
||||
The list of docker images that are no longer supported or broken
|
||||
|
31
linux-x64-tinycc/Dockerfile.in
Normal file
31
linux-x64-tinycc/Dockerfile.in
Normal file
@ -0,0 +1,31 @@
|
||||
FROM dockcross/base:latest
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
RUN git clone --recurse-submodules https://repo.or.cz/tinycc.git \
|
||||
&& cd tinycc \
|
||||
&& ./configure --cpu=x86_64 \
|
||||
&& make -j$(nproc) \
|
||||
&& make test \
|
||||
&& make install
|
||||
|
||||
ENV PATH="/usr/local/bin:${PATH}"
|
||||
# Test if compiler work
|
||||
RUN tcc -v
|
||||
|
||||
ENV CROSS_TRIPLE x86_64-linux-gnu
|
||||
ENV CROSS_ROOT /usr/bin
|
||||
ENV AS=/usr/bin/${CROSS_TRIPLE}-as \
|
||||
AR=/usr/bin/${CROSS_TRIPLE}-ar \
|
||||
CC=/usr/local/bin/tcc \
|
||||
CPP=/usr/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=/usr/bin/${CROSS_TRIPLE}-g++ \
|
||||
LD=/usr/bin/${CROSS_TRIPLE}-ld \
|
||||
FC=/usr/bin/${CROSS_TRIPLE}-gfortran
|
||||
|
||||
|
||||
COPY ${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop
|
||||
|
||||
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
|
||||
|
||||
#include "common.label-and-env"
|
12
linux-x64-tinycc/Toolchain.cmake
Normal file
12
linux-x64-tinycc/Toolchain.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(cross_triple "x86_64-linux-gnu")
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
||||
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/${cross_triple}-noop)
|
2
linux-x64-tinycc/x86_64-linux-gnu-noop.sh
Executable file
2
linux-x64-tinycc/x86_64-linux-gnu-noop.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec "$@"
|
29
windows-arm64/Dockerfile.in
Normal file
29
windows-arm64/Dockerfile.in
Normal file
@ -0,0 +1,29 @@
|
||||
FROM dockcross/base:latest
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
ENV XCC_PREFIX /usr/xcc
|
||||
ENV CROSS_TRIPLE aarch64-w64-mingw32
|
||||
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}-cross
|
||||
|
||||
ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20210423/llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz
|
||||
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 \
|
||||
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang \
|
||||
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang++ \
|
||||
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"
|
19
windows-arm64/Toolchain.cmake
Normal file
19
windows-arm64/Toolchain.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64)
|
29
windows-armv7/Dockerfile.in
Normal file
29
windows-armv7/Dockerfile.in
Normal file
@ -0,0 +1,29 @@
|
||||
FROM dockcross/base:latest
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
ENV XCC_PREFIX /usr/xcc
|
||||
ENV CROSS_TRIPLE armv7-w64-mingw32
|
||||
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}-cross
|
||||
|
||||
ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20210423/llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz
|
||||
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 \
|
||||
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang \
|
||||
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang++ \
|
||||
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 arm
|
||||
|
||||
#include "common.label-and-env"
|
19
windows-armv7/Toolchain.cmake
Normal file
19
windows-armv7/Toolchain.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm)
|
Reference in New Issue
Block a user