mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 08:24:25 +01:00
Sync arm64 wtih other crosstool-ng targets
This commit is contained in:
parent
d3cd828db0
commit
87d8255f03
@ -19,6 +19,7 @@ RUN apt-get update --yes && apt-get install --no-install-recommends --yes \
|
||||
gawk \
|
||||
gperf \
|
||||
help2man \
|
||||
python-dev \
|
||||
texinfo \
|
||||
&& apt-get clean --yes
|
||||
|
||||
|
@ -5,9 +5,10 @@ ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG REPO=http://cdn-fastly.deb.debian.org
|
||||
|
||||
RUN \
|
||||
bash -c "echo \"deb $REPO/debian jessie main\" > /etc/apt/sources.list" && \
|
||||
bash -c "echo \"deb $REPO/debian jessie-updates 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 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 http://ftp.debian.org/debian jessie-backports main\" >> /etc/apt/sources.list" && \
|
||||
apt-get update --yes && \
|
||||
apt-get install --no-install-recommends --yes \
|
||||
automake \
|
||||
@ -43,4 +44,3 @@ RUN \
|
||||
apt-get clean --yes && \
|
||||
/buildscripts/install-gosu-binary.sh && \
|
||||
rm -rf /buildscripts
|
||||
|
||||
|
@ -1,47 +1,37 @@
|
||||
FROM dockcross/base:latest
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
|
||||
# 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
|
||||
# This is for 64-bit ARM Linux machine
|
||||
|
||||
#include "common.crosstool"
|
||||
|
||||
WORKDIR /usr/src
|
||||
|
||||
RUN apt-get install -y libglib2.0-dev zlib1g-dev libpixman-1-dev && \
|
||||
curl -L http://wiki.qemu-project.org/download/qemu-2.6.0.tar.bz2 | tar xj && \
|
||||
cd qemu-2.6.0 && \
|
||||
./configure --target-list=aarch64-linux-user --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd .. && rm -rf qemu-2.6.0
|
||||
# The cross-compiling emulator
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
qemu-user \
|
||||
qemu-user-static \
|
||||
&& apt-get clean --yes
|
||||
|
||||
# The CROSS_TRIPLE is a configured alias of the "aarch64-unknown-linux-gnueabi" target.
|
||||
ENV CROSS_TRIPLE aarch64-unknown-linux-gnueabi
|
||||
ENV CROSS_ROOT /usr/bin/${CROSS_TRIPLE}
|
||||
ENV AS=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-as \
|
||||
AR=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-ar \
|
||||
CC=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-gcc \
|
||||
CPP=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-g++ \
|
||||
LD=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-ld \
|
||||
FC=/usr/bin/${CROSS_TRIPLE}/bin/${CROSS_TRIPLE}-gfortran
|
||||
|
||||
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}
|
||||
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
|
||||
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
|
||||
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
|
||||
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \
|
||||
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
|
||||
WORKDIR /work
|
||||
|
||||
# Note: Toolchain file support is currently in debian Experimental according to:
|
||||
# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29
|
||||
# We can switch to that when it becomes stable.
|
||||
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
|
||||
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
||||
|
||||
ENV PKG_CONFIG_PATH /usr/lib/aarch64-linux-gnu/pkgconfig
|
||||
|
||||
# Build-time metadata as defined at http://label-schema.org
|
||||
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-url=$VCS_URL \
|
||||
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_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(cross_triple "aarch64-unknown-linux-gnueabi")
|
||||
set(cross_root /usr/xcc/${cross_triple})
|
||||
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
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_LIBRARY 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_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_SYSROOT ${cross_root}/${cross_triple}/sysroot)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64)
|
||||
|
@ -32,7 +32,7 @@ CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_WORK_DIR="${CT_TOP_DIR}/.build"
|
||||
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_REMOVE_DOCS=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_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_LIBRARY 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)
|
||||
|
@ -9,9 +9,10 @@ set(CMAKE_C_COMPILER $ENV{CC})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
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_LIBRARY 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)
|
||||
|
Loading…
Reference in New Issue
Block a user