mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 08:24:25 +01:00
Merge pull request #560 from bensuperpc/update-images
Use env variable instead hardcoded variable in toolchain.cmake and update linux-x64-tinycc image
This commit is contained in:
commit
d647c82d0e
@ -102,7 +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/linux-x64-tinycc | x86_64 | tinycc + GCC | Linux |
|
||||
| dockcross/web-wasm | JS | LLVM | Web (JS) |
|
||||
| dockcross/windows-shared-x86 | x86 | GCC | Windows |
|
||||
| dockcross/windows-shared-x64 | x86_64 | GCC | Windows |
|
||||
|
@ -3,7 +3,7 @@ set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR armv7-a)
|
||||
set(CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
|
||||
|
||||
set(cross_triple arm-linux-androideabi)
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN $ENV{CROSS_ROOT})
|
||||
set(CMAKE_ANDROID_ARM_MODE ON)
|
||||
set(CMAKE_ANDROID_ARM_NEON ON)
|
||||
|
@ -3,7 +3,7 @@ set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)
|
||||
|
||||
set(cross_triple aarch64-linux-android)
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN $ENV{CROSS_ROOT})
|
||||
set(CMAKE_ANDROID_ARM_MODE ON)
|
||||
set(CMAKE_ANDROID_ARM_NEON ON)
|
||||
|
@ -3,7 +3,7 @@ set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
set(CMAKE_ANDROID_ARCH_ABI x86)
|
||||
|
||||
set(cross_triple i686-linux-android)
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN $ENV{CROSS_ROOT})
|
||||
set(CMAKE_ANDROID_ARM_MODE ON)
|
||||
set(CMAKE_ANDROID_ARM_NEON ON)
|
||||
|
@ -3,7 +3,7 @@ set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
set(CMAKE_ANDROID_ARCH_ABI x86_64)
|
||||
|
||||
set(cross_triple x86_64-linux-android)
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN $ENV{CROSS_ROOT})
|
||||
set(CMAKE_ANDROID_ARM_MODE ON)
|
||||
set(CMAKE_ANDROID_ARM_NEON ON)
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(cross_triple "aarch64-buildroot-linux-gnu")
|
||||
set(cross_root /buildroot)
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
@ -13,9 +13,8 @@ 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 ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||
|
||||
set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot)
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(cross_triple "armv5-unknown-linux-gnueabi")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -1,8 +1,9 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(cross_triple "armv6-unknown-linux-gnueabihf")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -1,8 +1,9 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(cross_triple "armv7-unknown-linux-gnueabi")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -1,8 +1,9 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(cross_triple "arm-cortexa8_neon-linux-gnueabihf")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR mk68)
|
||||
|
||||
set(cross_triple "m68k-unknown-uclinux-uclibc")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR mips)
|
||||
|
||||
set(cross_triple "mips-unknown-linux-gnu")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR ppc64le)
|
||||
|
||||
set(cross_triple "powerpc64le-unknown-linux-gnu")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR riscv32)
|
||||
|
||||
set(cross_triple "riscv32-unknown-linux-gnu")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR riscv64)
|
||||
|
||||
set(cross_triple "riscv64-unknown-linux-gnu")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR s390x)
|
||||
|
||||
set(cross_triple "s390x-ibm-linux-gnu")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -1,7 +1,13 @@
|
||||
FROM dockcross/base:latest
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
RUN git clone --recurse-submodules https://repo.or.cz/tinycc.git \
|
||||
# This image use Tinycc as C compiler and GCC as C++ compiler
|
||||
|
||||
ARG REPO_URL=https://repo.or.cz/tinycc.git
|
||||
ENV REPO_URL=${REPO_URL}
|
||||
|
||||
# Disable options: --with-libgcc --disable-static
|
||||
RUN git clone --recurse-submodules --remote-submodules ${REPO_URL} \
|
||||
&& cd tinycc \
|
||||
&& ./configure --cpu=x86_64 \
|
||||
&& make -j$(nproc) \
|
||||
@ -9,6 +15,7 @@ RUN git clone --recurse-submodules https://repo.or.cz/tinycc.git \
|
||||
&& make install
|
||||
|
||||
ENV PATH="/usr/local/bin:${PATH}"
|
||||
|
||||
# Test if compiler work
|
||||
RUN tcc -v
|
||||
|
||||
@ -22,7 +29,6 @@ ENV AS=/usr/bin/${CROSS_TRIPLE}-as \
|
||||
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}/
|
||||
|
@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(cross_triple "x86_64-linux-gnu")
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR xtensa)
|
||||
|
||||
set(cross_triple "xtensa-fsf-linux-uclibc")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
set(cross_triple $ENV{CROSS_TRIPLE})
|
||||
set(cross_root $ENV{CROSS_ROOT})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
|
@ -16,4 +16,4 @@ 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)
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm)
|
||||
|
Loading…
Reference in New Issue
Block a user