mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-01-22 22:25:41 +01:00
Merge pull request #227 from andre-richter/arm64-revamp
Revisit ARM64 move to crosstool-ng
This commit is contained in:
commit
648399c8a4
@ -19,6 +19,7 @@ RUN apt-get update --yes && apt-get install --no-install-recommends --yes \
|
|||||||
gawk \
|
gawk \
|
||||||
gperf \
|
gperf \
|
||||||
help2man \
|
help2man \
|
||||||
|
python-dev \
|
||||||
texinfo \
|
texinfo \
|
||||||
&& apt-get clean --yes
|
&& apt-get clean --yes
|
||||||
|
|
||||||
|
@ -5,9 +5,10 @@ ARG DEBIAN_FRONTEND=noninteractive
|
|||||||
ARG REPO=http://cdn-fastly.deb.debian.org
|
ARG REPO=http://cdn-fastly.deb.debian.org
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
bash -c "echo \"deb $REPO/debian jessie main\" > /etc/apt/sources.list" && \
|
bash -c "echo \"deb $REPO/debian jessie main contrib non-free\" > /etc/apt/sources.list" && \
|
||||||
bash -c "echo \"deb $REPO/debian jessie-updates main\" >> /etc/apt/sources.list" && \
|
bash -c "echo \"deb $REPO/debian jessie-updates main contrib non-free\" >> /etc/apt/sources.list" && \
|
||||||
bash -c "echo \"deb $REPO/debian-security jessie/updates main\" >> /etc/apt/sources.list" && \
|
bash -c "echo \"deb $REPO/debian-security jessie/updates main\" >> /etc/apt/sources.list" && \
|
||||||
|
bash -c "echo \"deb http://ftp.debian.org/debian jessie-backports main\" >> /etc/apt/sources.list" && \
|
||||||
apt-get update --yes && \
|
apt-get update --yes && \
|
||||||
apt-get install --no-install-recommends --yes \
|
apt-get install --no-install-recommends --yes \
|
||||||
automake \
|
automake \
|
||||||
@ -43,4 +44,3 @@ RUN \
|
|||||||
apt-get clean --yes && \
|
apt-get clean --yes && \
|
||||||
/buildscripts/install-gosu-binary.sh && \
|
/buildscripts/install-gosu-binary.sh && \
|
||||||
rm -rf /buildscripts
|
rm -rf /buildscripts
|
||||||
|
|
||||||
|
@ -1,47 +1,37 @@
|
|||||||
FROM dockcross/base:latest
|
FROM dockcross/base:latest
|
||||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
|
||||||
|
|
||||||
|
# This is for 64-bit ARM Linux machine
|
||||||
# Add sources.list
|
|
||||||
COPY sources.list /etc/apt/sources.list
|
|
||||||
RUN dpkg --add-architecture arm64 ; apt-get update ; apt-get -y upgrade ; apt-get update ;
|
|
||||||
RUN apt-get install -y \
|
|
||||||
libbz2-dev:arm64 \
|
|
||||||
libexpat1-dev:arm64 \
|
|
||||||
ncurses-dev:arm64 \
|
|
||||||
libssl-dev:arm64 \
|
|
||||||
python-dev
|
|
||||||
|
|
||||||
#include "common.crosstool"
|
#include "common.crosstool"
|
||||||
|
|
||||||
WORKDIR /usr/src
|
# The cross-compiling emulator
|
||||||
|
RUN apt-get update \
|
||||||
RUN apt-get install -y libglib2.0-dev zlib1g-dev libpixman-1-dev && \
|
&& apt-get install -y \
|
||||||
curl -L http://wiki.qemu-project.org/download/qemu-2.6.0.tar.bz2 | tar xj && \
|
qemu-user \
|
||||||
cd qemu-2.6.0 && \
|
qemu-user-static \
|
||||||
./configure --target-list=aarch64-linux-user --prefix=/usr && \
|
&& apt-get clean --yes
|
||||||
make -j$(nproc) && \
|
|
||||||
make install && \
|
|
||||||
cd .. && rm -rf qemu-2.6.0
|
|
||||||
|
|
||||||
|
# The CROSS_TRIPLE is a configured alias of the "aarch64-unknown-linux-gnueabi" target.
|
||||||
ENV CROSS_TRIPLE aarch64-unknown-linux-gnueabi
|
ENV CROSS_TRIPLE aarch64-unknown-linux-gnueabi
|
||||||
ENV CROSS_ROOT /usr/bin/${CROSS_TRIPLE}
|
|
||||||
ENV AS=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-as \
|
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}
|
||||||
AR=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-ar \
|
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
|
||||||
CC=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-gcc \
|
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
|
||||||
CPP=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-cpp \
|
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
|
||||||
CXX=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-g++ \
|
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
|
||||||
LD=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-ld \
|
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \
|
||||||
FC=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-gfortran
|
LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld \
|
||||||
|
FC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gfortran
|
||||||
|
|
||||||
|
ENV QEMU_LD_PREFIX "${CROSS_ROOT}/${CROSS_TRIPLE}/sysroot"
|
||||||
|
ENV QEMU_SET_ENV "LD_LIBRARY_PATH=${CROSS_ROOT}/lib:${QEMU_LD_PREFIX}"
|
||||||
|
|
||||||
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/linux-arm64
|
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/linux-arm64
|
||||||
WORKDIR /work
|
|
||||||
|
|
||||||
# Note: Toolchain file support is currently in debian Experimental according to:
|
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||||
# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29
|
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
||||||
# We can switch to that when it becomes stable.
|
|
||||||
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
|
ENV PKG_CONFIG_PATH /usr/lib/aarch64-linux-gnu/pkgconfig
|
||||||
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
|
|
||||||
|
|
||||||
# Build-time metadata as defined at http://label-schema.org
|
# Build-time metadata as defined at http://label-schema.org
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -53,5 +43,3 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
|
|||||||
org.label-schema.vcs-ref=$VCS_REF \
|
org.label-schema.vcs-ref=$VCS_REF \
|
||||||
org.label-schema.vcs-url=$VCS_URL \
|
org.label-schema.vcs-url=$VCS_URL \
|
||||||
org.label-schema.schema-version="1.0"
|
org.label-schema.schema-version="1.0"
|
||||||
|
|
||||||
ENV PKG_CONFIG_PATH /usr/lib/aarch64-linux-gnu/pkgconfig
|
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
|
|
||||||
set(CMAKE_SYSTEM_NAME Linux)
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
set(CMAKE_SYSTEM_VERSION 1)
|
set(CMAKE_SYSTEM_VERSION 1)
|
||||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||||
|
|
||||||
set(cross_triple "aarch64-unknown-linux-gnueabi")
|
set(cross_triple "aarch64-unknown-linux-gnueabi")
|
||||||
|
set(cross_root /usr/xcc/${cross_triple})
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER $ENV{CC})
|
set(CMAKE_C_COMPILER $ENV{CC})
|
||||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||||
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})
|
set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple})
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
set(CMAKE_SYSROOT /usr/bin/aarch64-unknown-linux-gnueabi/aarch64-unknown-linux-gnueabi/sysroot)
|
set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-I /usr/bin/aarch64-unknown-linux-gnueabi/include")
|
|
||||||
set(ADDITIONAL_COMPILER_FLAGS "-L /usr/lib/aarch64-linux-gnu -Wl,-rpath-link,/usr/lib/aarch64-linux-gnu -Wl,-rpath-link,/lib/aarch64-linux-gnu")
|
|
||||||
|
|
||||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64)
|
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64)
|
||||||
|
@ -32,7 +32,7 @@ CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
|||||||
CT_SAVE_TARBALLS=y
|
CT_SAVE_TARBALLS=y
|
||||||
CT_WORK_DIR="${CT_TOP_DIR}/.build"
|
CT_WORK_DIR="${CT_TOP_DIR}/.build"
|
||||||
CT_BUILD_TOP_DIR="${CT_WORK_DIR}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}"
|
CT_BUILD_TOP_DIR="${CT_WORK_DIR}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}"
|
||||||
CT_PREFIX_DIR="/usr/bin/${CT_TARGET}"
|
CT_PREFIX_DIR="${CT_PREFIX:-${HOME}/x-tools}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}"
|
||||||
CT_RM_RF_PREFIX_DIR=y
|
CT_RM_RF_PREFIX_DIR=y
|
||||||
CT_REMOVE_DOCS=y
|
CT_REMOVE_DOCS=y
|
||||||
CT_PREFIX_DIR_RO=y
|
CT_PREFIX_DIR_RO=y
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
#------------------------------------------------------------------------------#
|
|
||||||
# OFFICIAL DEBIAN REPOS
|
|
||||||
#------------------------------------------------------------------------------#
|
|
||||||
|
|
||||||
###### Debian Main Repos
|
|
||||||
deb http://deb.debian.org/debian/ oldstable main contrib non-free
|
|
||||||
|
|
||||||
deb http://deb.debian.org/debian/ oldstable-updates main contrib non-free
|
|
||||||
|
|
||||||
deb http://deb.debian.org/debian-security oldstable/updates main
|
|
||||||
|
|
||||||
deb http://ftp.debian.org/debian jessie-backports main
|
|
@ -9,9 +9,10 @@ set(CMAKE_C_COMPILER $ENV{CC})
|
|||||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||||
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH ${cross_root}/lib ${cross_root}/${cross_triple}/lib)
|
set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple})
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot)
|
||||||
|
|
||||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-mips)
|
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-mips)
|
||||||
|
@ -9,9 +9,10 @@ set(CMAKE_C_COMPILER $ENV{CC})
|
|||||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||||
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
set(CMAKE_Fortran_COMPILER $ENV{FC})
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH ${cross_root}/lib ${cross_root}/${cross_triple}/lib)
|
set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple})
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot)
|
||||||
|
|
||||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-s390x)
|
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-s390x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user