mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-10 21:19:26 +02:00
Implement "ct-ng" building, add "linux-mips".
Add a mechanism to construct a full cross-compiler environment using the "crosstool-ng" cross-compiler building utility. This is implemented in the new "common.crosstool" include, and augments the "dockcross/base" base image. Update Makefile to consolidate Dockerfile generation, notably the "sed"-based inclusion directives. Finally, employ all of this to generate a "linux-mips" 32-bit hard-float MIPS cross-compiler Dockcross image.
This commit is contained in:

committed by
Matt McCormick

parent
fd4115953d
commit
7dd46fa045
46
common.crosstool
Normal file
46
common.crosstool
Normal file
@ -0,0 +1,46 @@
|
||||
# crosstool.common
|
||||
#
|
||||
# Common Docker instructions to install "crosstool-ng" and build a full
|
||||
# cross-compiler suite from a crosstool-ng configuration, CROSSTOOL_CONFIG.
|
||||
#
|
||||
# This import complements the "dockcross/base" image, adding:
|
||||
# - "ct-ng", a cross-compiler building utilty.
|
||||
# - A cross-compiler suite configured in "crosstool-ng.config".
|
||||
#
|
||||
# The generated cross-compiler will have a CROSS_ROOT of:
|
||||
# ${XCC_PREFIX}/${CROSS_TRIPLE}
|
||||
#
|
||||
# A given platform will need to supply the appropriate "crosstool-ng.config" to
|
||||
# generate its cross-compiler. This can be built using "ct-ng menuconfig" to
|
||||
# generate a configuration.
|
||||
|
||||
# Install Debian packages required for `ct-ng`.
|
||||
RUN apt-get update --yes && apt-get install --no-install-recommends --yes \
|
||||
gawk \
|
||||
gperf \
|
||||
help2man \
|
||||
texinfo \
|
||||
&& apt-get clean --yes
|
||||
|
||||
ENV XCC_PREFIX=/usr/xcc
|
||||
|
||||
# Add the crosstool-ng script and image-specific toolchain configuration into
|
||||
# /dockcross/.
|
||||
#
|
||||
# Afterwards, we will leave the "ct-ng" config in the image as a reference
|
||||
# for users.
|
||||
COPY \
|
||||
imagefiles/install-crosstool-ng-toolchain.sh \
|
||||
crosstool-ng.config \
|
||||
/dockcross/
|
||||
|
||||
# Build and install the toolchain, cleaning up artifacts afterwards.
|
||||
RUN mkdir /dockcross/crosstool \
|
||||
&& cd /dockcross/crosstool \
|
||||
&& /dockcross/install-crosstool-ng-toolchain.sh \
|
||||
-p "${XCC_PREFIX}" \
|
||||
-c /dockcross/crosstool-ng.config \
|
||||
&& rm -rf /dockcross/crosstool /dockcross/install-crosstool-ng-toolchain.sh
|
||||
|
||||
# Restore our default workdir (from "dockcross/base").
|
||||
WORKDIR /work
|
Reference in New Issue
Block a user