Merge pull request #1263 from Jakob-Naucke/s390x-glibc-agent

Build for glibc on s390x
This commit is contained in:
Fabiano Fidêncio 2021-02-09 12:26:02 +01:00 committed by GitHub
commit 6dbc648c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -41,6 +41,11 @@ ifeq ($(ARCH), ppc64le)
$(warning "WARNING: powerpc64le-unknown-linux-musl target is unavailable")
endif
ifeq ($(ARCH), s390x)
override LIBC = gnu
$(warning "WARNING: s390x-unknown-linux-musl target is unavailable")
endif
EXTRA_RUSTFLAGS :=
ifeq ($(ARCH), aarch64)

View File

@ -561,7 +561,7 @@ EOT
if [ -z "${AGENT_SOURCE_BIN}" ] ; then
[ "$ARCH" == "ppc64le" ] && { LIBC=gnu; echo "WARNING: Forcing LIBC=gnu for ppc64le because musl toolchain is not supported on ppc64le"; }
bash ${script_dir}/../../../ci/install_musl.sh
[ "$LIBC" == "musl" ] && bash ${script_dir}/../../../ci/install_musl.sh
# rust agent needs ${arch}-unknown-linux-${LIBC}
rustup show | grep linux-${LIBC} > /dev/null || bash ${script_dir}/../../../ci/install_rust.sh
test -r "${HOME}/.cargo/env" && source "${HOME}/.cargo/env"
@ -626,13 +626,6 @@ parse_arguments()
shift $(($OPTIND - 1))
distro="$1"
arch=$(uname -m)
if [ "${RUST_AGENT}" == "yes" ] && [ "${arch}" == "s390x" ]; then
die "Cannot build rust agent on s390x
musl cannot be built on s390x because of long double
reprentation is broken. And rust has no musl target on s390x.
See issue: https://github.com/kata-containers/osbuilder/issues/388"
fi
}
detect_host_distro()