Setup cross-compilation when building Docker image

This commit is contained in:
Quentin Gliech
2021-11-02 09:57:04 +01:00
parent 6acd61e01b
commit 43747c15c7
3 changed files with 75 additions and 12 deletions

View File

@@ -0,0 +1,15 @@
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "usage: $0 [platform]" >&2
exit 1
fi
if [ "$1" = "linux/arm64" ]; then
echo "aarch64-unknown-linux-gnu"
elif [ "$1" = "linux/amd64" ]; then
echo "x86_64-unknown-linux-gnu"
else
echo "unsupported platform $1" >&2
exit 2
fi