Skip to content

Commit

Permalink
Fix *-solaris targets
Browse files Browse the repository at this point in the history
  • Loading branch information
thirteenowls committed May 17, 2024
1 parent 60017d6 commit c81946b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .changes/1495.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"description": "Fix `*-solaris` targets",
"issues": [1424],
"type": "fixed",
"breaking": true
}
21 changes: 13 additions & 8 deletions docker/solaris.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,33 @@ main() {
esac

apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486
add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main'
add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2 main'
dpkg --add-architecture "${apt_arch}"
apt-get update
# shellcheck disable=SC2046
apt-get download $(apt-cache depends --recurse --no-replaces \
apt-get install -y --download-only \
"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")
"system-header:${apt_arch}"

for deb in *"${apt_arch}.deb"; do
for deb in /var/cache/apt/archives/*"${apt_arch}.deb"; do
dpkg -x "${deb}" "${td}/solaris"
done
apt-get clean

# The -dev packages are not available from the apt repository we're using.
# However, those packages are just symlinks from *.so to *.so.<version>.
# This makes all those symlinks.
while IFS= read -r -d '' lib; do
link_name=${lib%.so.*}.so
[ -e "$link_name" ] || ln -sf "${lib##*/}" "$link_name"
done < <(find . -name '*.so.*' -print0)

cd binutils-build
../binutils/configure \
Expand Down
10 changes: 10 additions & 0 deletions src/docker/provided_images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,16 @@ pub static PROVIDED_IMAGES: &[ProvidedImage] = &[
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "sparcv9-sun-solaris",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "x86_64-pc-solaris",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
sub: None
},
ProvidedImage {
name: "x86_64-unknown-illumos",
platforms: &[ImagePlatform::X86_64_UNKNOWN_LINUX_GNU],
Expand Down
2 changes: 0 additions & 2 deletions targets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,13 @@ dylib = true
std = true

[[target]]
disabled = true # https://github.com/cross-rs/cross/issues/1424
target = "sparcv9-sun-solaris"
os = "ubuntu-latest"
cpp = true
dylib = true
std = true

[[target]]
disabled = true # https://github.com/cross-rs/cross/issues/1424
target = "x86_64-pc-solaris"
os = "ubuntu-latest"
cpp = true
Expand Down

0 comments on commit c81946b

Please sign in to comment.