Skip to content

Commit

Permalink
Rename x86_64-sun-solaris to x86_64-pc-solaris
Browse files Browse the repository at this point in the history
The `x86_64-sun-solaris` target was deprecated in Rust 1.52.0[1]
and removed in Rust 1.76.0[2], in favour of  `x86_64-pc-solaris`.

[1]: rust-lang/rust#82216
[2]: rust-lang/rust#118091
  • Loading branch information
thirteenowls committed May 17, 2024
1 parent 7d75864 commit 60017d6
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/b_issue_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ body:
- wasm32-unknown-emscripten
- x86_64-linux-android
- x86_64-pc-windows-gnu
- x86_64-sun-solaris
- x86_64-pc-solaris
- x86_64-unknown-freebsd
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ terminate.
| `wasm32-unknown-emscripten` [6] | 3.1.14 | 15.0.0 || N/A ||
| `x86_64-linux-android` [1] | 9.0.8 | 9.0.8 || 6.1.0 ||
| `x86_64-pc-windows-gnu` | N/A | 9.3 || N/A ||
| `x86_64-sun-solaris` | 1.22.7 | 8.4.0 || N/A | |
| `x86_64-pc-solaris` | 1.22.7 | 8.4.0 || N/A | |
| `x86_64-unknown-freebsd` | 1.5 | 6.4.0 || N/A | |
| `x86_64-unknown-dragonfly` [2] [3] | 6.0.1 | 10.3.0 || N/A | |
| `x86_64-unknown-illumos` | 1.20.4 | 8.4.0 || N/A | |
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.sparcv9-sun-solaris
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /xargo.sh
FROM cross-base as build

COPY solaris.sh /
RUN /solaris.sh sparcv9
RUN /solaris.sh sparcv9 sun

COPY toolchain.cmake /opt/toolchain.cmake

Expand Down
31 changes: 31 additions & 0 deletions docker/Dockerfile.x86_64-pc-solaris
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu:20.04 as cross-base
ENV DEBIAN_FRONTEND=noninteractive

COPY common.sh lib.sh /
RUN /common.sh

COPY cmake.sh /
RUN /cmake.sh

COPY xargo.sh /
RUN /xargo.sh

FROM cross-base as build

COPY solaris.sh /
RUN /solaris.sh x86_64 pc

COPY toolchain.cmake /opt/toolchain.cmake

ENV CROSS_TOOLCHAIN_PREFIX=x86_64-pc-solaris2.10-
ENV CROSS_SYSROOT=/usr/local/x86_64-pc-solaris2.10
ENV CARGO_TARGET_X86_64_PC_SOLARIS_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
AR_x86_64_pc_solaris="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_x86_64_pc_solaris="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_x86_64_pc_solaris="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_x86_64_pc_solaris=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_solaris="--sysroot=$CROSS_SYSROOT" \
CROSS_CMAKE_SYSTEM_NAME=SunOS \
CROSS_CMAKE_SYSTEM_PROCESSOR=x86_64 \
CROSS_CMAKE_CRT=solaris \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64"
31 changes: 0 additions & 31 deletions docker/Dockerfile.x86_64-sun-solaris

This file was deleted.

3 changes: 2 additions & 1 deletion docker/solaris.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ set -euo pipefail

main() {
local arch="${1}"
local manufacturer="${2}"

local binutils=2.28.1 \
gcc=8.4.0 \
target="${arch}-sun-solaris2.10"
target="${arch}-${manufacturer}-solaris2.10"

install_packages bzip2 \
ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl TargetTriple {
"aarch64-unknown-freebsd" => Some("freebsd-arm64"),
"x86_64-unknown-netbsd" => Some("netbsd-amd64"),
"sparcv9-sun-solaris" => Some("solaris-sparc"),
"x86_64-sun-solaris" => Some("solaris-amd64"),
"x86_64-pc-solaris" => Some("solaris-amd64"),
"thumbv6m-none-eabi" => Some("arm"),
"thumbv7em-none-eabi" => Some("arm"),
"thumbv7em-none-eabihf" => Some("armhf"),
Expand Down
2 changes: 1 addition & 1 deletion targets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ std = true

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

0 comments on commit 60017d6

Please sign in to comment.