From 12dcefae4dc160a380da4ed8dbb1fec4489686e7 Mon Sep 17 00:00:00 2001 From: Alex Huszagh Date: Wed, 22 Jun 2022 17:12:21 -0500 Subject: [PATCH] Re-enable solaris targets. Fixes the solaris targets, and re-enables them in CI. Related to #534. --- .github/workflows/ci.yml | 5 ++--- CHANGELOG.md | 1 + docker/solaris.sh | 31 ++++++++++++++++++------------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c41dd5ed2..b9b511828 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,9 +189,8 @@ jobs: - { target: i686-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 } - { target: x86_64-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 } - { target: x86_64-unknown-netbsd, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } - # Disabled, see #534 - #-{ target: sparcv9-sun-solaris, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } - #-{ target: x86_64-sun-solaris, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } + - { target: sparcv9-sun-solaris, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } + - { target: x86_64-sun-solaris, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } - { target: thumbv6m-none-eabi, os: ubuntu-latest, std: 1 } - { target: thumbv7em-none-eabi, os: ubuntu-latest, std: 1 } - { target: thumbv7em-none-eabihf, os: ubuntu-latest, std: 1 } diff --git a/CHANGELOG.md b/CHANGELOG.md index c6c127911..3a7e83819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added +- #838 - re-enabled the solaris targets. - #803 - added `CROSS_CUSTOM_TOOLCHAIN` to disable automatic installation of components for use with tools like `cargo-bisect-rustc` - #795 - added images for additional toolchains maintained by cross-rs. - #792 - added `CROSS_CONTAINER_IN_CONTAINER` environment variable to replace `CROSS_DOCKER_IN_DOCKER`. diff --git a/docker/solaris.sh b/docker/solaris.sh index e3c10d957..7f88ec3de 100755 --- a/docker/solaris.sh +++ b/docker/solaris.sh @@ -10,7 +10,7 @@ main() { local arch="${1}" local binutils=2.28.1 \ - gcc=6.4.0 \ + gcc=8.4.0 \ target="${arch}-sun-solaris2.10" install_packages bzip2 \ @@ -58,18 +58,21 @@ main() { add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main' dpkg --add-architecture "${apt_arch}" apt-get update - apt-cache depends --recurse --no-replaces \ - "libc:${apt_arch}" \ - "libdl-dev:${apt_arch}" \ - "libm-dev:${apt_arch}" \ - "libnsl-dev:${apt_arch}" \ - "libpthread-dev:${apt_arch}" \ - "libresolv-dev:${apt_arch}" \ - "librt:${apt_arch}" \ - "libsocket-dev:${apt_arch}" \ - "system-crt:${apt_arch}" \ - "system-header:${apt_arch}" \ - | grep "^\w" | xargs apt-get download + # shellcheck disable=SC2046 + apt-get download $(apt-cache depends --recurse --no-replaces \ + "libc:${apt_arch}" \ + "liblgrp-dev:${apt_arch}" \ + "liblgrp:${apt_arch}" \ + "libm-dev:${apt_arch}" \ + "libpthread:${apt_arch}" \ + "libresolv:${apt_arch}" \ + "librt:${apt_arch}" \ + "libsendfile-dev:${apt_arch}" \ + "libsendfile:${apt_arch}" \ + "libsocket:${apt_arch}" \ + "system-crt:${apt_arch}" \ + "system-header:${apt_arch}" \ + | grep "^\w") for deb in *"${apt_arch}.deb"; do dpkg -x "${deb}" "${td}/solaris" @@ -102,6 +105,8 @@ EOF ln -s usr/include "${destdir}/sys-include" ln -s usr/include "${destdir}/include" + # note: solaris2.10 is obsolete, so we can't upgrade to GCC 10 till then. + # for gcc 9.4.0, need `--enable-obsolete` cd gcc-build ../gcc/configure \ --disable-libada \