From af5c3fececf6e923632fd3fe01677290dae5f8c3 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 6 Apr 2016 16:48:12 -0400 Subject: [PATCH] linux-x86: Update and add testing. --- Makefile | 2 +- circle.yml | 4 ++++ linux-x86/Dockerfile | 41 +++++++++++++++++------------------------ 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 9603197..f553801 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ browser-asmjs: base browser-asmjs/Dockerfile $(DOCKER) build -t $(IMAGE)-browser-asmjs browser-asmjs linux-x86: - $(DOCKER) build -t $(IMAGE)-darwin-x86 darwin-x86 + $(DOCKER) build -t $(IMAGE)-linux-x86 linux-x86 linux-x64: $(DOCKER) build -t $(IMAGE)-linux-x64 linux-x64 diff --git a/circle.yml b/circle.yml index b07e074..32c6ef9 100644 --- a/circle.yml +++ b/circle.yml @@ -12,6 +12,7 @@ dependencies: - docker pull thewtex/cross-compiler-linux-armv7 - docker pull thewtex/cross-compiler-linux-ppc64le - docker pull thewtex/cross-compiler-linux-x64 + - docker pull thewtex/cross-compiler-linux-x86 test: override: @@ -29,6 +30,8 @@ test: - docker run --rm -v ~/cross-compilers/test/:/usr/src/test:ro thewtex/cross-compiler-linux-ppc64le python /usr/src/test/run.py --emulator /usr/bin/qemu-ppc64le --languages C - make linux-x64 - docker run --rm -v ~/cross-compilers/test/:/usr/src/test:ro thewtex/cross-compiler-linux-x64 python /usr/src/test/run.py + - make linux-x86 + - docker run --rm -v ~/cross-compilers/test/:/usr/src/test:ro thewtex/cross-compiler-linux-x86 python /usr/src/test/run.py deployment: hub: @@ -42,3 +45,4 @@ deployment: - docker push thewtex/cross-compiler-linux-armv7 - docker push thewtex/cross-compiler-linux-ppc64le - docker push thewtex/cross-compiler-linux-x64 + - docker push thewtex/cross-compiler-linux-x86 diff --git a/linux-x86/Dockerfile b/linux-x86/Dockerfile index eeec849..191bfab 100644 --- a/linux-x86/Dockerfile +++ b/linux-x86/Dockerfile @@ -1,28 +1,21 @@ -FROM steeve/cross-compiler:base -MAINTAINER Steeve Morin "steeve.morin@gmail.com" +FROM thewtex/cross-compiler-base +MAINTAINER Matt McCormick "matt.mccormick@kitware.com" -RUN apt-get update && apt-get -y install \ - gcc-multilib \ - g++-multilib +RUN dpkg --add-architecture i386 && \ + apt-get update && apt-get -y install \ + gcc-multilib \ + g++-multilib ENV CROSS_TRIPLE i686-linux-gnu -ENV CROSS_ROOT /usr/i686-linux-gnu +ENV CROSS_ROOT /usr/${CROSS_TRIPLE} ENV PATH ${PATH}:${CROSS_ROOT}/bin -ENV LD_LIBRARY_PATH ${CROSS_ROOT}/lib:${LD_LIBRARY_PATH} - -COPY ${CROSS_TRIPLE}.sh /usr/bin/${CROSS_TRIPLE}.sh -RUN mkdir -p ${CROSS_ROOT} && \ - cd /usr/bin && \ - chmod +x ${CROSS_TRIPLE}.sh && \ - ln -s x86_64-linux-gnu-gcc x86_64-linux-gnu-cc && \ - ln -s x86_64-linux-gnu-g++ x86_64-linux-gnu-c++ && \ - ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-gcc && \ - ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-cc && \ - ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-g++ && \ - ln -s ${CROSS_TRIPLE}.sh ${CROSS_TRIPLE}-c++ && \ - for i in strip objdump; do \ - ln -s ${i} ${CROSS_TRIPLE}-${i} ; \ - done && \ - for i in ranlib nm ar; do \ - ln -s x86_64-linux-gnu-gcc-${i}-4.7 ${CROSS_TRIPLE}-${i} ; \ - done +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++