linux-armv7: Add CMake and GFortran support.

This commit is contained in:
Matt McCormick 2015-05-09 07:48:53 -04:00
parent bb7e754015
commit a04f06eecc
3 changed files with 23 additions and 13 deletions

View File

@ -16,7 +16,7 @@ linux-x64:
linux-armv6: linux-armv6:
$(DOCKER) build -t $(IMAGE)-linux-armv6 linux-armv6 $(DOCKER) build -t $(IMAGE)-linux-armv6 linux-armv6
linux-armv7: linux-armv7: base linux-armv7/Dockerfile linux-armv7/Toolchain.cmake
$(DOCKER) build -t $(IMAGE)-linux-armv7 linux-armv7 $(DOCKER) build -t $(IMAGE)-linux-armv7 linux-armv7
windows-x86: base windows-x86/Dockerfile windows-x86/settings.mk windows-x86: base windows-x86/Dockerfile windows-x86/settings.mk

View File

@ -1,5 +1,5 @@
FROM rburns/cross-compiler:base FROM thewtex/cross-compiler-base
MAINTAINER Steeve Morin "steeve.morin@gmail.com" MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
# Add the cross compiler sources # Add the cross compiler sources
RUN echo "deb http://emdebian.org/tools/debian/ jessie main" >> /etc/apt/sources.list && \ RUN echo "deb http://emdebian.org/tools/debian/ jessie main" >> /etc/apt/sources.list && \
@ -7,13 +7,10 @@ RUN echo "deb http://emdebian.org/tools/debian/ jessie main" >> /etc/apt/sources
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
crossbuild-essential-armhf crossbuild-essential-armhf \
gfortran-arm-linux-gnueabihf
ENV CROSS_TRIPLE arm-linux-gnueabihf WORKDIR /usr/src
ENV CROSS_ROOT /usr/${CROSS_TRIPLE}
ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV LD_LIBRARY_PATH ${CROSS_ROOT}/lib:${LD_LIBRARY_PATH}
RUN cd /usr/bin && \ COPY Toolchain.cmake /usr/src/
ln -s ${CROSS_TRIPLE}-gcc-4.9 ${CROSS_TRIPLE}-cc && \ ENV CMAKE_TOOLCHAIN_FILE /usr/src/Toolchain.cmake
ln -s ${CROSS_TRIPLE}-g++-4.9 ${CROSS_TRIPLE}-c++

View File

@ -0,0 +1,13 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(cross_triple "arm-linux-gnueabihf")
set(CMAKE_C_COMPILER /usr/bin/${cross_triple}-cc)
set(CMAKE_CXX_COMPILER /usr/bin/${cross_triple}-c++)
set(CMAKE_Fortran_COMPILER /usr/bin/${cross_triple}-gfortran)
set(CMAKE_FIND_ROOT_PATH /usr/${cross_triple})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)