dockcross/linux-x64-tinycc/Dockerfile.in
Teodor-Bogdan Barbieru 75a8d7aa1d fix: disabled C tests for wrong architecture
- fix for `linux-x64-tinycc`
 - use github mirror for tinycc
 - repo.or.cz/tinycc is down
2022-02-02 02:21:50 +02:00

44 lines
1.1 KiB
Docker

FROM dockcross/base:latest
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
# This image use Tinycc as C compiler and GCC as C++ compiler
ARG REPO_URL=https://github.com/mirror/tinycc.git
ENV REPO_URL=${REPO_URL}
RUN apt-get update && \
apt-get -y install \
libtbb-dev \
&& apt-get clean --yes
# Disable options: --with-libgcc --disable-static
RUN git clone --recurse-submodules --remote-submodules ${REPO_URL} \
&& 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"