mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-10 21:19:26 +02:00
Add tinycc image
Add tinycc image Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
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 "$@"
|
Reference in New Issue
Block a user