mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-24 20:03:34 +02:00
Compare commits
38 Commits
move_to_bo
...
88c04a4ba6
Author | SHA1 | Date | |
---|---|---|---|
88c04a4ba6 | |||
d292408a32 | |||
20a1bd6ae4 | |||
0b5e4fbf2e | |||
518fe0572e | |||
72a6a72d80 | |||
2c6c0a52fb | |||
d4e7c0aff2 | |||
8106a3b245 | |||
488369f3d7 | |||
f52fb3821a | |||
a8e3072e4f | |||
e40a33d02b | |||
00e75583b2 | |||
0ee05c1f5a | |||
9f4fe90923 | |||
50120593a3 | |||
ba27b1fc51 | |||
55d275535c | |||
9e57d2bd8f | |||
137dda204d | |||
3ac4aed3aa | |||
50baccd0fa | |||
fa87501f12 | |||
6eda62728a | |||
6dfa69bdaa | |||
24f9bdefe2 | |||
eaba673170 | |||
7e034e5282 | |||
424b61e9ec | |||
4e4d3ad7ed | |||
9476e910d9 | |||
f93e2f73bf | |||
a5f9b49a37 | |||
0b56496e9c | |||
e5106c5fd4 | |||
4282105d11 | |||
ae06c00377 |
2
.github/workflows/expired.yml
vendored
2
.github/workflows/expired.yml
vendored
@ -6,7 +6,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v8
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
exempt-issue-milestones: 'future,alpha,beta,release,bugfix,improvement,enhancement,help wanted'
|
exempt-issue-milestones: 'future,alpha,beta,release,bugfix,improvement,enhancement,help wanted'
|
||||||
|
37
.github/workflows/main.yml
vendored
37
.github/workflows/main.yml
vendored
@ -24,7 +24,15 @@ jobs:
|
|||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
|
env:
|
||||||
|
BUILD_CMD: buildx build --platform linux/amd64,linux/arm64
|
||||||
run: make base
|
run: make base
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
@ -33,14 +41,14 @@ jobs:
|
|||||||
- name: archive base
|
- name: archive base
|
||||||
run: |
|
run: |
|
||||||
mkdir -p cache
|
mkdir -p cache
|
||||||
docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz
|
docker export dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz
|
||||||
|
|
||||||
- name: save base
|
- name: save base
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cache
|
name: cache
|
||||||
path: ./cache
|
path: ./cache
|
||||||
retention-days: 1
|
retention-days: 3
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
@ -1031,6 +1039,25 @@ jobs:
|
|||||||
cpython: "no",
|
cpython: "no",
|
||||||
cpython_arg: "",
|
cpython_arg: "",
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
image: "web-wasi-threads",
|
||||||
|
stockfish: "no",
|
||||||
|
stockfish_arg: "",
|
||||||
|
ninja: "no",
|
||||||
|
ninja_arg: "",
|
||||||
|
openssl: "no",
|
||||||
|
openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso",
|
||||||
|
C: "no",
|
||||||
|
C_arg: "",
|
||||||
|
C-Plus-Plus: "no",
|
||||||
|
C-Plus-Plus_arg: "",
|
||||||
|
fmt: "no",
|
||||||
|
fmt_arg: "",
|
||||||
|
raylib: "no",
|
||||||
|
raylib_arg: "",
|
||||||
|
cpython: "no",
|
||||||
|
cpython_arg: "",
|
||||||
|
}
|
||||||
# Bare metal images
|
# Bare metal images
|
||||||
- {
|
- {
|
||||||
image: "bare-armv7emhf-nano_newlib",
|
image: "bare-armv7emhf-nano_newlib",
|
||||||
@ -1062,13 +1089,13 @@ jobs:
|
|||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cache
|
name: cache
|
||||||
path: ./cache
|
path: ./cache
|
||||||
|
|
||||||
- name: load base
|
- name: load base
|
||||||
run: xz -d -k < ./cache/base.tar.xz | docker load
|
run: xz -d -k < ./cache/base.tar.xz | docker import - dockcross/base:latest
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: make ${{ matrix.arch_name.image }}
|
run: make ${{ matrix.arch_name.image }}
|
||||||
|
@ -67,7 +67,7 @@ We will take the example of `aarch64-rpi4-linux-gnu`, a `.config` file will be c
|
|||||||
*Alternatively*, we could copy an existing `crosstool-ng.config` from one of the target folders in the `dockcross` project to the local `.config`:
|
*Alternatively*, we could copy an existing `crosstool-ng.config` from one of the target folders in the `dockcross` project to the local `.config`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp path/to/dockcross/linux-arm64 .config
|
cp path/to/dockcross/linux-arm64/crosstool-ng.config .config
|
||||||
```
|
```
|
||||||
|
|
||||||
We will configure the toolchains according to our needs:
|
We will configure the toolchains according to our needs:
|
||||||
@ -115,7 +115,7 @@ set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot)
|
|||||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm64)
|
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm64)
|
||||||
```
|
```
|
||||||
|
|
||||||
Then ou must change these lines according to the targeted architecture, here **ARM64**:
|
Then you must change these lines according to the targeted architecture, here **ARM64**:
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
set(CMAKE_SYSTEM_PROCESSOR ARM64)
|
set(CMAKE_SYSTEM_PROCESSOR ARM64)
|
||||||
@ -174,7 +174,7 @@ ENV ARCH arm64
|
|||||||
#include "common.label-and-env"
|
#include "common.label-and-env"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then ou must change these lines according to the targeted architecture.
|
Then you must change these lines according to the targeted architecture.
|
||||||
|
|
||||||
Here you have to change the value according to the name of the toolchain (./ct-ng show-tuple):
|
Here you have to change the value according to the name of the toolchain (./ct-ng show-tuple):
|
||||||
|
|
||||||
|
39
Makefile
39
Makefile
@ -4,7 +4,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Name of the docker executable
|
# Name of the docker executable
|
||||||
DOCKER := docker
|
DOCKER := $(or $(OCI_EXE), docker)
|
||||||
|
|
||||||
|
# The build sub-command. Use:
|
||||||
|
#
|
||||||
|
# export "BUILD_CMD=buildx build --platform linux/amd64,linux/arm64"
|
||||||
|
#
|
||||||
|
# to generate multi-platform images.
|
||||||
|
BUILD_CMD := $(or $(BUILD_CMD), build)
|
||||||
|
|
||||||
# Docker organization to pull the images from
|
# Docker organization to pull the images from
|
||||||
ORG = dockcross
|
ORG = dockcross
|
||||||
@ -30,7 +37,7 @@ GEN_IMAGES := android-arm android-arm64 \
|
|||||||
manylinux_2_28-x64 \
|
manylinux_2_28-x64 \
|
||||||
manylinux2014-x64 manylinux2014-x86 \
|
manylinux2014-x64 manylinux2014-x86 \
|
||||||
manylinux2014-aarch64 linux-arm64-lts \
|
manylinux2014-aarch64 linux-arm64-lts \
|
||||||
web-wasm web-wasi linux-mips linux-mips-uclibc linux-mips-lts windows-arm64 windows-armv7 \
|
web-wasm web-wasi web-wasi-threads linux-mips linux-mips-uclibc linux-mips-lts windows-arm64 windows-armv7 \
|
||||||
windows-static-x86 windows-static-x64 windows-static-x64-posix \
|
windows-static-x86 windows-static-x64 windows-static-x64-posix \
|
||||||
windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \
|
windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \
|
||||||
linux-armv7 linux-armv7a linux-armv7l-musl linux-armv7-lts linux-armv7a-lts linux-x86_64-full \
|
linux-armv7 linux-armv7a linux-armv7l-musl linux-armv7-lts linux-armv7a-lts linux-x86_64-full \
|
||||||
@ -43,7 +50,7 @@ GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES))
|
|||||||
|
|
||||||
# These images are expected to have explicit rules for *both* build and testing
|
# These images are expected to have explicit rules for *both* build and testing
|
||||||
NON_STANDARD_IMAGES := manylinux_2_28-x64 manylinux2014-x64 manylinux2014-x86 \
|
NON_STANDARD_IMAGES := manylinux_2_28-x64 manylinux2014-x64 manylinux2014-x86 \
|
||||||
manylinux2014-aarch64 web-wasm
|
manylinux2014-aarch64 web-wasm web-wasi-threads
|
||||||
|
|
||||||
# Docker composite files
|
# Docker composite files
|
||||||
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux2014 common.manylinux_2_28 common.buildroot \
|
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux2014 common.manylinux_2_28 common.buildroot \
|
||||||
@ -118,7 +125,7 @@ $(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOS
|
|||||||
web-wasm: web-wasm/Dockerfile
|
web-wasm: web-wasm/Dockerfile
|
||||||
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
||||||
cp -r test web-wasm/
|
cp -r test web-wasm/
|
||||||
$(DOCKER) build -t $(ORG)/web-wasm:$(TAG) \
|
$(DOCKER) $(BUILD_CMD) -t $(ORG)/web-wasm:$(TAG) \
|
||||||
-t $(ORG)/web-wasm:latest \
|
-t $(ORG)/web-wasm:latest \
|
||||||
--build-arg IMAGE=$(ORG)/web-wasm \
|
--build-arg IMAGE=$(ORG)/web-wasm \
|
||||||
--build-arg VERSION=$(TAG) \
|
--build-arg VERSION=$(TAG) \
|
||||||
@ -136,6 +143,26 @@ web-wasm.test: web-wasm
|
|||||||
rm -rf web-wasm/test
|
rm -rf web-wasm/test
|
||||||
|
|
||||||
#
|
#
|
||||||
|
# web-wasi-threads
|
||||||
|
#
|
||||||
|
web-wasi-threads: web-wasi web-wasi-threads/Dockerfile
|
||||||
|
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
||||||
|
cp -r test web-wasi-threads/
|
||||||
|
$(DOCKER) $(BUILD_CMD) -t $(ORG)/web-wasi-threads:$(TAG) \
|
||||||
|
-t $(ORG)/web-wasi-threads:latest \
|
||||||
|
--build-arg IMAGE=$(ORG)/web-wasi-threads \
|
||||||
|
--build-arg VERSION=$(TAG) \
|
||||||
|
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||||
|
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
||||||
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
|
web-wasi-threads
|
||||||
|
|
||||||
|
web-wasi-threads.test: web-wasi-threads
|
||||||
|
$(DOCKER) run $(RM) $(ORG)/web-wasi-threads:latest > $(BIN)/dockcross-web-wasi-threads \
|
||||||
|
&& chmod +x $(BIN)/dockcross-web-wasi-threads
|
||||||
|
$(BIN)/dockcross-web-wasi-threads -i $(ORG)/web-wasi-threads:latest python3 test/run.py
|
||||||
|
rm -rf web-wasi-threads/test
|
||||||
|
#
|
||||||
# manylinux2014-aarch64
|
# manylinux2014-aarch64
|
||||||
#
|
#
|
||||||
manylinux2014-aarch64: manylinux2014-aarch64/Dockerfile
|
manylinux2014-aarch64: manylinux2014-aarch64/Dockerfile
|
||||||
@ -225,7 +252,7 @@ manylinux2014-x86.test: manylinux2014-x86
|
|||||||
# base
|
# base
|
||||||
#
|
#
|
||||||
base: Dockerfile imagefiles/
|
base: Dockerfile imagefiles/
|
||||||
$(DOCKER) build -t $(ORG)/base:latest \
|
$(DOCKER) $(BUILD_CMD) -t $(ORG)/base:latest \
|
||||||
-t $(ORG)/base:$(TAG) \
|
-t $(ORG)/base:$(TAG) \
|
||||||
--build-arg IMAGE=$(ORG)/base \
|
--build-arg IMAGE=$(ORG)/base \
|
||||||
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
--build-arg VCS_URL=`git config --get remote.origin.url` \
|
||||||
@ -247,7 +274,7 @@ $(VERBOSE).SILENT: display_images
|
|||||||
|
|
||||||
$(STANDARD_IMAGES): %: %/Dockerfile base
|
$(STANDARD_IMAGES): %: %/Dockerfile base
|
||||||
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
||||||
$(DOCKER) build -t $(ORG)/$@:latest \
|
$(DOCKER) $(BUILD_CMD) -t $(ORG)/$@:latest \
|
||||||
-t $(ORG)/$@:$(TAG) \
|
-t $(ORG)/$@:$(TAG) \
|
||||||
--build-arg ORG=$(ORG) \
|
--build-arg ORG=$(ORG) \
|
||||||
--build-arg IMAGE=$(ORG)/$@ \
|
--build-arg IMAGE=$(ORG)/$@ \
|
||||||
|
11
README.md
11
README.md
@ -122,6 +122,7 @@ The dockcross script will execute the given command-line inside the container, a
|
|||||||
| dockcross/linux-x64-tinycc | x86_64 | tinycc + GCC | Linux |
|
| dockcross/linux-x64-tinycc | x86_64 | tinycc + GCC | Linux |
|
||||||
| dockcross/web-wasm | Wasm | LLVM | Web (JS) |
|
| dockcross/web-wasm | Wasm | LLVM | Web (JS) |
|
||||||
| dockcross/web-wasi | Wasm | LLVM | Web (Universal) |
|
| dockcross/web-wasi | Wasm | LLVM | Web (Universal) |
|
||||||
|
| dockcross/web-wasi-threads | Wasm | LLVM | Web (Universal) |
|
||||||
| dockcross/windows-shared-x86 | x86 | GCC | Windows |
|
| dockcross/windows-shared-x86 | x86 | GCC | Windows |
|
||||||
| dockcross/windows-shared-x64 | x86_64 | GCC | Windows |
|
| dockcross/windows-shared-x64 | x86_64 | GCC | Windows |
|
||||||
| dockcross/windows-shared-x64-posix | x86_64 | GCC | Windows |
|
| dockcross/windows-shared-x64-posix | x86_64 | GCC | Windows |
|
||||||
@ -156,7 +157,7 @@ The list of docker images that are **no longer maintained**.
|
|||||||
|
|
||||||
  
|
  
|
||||||
|
|
||||||
Base image for other toolchain images. From Debian Jessie with GCC, make, autotools, CMake, Ninja, Git, and Python.
|
Base image for other toolchain images. From Debian Bookworm with GCC, make, autotools, CMake, Ninja, Git, and Python.
|
||||||
|
|
||||||
### dockcross/android-arm
|
### dockcross/android-arm
|
||||||
|
|
||||||
@ -403,6 +404,12 @@ The [Emscripten](https://emscripten.org/) [WebAssembly](https://webassembly.org/
|
|||||||
|
|
||||||
The [WebAssembly System Interface (WASI)](https://wasi.dev/) SDK LLVM/Clang/WASI Sysroot cross compiler.
|
The [WebAssembly System Interface (WASI)](https://wasi.dev/) SDK LLVM/Clang/WASI Sysroot cross compiler.
|
||||||
|
|
||||||
|
### dockcross/web-wasi-threads
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
The [WebAssembly System Interface (WASI)](https://wasi.dev/) SDK LLVM/Clang/WASI Sysroot cross compiler with the toolchain configured to enable the wasm threading proposal.
|
||||||
|
|
||||||
### dockcross/windows-static-x64
|
### dockcross/windows-static-x64
|
||||||
|
|
||||||
 
|
 
|
||||||
@ -576,7 +583,7 @@ The key difference is that [dockbuild](https://github.com/dockbuild/dockbuild#re
|
|||||||
|
|
||||||
## Build images by yourself
|
## Build images by yourself
|
||||||
|
|
||||||
Prebuilt images available on Docker hub are single architecture amd64 images. Those images work evan on different architectures: for example, if you run a dockcross image on Docker running on an Apple M1, the image will run in emulation mode, meaning that it will still work as expected, although it will be slower than running on native hardware (you can expect a factor or 10 or more).
|
Prebuilt images available on Docker hub are single architecture amd64 images. Those images work even on different architectures: for example, if you run a dockcross image on Docker running on an Apple M1, the image will run in emulation mode, meaning that it will still work as expected, although it will be slower than running on native hardware (you can expect a factor or 10 or more).
|
||||||
|
|
||||||
To overcome this limitation, you can build your own images on non-amd64 architectures. To do so, you can use the `Makefile` provided in this repository. For example, to build the `linux-armv7` image, and provided that your Docker hub organization name is `ACME`, you can run:
|
To overcome this limitation, you can build your own images on non-amd64 architectures. To do so, you can use the `Makefile` provided in this repository. For example, to build the `linux-armv7` image, and provided that your Docker hub organization name is `ACME`, you can run:
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ ARG ORG=dockcross
|
|||||||
FROM ${ORG}/base:latest
|
FROM ${ORG}/base:latest
|
||||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||||
RUN \
|
RUN \
|
||||||
sed -i '/debian-security/d' /etc/apt/sources.list && \
|
echo Enabled: no >> /etc/apt/sources.list.d/debian.sources && \
|
||||||
dpkg --add-architecture arm64 && \
|
dpkg --add-architecture arm64 && \
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
RUN \
|
RUN \
|
||||||
set -x && \
|
set -x && \
|
||||||
|
yum upgrade -y almalinux-release && \
|
||||||
yum -y install \
|
yum -y install \
|
||||||
gpg \
|
gpg \
|
||||||
python3-devel \
|
python3-devel \
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#
|
#
|
||||||
# Common WebAssembly tools.
|
# Common WebAssembly tools.
|
||||||
|
|
||||||
# main 2022-12-27
|
# main 2024-04-02
|
||||||
ENV BINARYEN_GIT_TAG cec66beba45668dbad74abd2396bb80d33595ff0
|
ENV BINARYEN_GIT_TAG 4e2ebbd6de6f99e5972654b3f50ddbc1c6839a73
|
||||||
RUN git clone --recursive https://github.com/WebAssembly/binaryen.git && \
|
RUN git clone --recursive https://github.com/WebAssembly/binaryen.git && \
|
||||||
cd binaryen && \
|
cd binaryen && \
|
||||||
git checkout ${BINARYEN_GIT_TAG} && \
|
git checkout ${BINARYEN_GIT_TAG} && \
|
||||||
@ -22,8 +22,8 @@ RUN git clone --recursive https://github.com/WebAssembly/binaryen.git && \
|
|||||||
cd ../ && \
|
cd ../ && \
|
||||||
rm -rf binaryen*
|
rm -rf binaryen*
|
||||||
|
|
||||||
# main 2023-03-16
|
# main 2024-04-02
|
||||||
ENV WABT_GIT_TAG 090d4674c86b00e31d18e77f2c8f8570a68e1cf1
|
ENV WABT_GIT_TAG 356931a867c7d642bc282fff46a1c95ab0e843f3
|
||||||
RUN git clone --recurse-submodules https://github.com/WebAssembly/wabt.git && \
|
RUN git clone --recurse-submodules https://github.com/WebAssembly/wabt.git && \
|
||||||
cd wabt && \
|
cd wabt && \
|
||||||
git checkout ${WABT_GIT_TAG} && \
|
git checkout ${WABT_GIT_TAG} && \
|
||||||
@ -47,6 +47,7 @@ RUN mkdir /wasi-runtimes
|
|||||||
ENV WASMTIME_HOME /wasi-runtimes/wasmtime
|
ENV WASMTIME_HOME /wasi-runtimes/wasmtime
|
||||||
RUN mkdir ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash
|
RUN mkdir ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash
|
||||||
COPY imagefiles/wasmtime-pwd.sh ${WASMTIME_HOME}/bin/
|
COPY imagefiles/wasmtime-pwd.sh ${WASMTIME_HOME}/bin/
|
||||||
|
COPY imagefiles/wasmtime-pwd-threads.sh ${WASMTIME_HOME}/bin/
|
||||||
ENV PATH "$WASMTIME_HOME/bin:$PATH"
|
ENV PATH "$WASMTIME_HOME/bin:$PATH"
|
||||||
|
|
||||||
# For wasmer
|
# For wasmer
|
||||||
|
@ -14,9 +14,44 @@ if ! command -v gpg &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
GOSU_VERSION=1.12
|
GOSU_VERSION=1.12
|
||||||
dpkgArch=$(if test "$(uname -m)" = "x86_64"; then echo amd64; else echo i386; fi)
|
|
||||||
url="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}"
|
ARCH=$(uname -m)
|
||||||
url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}.asc"
|
case "$ARCH" in
|
||||||
|
x86_64)
|
||||||
|
GOSU_ARCH=amd64
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
GOSU_ARCH=arm64
|
||||||
|
;;
|
||||||
|
armv7l)
|
||||||
|
GOSU_ARCH=armhf
|
||||||
|
;;
|
||||||
|
armv6l)
|
||||||
|
GOSU_ARCH=armel
|
||||||
|
;;
|
||||||
|
i686|i386)
|
||||||
|
GOSU_ARCH=i386
|
||||||
|
;;
|
||||||
|
mips64el)
|
||||||
|
GOSU_ARCH=mips64el
|
||||||
|
;;
|
||||||
|
ppc64el)
|
||||||
|
GOSU_ARCH=ppc64el
|
||||||
|
;;
|
||||||
|
riscv64)
|
||||||
|
GOSU_ARCH=riscv64
|
||||||
|
;;
|
||||||
|
s390x)
|
||||||
|
GOSU_ARCH=s390x
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: unsupported arch (${ARCH}) by gosu (https://github.com/tianon/gosu/releases)" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
url="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}"
|
||||||
|
url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}.asc"
|
||||||
|
|
||||||
# download and verify the signature
|
# download and verify the signature
|
||||||
export GNUPGHOME="$(mktemp -d)"
|
export GNUPGHOME="$(mktemp -d)"
|
||||||
|
4
imagefiles/wasmtime-pwd-threads.sh
Executable file
4
imagefiles/wasmtime-pwd-threads.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Mount the PWD and the /work mount dir to enable access in try_run commands
|
||||||
|
exec ${WASMTIME_HOME}/bin/wasmtime -S threads=y run --dir=. --dir=$PWD --dir=/work/ "$@"
|
@ -38,7 +38,7 @@ ENV QEMU_SET_ENV "LD_LIBRARY_PATH=${CROSS_ROOT}/lib:${QEMU_LD_PREFIX}"
|
|||||||
COPY Toolchain.cmake ${CROSS_ROOT}/
|
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
||||||
|
|
||||||
ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/
|
ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabi/pkgconfig
|
||||||
|
|
||||||
# Linux kernel cross compilation variables
|
# Linux kernel cross compilation variables
|
||||||
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
||||||
|
@ -39,11 +39,11 @@ WORKDIR /work
|
|||||||
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
|
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
|
||||||
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
|
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
|
||||||
|
|
||||||
ENV PKG_CONFIG_PATH /usr/lib/riscv64-unknown-linux-gnu/pkgconfig
|
ENV PKG_CONFIG_PATH /usr/lib/riscv32-unknown-linux-gnu/pkgconfig
|
||||||
|
|
||||||
# Linux kernel cross compilation variables
|
# Linux kernel cross compilation variables
|
||||||
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
||||||
ENV CROSS_COMPILE ${CROSS_TRIPLE}-
|
ENV CROSS_COMPILE ${CROSS_TRIPLE}-
|
||||||
ENV ARCH powerpc
|
ENV ARCH riscv32
|
||||||
|
|
||||||
#include "common.label-and-env"
|
#include "common.label-and-env"
|
||||||
|
@ -44,6 +44,6 @@ ENV PKG_CONFIG_PATH /usr/lib/riscv64-unknown-linux-gnu/pkgconfig
|
|||||||
# Linux kernel cross compilation variables
|
# Linux kernel cross compilation variables
|
||||||
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
||||||
ENV CROSS_COMPILE ${CROSS_TRIPLE}-
|
ENV CROSS_COMPILE ${CROSS_TRIPLE}-
|
||||||
ENV ARCH powerpc
|
ENV ARCH riscv64
|
||||||
|
|
||||||
#include "common.label-and-env"
|
#include "common.label-and-env"
|
||||||
|
@ -3,13 +3,13 @@ FROM ${ORG}/base:latest
|
|||||||
|
|
||||||
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
||||||
|
|
||||||
ARG CLANG_VERSION=17
|
ARG CLANG_VERSION=15
|
||||||
ENV CLANG_VERSION=${CLANG_VERSION}
|
ENV CLANG_VERSION=${CLANG_VERSION}
|
||||||
|
|
||||||
RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list \
|
RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list.d/llvm.list \
|
||||||
&& echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list \
|
&& echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list.d/llvm.list \
|
||||||
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list \
|
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /etc/apt/sources.list.d/llvm.list \
|
||||||
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list \
|
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${CLANG_VERSION} main" >> /etc/apt/sources.list.d/llvm.list \
|
||||||
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get -y install clang-${CLANG_VERSION} libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} lldb-${CLANG_VERSION} liblld-${CLANG_VERSION}-dev \
|
&& apt-get -y install clang-${CLANG_VERSION} libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} lldb-${CLANG_VERSION} liblld-${CLANG_VERSION}-dev \
|
||||||
@ -18,6 +18,7 @@ RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> /et
|
|||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} 90 \
|
&& update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} 90 \
|
||||||
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 90 \
|
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 90 \
|
||||||
|
&& update-alternatives --remove-all cpp \
|
||||||
&& update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${CLANG_VERSION} 90 \
|
&& update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${CLANG_VERSION} 90 \
|
||||||
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 90 \
|
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 90 \
|
||||||
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 90 \
|
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 90 \
|
||||||
|
11
web-wasi-threads/Dockerfile.in
Normal file
11
web-wasi-threads/Dockerfile.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
ARG ORG=dockcross
|
||||||
|
FROM ${ORG}/web-wasi:latest
|
||||||
|
|
||||||
|
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
||||||
|
|
||||||
|
ENV CROSS_TRIPLE=wasm32-wasi-threads
|
||||||
|
|
||||||
|
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||||
|
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
||||||
|
|
||||||
|
#include "common.label-and-env"
|
17
web-wasi-threads/Toolchain.cmake
Normal file
17
web-wasi-threads/Toolchain.cmake
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
set(WASI_SDK_PREFIX $ENV{WASI_SDK_PATH})
|
||||||
|
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk-pthread.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT})
|
||||||
|
set(CMAKE_SYSROOT $ENV{WASI_SYSROOT})
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER /usr/local/bin/clang-wasi-sysroot.sh)
|
||||||
|
set(CMAKE_CXX_COMPILER /usr/local/bin/clang++-wasi-sysroot.sh)
|
||||||
|
set(CMAKE_AR llvm-ar-$ENV{LLVM_VERSION})
|
||||||
|
set(CMAKE_RANLIB llvm-ranlib-$ENV{LLVM_VERSION})
|
||||||
|
set(CMAKE_ASM_COMPILER clang-$ENV{LLVM_VERSION})
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER_TARGET $ENV{CROSS_TRIPLE})
|
||||||
|
set(CMAKE_CXX_COMPILER_TARGET $ENV{CROSS_TRIPLE})
|
||||||
|
set(CMAKE_ASM_COMPILER_TARGET $ENV{CROSS_TRIPLE})
|
||||||
|
|
||||||
|
set(CMAKE_CROSSCOMPILING_EMULATOR /wasi-runtimes/wasmtime/bin/wasmtime-pwd-threads.sh)
|
@ -3,7 +3,7 @@ FROM ${ORG}/base:latest
|
|||||||
|
|
||||||
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
||||||
|
|
||||||
ENV LLVM_VERSION 16
|
ENV LLVM_VERSION 18
|
||||||
|
|
||||||
# Build LLVM / Clang that supports our glibc
|
# Build LLVM / Clang that supports our glibc
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
@ -11,14 +11,14 @@ RUN apt-get update && \
|
|||||||
apt-get install -y && \
|
apt-get install -y && \
|
||||||
\
|
\
|
||||||
curl -sS https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/llvm.gpg && \
|
curl -sS https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/llvm.gpg && \
|
||||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \
|
echo "deb [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \
|
||||||
echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \
|
echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/llvm.gpg] http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VERSION} main" >> /etc/apt/sources.list.d/llvm.list && \
|
||||||
\
|
\
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} && \
|
apt-get install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV WASI_VERSION 20
|
ENV WASI_VERSION 22
|
||||||
ENV WASI_VERSION_FULL ${WASI_VERSION}.0
|
ENV WASI_VERSION_FULL ${WASI_VERSION}.0
|
||||||
RUN cd /usr/ && \
|
RUN cd /usr/ && \
|
||||||
curl -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz && \
|
curl -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz && \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ARG DOCKER_IMAGE_VERSION=3.1.46
|
ARG DOCKER_IMAGE_VERSION=3.1.56
|
||||||
FROM emscripten/emsdk:$DOCKER_IMAGE_VERSION
|
FROM emscripten/emsdk:$DOCKER_IMAGE_VERSION
|
||||||
|
|
||||||
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
||||||
|
Reference in New Issue
Block a user