mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 16:24:27 +01:00
linux-armv7: Add CMake and GFortran support.
This commit is contained in:
parent
bb7e754015
commit
a04f06eecc
2
Makefile
2
Makefile
@ -16,7 +16,7 @@ linux-x64:
|
||||
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
|
||||
|
||||
windows-x86: base windows-x86/Dockerfile windows-x86/settings.mk
|
||||
|
@ -1,5 +1,5 @@
|
||||
FROM rburns/cross-compiler:base
|
||||
MAINTAINER Steeve Morin "steeve.morin@gmail.com"
|
||||
FROM thewtex/cross-compiler-base
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
# Add the cross compiler sources
|
||||
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 -
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
crossbuild-essential-armhf
|
||||
crossbuild-essential-armhf \
|
||||
gfortran-arm-linux-gnueabihf
|
||||
|
||||
ENV CROSS_TRIPLE arm-linux-gnueabihf
|
||||
ENV CROSS_ROOT /usr/${CROSS_TRIPLE}
|
||||
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
||||
ENV LD_LIBRARY_PATH ${CROSS_ROOT}/lib:${LD_LIBRARY_PATH}
|
||||
WORKDIR /usr/src
|
||||
|
||||
RUN cd /usr/bin && \
|
||||
ln -s ${CROSS_TRIPLE}-gcc-4.9 ${CROSS_TRIPLE}-cc && \
|
||||
ln -s ${CROSS_TRIPLE}-g++-4.9 ${CROSS_TRIPLE}-c++
|
||||
COPY Toolchain.cmake /usr/src/
|
||||
ENV CMAKE_TOOLCHAIN_FILE /usr/src/Toolchain.cmake
|
||||
|
13
linux-armv7/Toolchain.cmake
Normal file
13
linux-armv7/Toolchain.cmake
Normal 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)
|
Loading…
Reference in New Issue
Block a user