dockcross/linux-x86/Dockerfile
Jean-Christophe Fillion-Robin dc871beb50 linux-x86: Set emulator path using a "noop" script without argument.
This will fix issue where emulator is used doing:

  COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} /path/to/prog arg1 arg2

Prior to this commit, it wasn't working because the following command
was used:

  /bin/sh -c /path/to/prog arg1 arg2
2016-04-16 16:43:13 -04:00

37 lines
1.4 KiB
Docker

FROM thewtex/cross-compiler-base
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
RUN dpkg --add-architecture i386 && \
apt-get update && apt-get -y install \
gcc-multilib \
g++-multilib \
libc6:i386 \
libstdc++6:i386
ENV CROSS_TRIPLE i686-linux-gnu
ENV CROSS_ROOT /usr/${CROSS_TRIPLE}
ENV PATH ${PATH}:${CROSS_ROOT}/bin
RUN mkdir -p ${CROSS_ROOT}/bin
COPY ${CROSS_TRIPLE}.sh ${CROSS_ROOT}/bin/${CROSS_TRIPLE}.sh
COPY ${CROSS_TRIPLE}-as.sh ${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as.sh
COPY ${CROSS_TRIPLE}-noop.sh ${CROSS_ROOT}/bin/${CROSS_TRIPLE}-noop.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 /usr/bin/x86_64-linux-gnu-as && \
ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-gcc && \
ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-g++ && \
ln -s ${CROSS_TRIPLE}-as.sh ${CROSS_TRIPLE}-as && \
ln -s /usr/bin/x86_64-linux-gnu-ar ${CROSS_TRIPLE}-ar && \
ln -s ${CROSS_TRIPLE}-noop.sh ${CROSS_TRIPLE}-noop
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++
# Note: Toolchain file support is currently in debian Experimental:
# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake