From 8f803c202681fa137fca691df999ac3f335d29c1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 30 Jan 2016 13:27:00 -0800 Subject: Remove "powerpc64le" and "mipsel" target_arch Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the `target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the `powerpc64le` target does indeed set the `target_arch` as `powerpc64le`, causing a bit of inconsistency between theset two. As these are just the same instance of one instruction set, let's use `target_endian` to switch between them and only set the `target_arch` as one value. This should cut down on the number of `#[cfg]` annotations necessary and all around be a little more ergonomic. --- src/libstd/os/linux/raw.rs | 6 ++---- src/libstd/os/raw.rs | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/libstd/os') diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs index 953d0917141..03a1fdaac46 100644 --- a/src/libstd/os/linux/raw.rs +++ b/src/libstd/os/linux/raw.rs @@ -86,8 +86,7 @@ mod arch { } } -#[cfg(any(target_arch = "mips", - target_arch = "mipsel"))] +#[cfg(target_arch = "mips")] mod arch { use super::mode_t; use os::raw::{c_long, c_ulong}; @@ -205,8 +204,7 @@ mod arch { } } -#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64", - target_arch = "powerpc64le"))] +#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64"))] mod arch { use super::{dev_t, mode_t}; use os::raw::{c_long, c_int}; diff --git a/src/libstd/os/raw.rs b/src/libstd/os/raw.rs index 31d889fd422..bd353f066cf 100644 --- a/src/libstd/os/raw.rs +++ b/src/libstd/os/raw.rs @@ -16,15 +16,13 @@ all(target_os = "linux", any(target_arch = "aarch64", target_arch = "arm", target_arch = "powerpc", - target_arch = "powerpc64", - target_arch = "powerpc64le"))))] + target_arch = "powerpc64"))))] #[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = u8; #[cfg(not(any(target_os = "android", all(target_os = "linux", any(target_arch = "aarch64", target_arch = "arm", target_arch = "powerpc", - target_arch = "powerpc64", - target_arch = "powerpc64le")))))] + target_arch = "powerpc64")))))] #[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = i8; #[stable(feature = "raw_os", since = "1.1.0")] pub type c_schar = i8; #[stable(feature = "raw_os", since = "1.1.0")] pub type c_uchar = u8; -- cgit 1.4.1-3-g733a5