dockcross/linux-x86/Dockerfile

22 lines
743 B
Docker
Raw Normal View History

2016-04-06 22:48:12 +02:00
FROM thewtex/cross-compiler-base
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
2016-04-06 22:48:12 +02:00
RUN dpkg --add-architecture i386 && \
apt-get update && apt-get -y install \
gcc-multilib \
g++-multilib
ENV CROSS_TRIPLE i686-linux-gnu
2016-04-06 22:48:12 +02:00
ENV CROSS_ROOT /usr/${CROSS_TRIPLE}
ENV PATH ${PATH}:${CROSS_ROOT}/bin
2016-04-06 22:48:12 +02:00
RUN mkdir -p ${CROSS_ROOT}/bin
COPY ${CROSS_TRIPLE}.sh ${CROSS_ROOT}/bin/${CROSS_TRIPLE}.sh
RUN cd ${CROSS_ROOT}/bin && \
chmod +x ${CROSS_TRIPLE}.sh && \
ln -s /usr/bin/x86_64-linux-gnu-gcc && \
ln -s /usr/bin/x86_64-linux-gnu-g++ && \
ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-gcc && \
ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-g++
ENV CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++