ubuntu/debian: create aarch64-specific Dockerfile.in

The musl package in ubuntu/debian could not provide everything we need
on aarch64.
e.g. we need `aarch64-linux-musl-gcc` as linker, and it's not provided
in package.

Fixes: #411

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
This commit is contained in:
Penny Zheng
2020-02-20 10:57:15 +08:00
parent 9cba8c4c27
commit 41aaa36e6f
3 changed files with 83 additions and 2 deletions

View File

@@ -274,7 +274,6 @@ generate_dockerfile()
curlOptions=("-OL")
[ -n "${http_proxy:-}" ] && curlOptions+=("-x ${http_proxy:-}")
readonly dockerfile_template="Dockerfile.in"
readonly install_go="
RUN cd /tmp ; curl ${curlOptions[@]} https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${goarch}.tar.gz
RUN tar -C /usr/ -xzf /tmp/go${GO_VERSION}.linux-${goarch}.tar.gz
@@ -344,7 +343,15 @@ RUN ln -sf /usr/bin/g++ /bin/musl-g++
# rust agent still need go to build
# because grpc-sys need go to build
pushd ${dir}
[ -f "${dockerfile_template}" ] || die "${dockerfile_template}: file not found"
dockerfile_template="Dockerfile.in"
dockerfile_arch_template="Dockerfile-${architecture}.in"
# if arch-specific docker file exists, swap the univesal one with it.
if [ -f "${dockerfile_arch_template}" ]; then
dockerfile_template="${dockerfile_arch_template}"
else
[ -f "${dockerfile_template}" ] || die "${dockerfile_template}: file not found"
fi
# powerpc have no musl target, don't setup rust enviroment
# since we cannot static link agent. Besides, there is
# also long double representation problem when building musl-libc