Update tinycc image

Update tinycc image

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2021-08-12 22:37:43 +02:00
parent 5663ada809
commit c8de7138af
3 changed files with 10 additions and 4 deletions

View File

@ -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 |

View File

@ -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}/

View File

@ -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})