mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 16:24:27 +01:00
Update README ans tools scripts
Update README ans tools scripts Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
fd49a1de52
commit
b5dc5e6488
12
README.md
12
README.md
@ -13,13 +13,14 @@ Cross compiling toolchains in Docker images.
|
||||
- Most images also contain an emulator for the target system.
|
||||
- Clean separation of build tools, source code, and build artifacts.
|
||||
- Commands in the container are run as the calling user, so that any created files have the expected ownership, (i.e. not root).
|
||||
- Make variables **CC**, **CXX**, **LD** etc) are set to point to the appropriate tools in the container.
|
||||
- Make variables **CC**, **CXX**, **LD**, **AS** etc) are set to point to the appropriate tools in the container.
|
||||
- Recent [CMake](https://cmake.org) and ninja are precompiled.
|
||||
- [Conan.io](https://www.conan.io) can be used as a package manager.
|
||||
- Toolchain files configured for CMake.
|
||||
- Current directory is mounted as the container\'s workdir, `/work`.
|
||||
- Works with the [Docker for Mac](https://docs.docker.com/docker-for-mac/) and [Docker for Windows](https://docs.docker.com/docker-for-windows/).
|
||||
- Support using alternative container executor by setting **OCI_EXE** environment variable. By default, it searches for [docker](https://www.docker.com) and [podman](https://podman.io) executable.
|
||||
- [crosstool-ng](https://github.com/crosstool-ng/crosstool-ng) and [buildroot](https://github.com/buildroot/buildroot) configuration files.
|
||||
|
||||
## Examples
|
||||
|
||||
@ -46,7 +47,7 @@ To install the helper script, run one of the images with no arguments, and redir
|
||||
|
||||
Where **CROSS_COMPILER_IMAGE_NAME** is the name of the cross-compiler toolchain Docker instance, e.g: **dockcross/linux-armv7**.
|
||||
|
||||
Only 64-bit x86_64 images are provided; a 64-bit x86_64 host system is required.
|
||||
Only 64-bit x86_64 images are provided, a 64-bit x86_64 host system is required.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -73,6 +74,7 @@ The dockcross script will execute the given command-line inside the container, a
|
||||
| dockcross/android-x86 | x86 | Clang | Android |
|
||||
| dockcross/android-x86_64 | x86_64 | Clang | Android |
|
||||
| dockcross/linux-arm64 | ARMv8 | GCC | Linux |
|
||||
| dockcross/linux-arm64-full | ARMv8 | GCC | Linux |
|
||||
| dockcross/linux-arm64-musl | ARMv8 | GCC + musl | Linux |
|
||||
| dockcross/linux-armv5 | ARMv5 | GCC | Linux |
|
||||
| dockcross/linux-armv5-musl | ARMv5 | GCC + musl | Linux |
|
||||
@ -140,6 +142,12 @@ The Android NDK standalone toolchain for the x86_64 architecture.
|
||||
|
||||
Cross compiler for the 64-bit ARM platform on Linux, also known as AArch64.
|
||||
|
||||
### dockcross/linux-arm64-full
|
||||
|
||||
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dockcross/linux-arm64-full/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/dockcross/linux-arm64-full)
|
||||
|
||||
Cross compiler for the 64-bit ARM platform on Linux, with cross-libs: SDL2, OpenSSL, Boost, OpenCV and Qt5 (minimal).
|
||||
|
||||
### dockcross/linux-arm64-musl
|
||||
|
||||
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dockcross/linux-arm64-musl/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/dockcross/linux-arm64-musl)
|
||||
|
23
tools/dockcross-make-builder.sh
Executable file
23
tools/dockcross-make-builder.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (( $# >= 1 )); then
|
||||
image=$1
|
||||
build_file=build-${image%:*}
|
||||
shift 1
|
||||
|
||||
make_arg=$*
|
||||
echo "make arg: $make_arg"
|
||||
|
||||
#echo "Pulling dockcross/$image"
|
||||
#docker pull dockcross/"$image"
|
||||
|
||||
echo "Make script dockcross-$image"
|
||||
docker run --rm dockcross/"$image" > ./dockcross-"$image"
|
||||
chmod +x ./dockcross-"$image"
|
||||
|
||||
echo "Build $build_file"
|
||||
./dockcross-"$image" bash -c 'make CXX=${CXX} CC=${CC} AR=${AR} AS=${AS} LD=${LD} CPP=${CPP} FC=${FC} '"$make_arg"
|
||||
else
|
||||
echo "Usage: ${0##*/} <docker imag (ex: linux-x64/linux-x64-clang/linux-arm64/windows-shared-x64/windows-static-x64...)> <make arg.>"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user