diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9a895e14d..6bacdd986 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,6 +71,8 @@ jobs: armv5te-unknown-linux-gnueabi s390x-unknown-linux-gnu arm-linux-androideabi + sparc64-unknown-linux-gnu + sparcv9-sun-solaris aarch64-linux-android aarch64-apple-ios - name: Install cross-compilation tools @@ -111,6 +113,8 @@ jobs: - run: cargo check --workspace --release -vv --target=armv5te-unknown-linux-gnueabi --features=all-apis - run: cargo check --workspace --release -vv --target=s390x-unknown-linux-gnu --features=all-apis - run: cargo check --workspace --release -vv --target=arm-linux-androideabi --features=all-apis + - run: cargo check --workspace --release -vv --target=sparc64-unknown-linux-gnu --features=all-apis + - run: cargo check --workspace --release -vv --target=sparcv9-sun-solaris --features=all-apis - run: cargo check --workspace --release -vv --target=aarch64-apple-ios --features=all-apis - run: cargo check --workspace --release -vv --target=aarch64-linux-android --features=all-apis @@ -187,6 +191,7 @@ jobs: - run: cargo check -Z build-std --target x86_64-unknown-openbsd --all-targets --features=all-apis - run: cargo check -Z build-std --target mips64-openwrt-linux-musl --all-targets --features=all-apis - run: cargo check -Z build-std --target x86_64-unknown-dragonfly --all-targets --features=all-apis + - run: cargo check -Z build-std --target sparc-unknown-linux-gnu --all-targets --features=all-apis # Omit --all-targets on haiku because not all the tests build yet. - run: cargo check -Z build-std --target x86_64-unknown-haiku --features=all-apis # x86_64-uwp-windows-msvc isn't currently working. diff --git a/src/backend/libc/process/types.rs b/src/backend/libc/process/types.rs index 125a4fe94..b829e478e 100644 --- a/src/backend/libc/process/types.rs +++ b/src/backend/libc/process/types.rs @@ -221,7 +221,12 @@ pub enum Signal { target_os = "solaris", all( any(target_os = "android", target_os = "linux"), - any(target_arch = "mips", target_arch = "mips64"), + any( + target_arch = "mips", + target_arch = "mips64", + target_arch = "sparc", + target_arch = "sparc64" + ), ) )))] Stkflt = c::SIGSTKFLT, @@ -304,7 +309,12 @@ impl Signal { target_os = "solaris", all( any(target_os = "android", target_os = "linux"), - any(target_arch = "mips", target_arch = "mips64"), + any( + target_arch = "mips", + target_arch = "mips64", + target_arch = "sparc", + target_arch = "sparc64" + ), ) )))] c::SIGSTKFLT => Some(Self::Stkflt), diff --git a/src/backend/libc/termios/types.rs b/src/backend/libc/termios/types.rs index a2e121658..6dda70064 100644 --- a/src/backend/libc/termios/types.rs +++ b/src/backend/libc/termios/types.rs @@ -766,6 +766,8 @@ pub const B2000000: Speed = c::B2000000; /// `B2500000` #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -779,6 +781,8 @@ pub const B2500000: Speed = c::B2500000; /// `B3000000` #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -792,6 +796,8 @@ pub const B3000000: Speed = c::B3000000; /// `B3500000` #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -805,6 +811,8 @@ pub const B3500000: Speed = c::B3500000; /// `B4000000` #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", diff --git a/src/backend/linux_raw/termios/types.rs b/src/backend/linux_raw/termios/types.rs index ce8832455..88db4e1c9 100644 --- a/src/backend/linux_raw/termios/types.rs +++ b/src/backend/linux_raw/termios/types.rs @@ -338,15 +338,19 @@ pub const B1500000: Speed = linux_raw_sys::general::B1500000; pub const B2000000: Speed = linux_raw_sys::general::B2000000; /// `B2500000` +#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] pub const B2500000: Speed = linux_raw_sys::general::B2500000; /// `B3000000` +#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] pub const B3000000: Speed = linux_raw_sys::general::B3000000; /// `B3500000` +#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] pub const B3500000: Speed = linux_raw_sys::general::B3500000; /// `B4000000` +#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))] pub const B4000000: Speed = linux_raw_sys::general::B4000000; /// `CSIZE` diff --git a/src/termios/constants.rs b/src/termios/constants.rs index c3db04905..e96f139eb 100644 --- a/src/termios/constants.rs +++ b/src/termios/constants.rs @@ -44,6 +44,8 @@ pub use backend::termios::types::B1500000; )))] pub use backend::termios::types::B2000000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -55,6 +57,8 @@ pub use backend::termios::types::B2000000; )))] pub use backend::termios::types::B2500000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -66,6 +70,8 @@ pub use backend::termios::types::B2500000; )))] pub use backend::termios::types::B3000000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -77,6 +83,8 @@ pub use backend::termios::types::B3000000; )))] pub use backend::termios::types::B3500000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -788,6 +796,8 @@ pub fn speed_value(speed: backend::termios::types::Speed) -> Option { )))] backend::termios::types::B2000000 => Some(2_000_000), #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -799,6 +809,8 @@ pub fn speed_value(speed: backend::termios::types::Speed) -> Option { )))] backend::termios::types::B2500000 => Some(2_500_000), #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -810,6 +822,8 @@ pub fn speed_value(speed: backend::termios::types::Speed) -> Option { )))] backend::termios::types::B3000000 => Some(3_000_000), #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -821,6 +835,8 @@ pub fn speed_value(speed: backend::termios::types::Speed) -> Option { )))] backend::termios::types::B3500000 => Some(3_500_000), #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", diff --git a/src/termios/mod.rs b/src/termios/mod.rs index 8702992f8..ec35f96fb 100644 --- a/src/termios/mod.rs +++ b/src/termios/mod.rs @@ -52,6 +52,8 @@ pub use constants::B1500000; )))] pub use constants::B2000000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -63,6 +65,8 @@ pub use constants::B2000000; )))] pub use constants::B2500000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -74,6 +78,8 @@ pub use constants::B2500000; )))] pub use constants::B3000000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", @@ -85,6 +91,8 @@ pub use constants::B3000000; )))] pub use constants::B3500000; #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", diff --git a/tests/time/y2038.rs b/tests/time/y2038.rs index 5dddab4a7..dde51c58d 100644 --- a/tests/time/y2038.rs +++ b/tests/time/y2038.rs @@ -14,6 +14,7 @@ #[cfg(not(all(target_env = "musl", target_pointer_width = "32")))] #[cfg(not(all(target_os = "android", target_pointer_width = "32")))] #[cfg(not(all(target_os = "emscripten", target_pointer_width = "32")))] +#[cfg(not(all(target_os = "linux", target_arch = "sparc")))] #[test] fn test_y2038() { use rustix::time::{Secs, Timespec};