From bebc6d5f75b99a1b9954b674c08338d6102f1c5b Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 1 Nov 2022 01:33:26 +0000 Subject: [PATCH 1/4] Update no_atomic.rs --- no_atomic.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/no_atomic.rs b/no_atomic.rs index 675d9a27e..8ce0d311f 100644 --- a/no_atomic.rs +++ b/no_atomic.rs @@ -37,6 +37,7 @@ const NO_ATOMIC_64: &[&str] = &[ "mips-unknown-linux-musl", "mips-unknown-linux-uclibc", "mipsel-sony-psp", + "mipsel-sony-psx", "mipsel-unknown-linux-gnu", "mipsel-unknown-linux-musl", "mipsel-unknown-linux-uclibc", @@ -73,6 +74,7 @@ const NO_ATOMIC_64: &[&str] = &[ #[allow(dead_code)] // Only crossbeam-utils uses this. const NO_ATOMIC: &[&str] = &[ "avr-unknown-gnu-atmega328", + "mipsel-sony-psx", "msp430-none-elf", "riscv32i-unknown-none-elf", "riscv32im-unknown-none-elf", From 0609a72243e780e911a0970ed03252b3dae6d993 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 1 Nov 2022 20:53:26 +0100 Subject: [PATCH 2/4] When building for linux, replace all vendors with 'unknown' Some build systems such as the Yocto project define custom rust targets, of the form 'arch-somevendor-linux-gnu/musl' (only the 'somevendor' part is custom, the rest matches rust's definitions). This causes mismatches with crossbeam's lists of targets which are built from the standard rust target list, and always have 'unknown' as the vendor. This change simply replaces such custom vendors with 'unknown' when the third component of the target is 'linux'. --- build-common.rs | 13 +++++++++++++ crossbeam-epoch/build-common.rs | 1 + crossbeam-epoch/build.rs | 3 ++- crossbeam-queue/build-common.rs | 1 + crossbeam-queue/build.rs | 3 ++- crossbeam-skiplist/build-common.rs | 1 + crossbeam-skiplist/build.rs | 3 ++- crossbeam-utils/build-common.rs | 1 + crossbeam-utils/build.rs | 3 ++- 9 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 build-common.rs create mode 120000 crossbeam-epoch/build-common.rs create mode 120000 crossbeam-queue/build-common.rs create mode 120000 crossbeam-skiplist/build-common.rs create mode 120000 crossbeam-utils/build-common.rs diff --git a/build-common.rs b/build-common.rs new file mode 100644 index 000000000..664098ec3 --- /dev/null +++ b/build-common.rs @@ -0,0 +1,13 @@ +// The target triplets have the form of 'arch-vendor-system'. +// +// When building for Linux (e.g. the 'system' part is +// 'linux-something'), replace the vendor with 'unknown' +// so that mapping to rust standard targets happens correctly. +fn convert_custom_linux_target(target: String) -> String { + let mut parts: Vec<&str> = target.split('-').collect(); + let system = parts[2]; + if system == "linux" { + parts[1] = "unknown"; + }; + parts.join("-") +} diff --git a/crossbeam-epoch/build-common.rs b/crossbeam-epoch/build-common.rs new file mode 120000 index 000000000..929510c73 --- /dev/null +++ b/crossbeam-epoch/build-common.rs @@ -0,0 +1 @@ +../build-common.rs \ No newline at end of file diff --git a/crossbeam-epoch/build.rs b/crossbeam-epoch/build.rs index b3bd15a5a..978141aa5 100644 --- a/crossbeam-epoch/build.rs +++ b/crossbeam-epoch/build.rs @@ -15,10 +15,11 @@ use std::env; include!("no_atomic.rs"); +include!("build-common.rs"); fn main() { let target = match env::var("TARGET") { - Ok(target) => target, + Ok(target) => convert_custom_linux_target(target), Err(e) => { println!( "cargo:warning={}: unable to get TARGET environment variable: {}", diff --git a/crossbeam-queue/build-common.rs b/crossbeam-queue/build-common.rs new file mode 120000 index 000000000..929510c73 --- /dev/null +++ b/crossbeam-queue/build-common.rs @@ -0,0 +1 @@ +../build-common.rs \ No newline at end of file diff --git a/crossbeam-queue/build.rs b/crossbeam-queue/build.rs index d0eb3f313..6975dd8c2 100644 --- a/crossbeam-queue/build.rs +++ b/crossbeam-queue/build.rs @@ -15,10 +15,11 @@ use std::env; include!("no_atomic.rs"); +include!("build-common.rs"); fn main() { let target = match env::var("TARGET") { - Ok(target) => target, + Ok(target) => convert_custom_linux_target(target), Err(e) => { println!( "cargo:warning={}: unable to get TARGET environment variable: {}", diff --git a/crossbeam-skiplist/build-common.rs b/crossbeam-skiplist/build-common.rs new file mode 120000 index 000000000..929510c73 --- /dev/null +++ b/crossbeam-skiplist/build-common.rs @@ -0,0 +1 @@ +../build-common.rs \ No newline at end of file diff --git a/crossbeam-skiplist/build.rs b/crossbeam-skiplist/build.rs index d0eb3f313..6975dd8c2 100644 --- a/crossbeam-skiplist/build.rs +++ b/crossbeam-skiplist/build.rs @@ -15,10 +15,11 @@ use std::env; include!("no_atomic.rs"); +include!("build-common.rs"); fn main() { let target = match env::var("TARGET") { - Ok(target) => target, + Ok(target) => convert_custom_linux_target(target), Err(e) => { println!( "cargo:warning={}: unable to get TARGET environment variable: {}", diff --git a/crossbeam-utils/build-common.rs b/crossbeam-utils/build-common.rs new file mode 120000 index 000000000..929510c73 --- /dev/null +++ b/crossbeam-utils/build-common.rs @@ -0,0 +1 @@ +../build-common.rs \ No newline at end of file diff --git a/crossbeam-utils/build.rs b/crossbeam-utils/build.rs index dd6604792..617162fb5 100644 --- a/crossbeam-utils/build.rs +++ b/crossbeam-utils/build.rs @@ -27,10 +27,11 @@ use std::env; include!("no_atomic.rs"); +include!("build-common.rs"); fn main() { let target = match env::var("TARGET") { - Ok(target) => target, + Ok(target) => convert_custom_linux_target(target), Err(e) => { println!( "cargo:warning={}: unable to get TARGET environment variable: {}", From 8ea7f55e2ba62dbdb258a8a8e1c2dce590034dc6 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Wed, 16 Nov 2022 16:10:04 -0500 Subject: [PATCH 3/4] crossbeam-epoch: Bump memoffset to 0.7 --- crossbeam-epoch/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crossbeam-epoch/Cargo.toml b/crossbeam-epoch/Cargo.toml index 822e04c7d..14a2bdfb5 100644 --- a/crossbeam-epoch/Cargo.toml +++ b/crossbeam-epoch/Cargo.toml @@ -47,7 +47,7 @@ autocfg = "1" [dependencies] cfg-if = "1" -memoffset = "0.6" +memoffset = "0.7" scopeguard = { version = "1.1", default-features = false } # Enable the use of loom for concurrency testing. From 09c99c09efc8f17f31460954436307e4973eac22 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 20 Nov 2022 16:54:07 +0900 Subject: [PATCH 4/4] Prepare for the next release - crossbeam-utils 0.8.12 -> 0.8.13 - crossbeam-queue 0.3.6 -> 0.3.7 - crossbeam-epoch 0.9.11 -> 0.9.12 --- crossbeam-epoch/CHANGELOG.md | 5 +++++ crossbeam-epoch/Cargo.toml | 2 +- crossbeam-queue/CHANGELOG.md | 4 ++++ crossbeam-queue/Cargo.toml | 2 +- crossbeam-utils/CHANGELOG.md | 4 ++++ crossbeam-utils/Cargo.toml | 2 +- 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/crossbeam-epoch/CHANGELOG.md b/crossbeam-epoch/CHANGELOG.md index 3aac87b7f..d4d6d7cdd 100644 --- a/crossbeam-epoch/CHANGELOG.md +++ b/crossbeam-epoch/CHANGELOG.md @@ -1,3 +1,8 @@ +# Version 0.9.12 + +- Update `memoffset` to 0.7. (#926) +- Improve support for custom targets. (#922) + # Version 0.9.11 - Removes the dependency on the `once_cell` crate to restore the MSRV. (#913) diff --git a/crossbeam-epoch/Cargo.toml b/crossbeam-epoch/Cargo.toml index 14a2bdfb5..b6f05967b 100644 --- a/crossbeam-epoch/Cargo.toml +++ b/crossbeam-epoch/Cargo.toml @@ -4,7 +4,7 @@ name = "crossbeam-epoch" # - Update CHANGELOG.md # - Update README.md # - Create "crossbeam-epoch-X.Y.Z" git tag -version = "0.9.11" +version = "0.9.12" edition = "2018" rust-version = "1.38" license = "MIT OR Apache-2.0" diff --git a/crossbeam-queue/CHANGELOG.md b/crossbeam-queue/CHANGELOG.md index 289f6ed24..7e013ef0a 100644 --- a/crossbeam-queue/CHANGELOG.md +++ b/crossbeam-queue/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 0.3.7 + +- Improve support for custom targets. (#922) + # Version 0.3.6 - Bump the minimum supported Rust version to 1.38. (#877) diff --git a/crossbeam-queue/Cargo.toml b/crossbeam-queue/Cargo.toml index 2e4d7ced7..88b9937d8 100644 --- a/crossbeam-queue/Cargo.toml +++ b/crossbeam-queue/Cargo.toml @@ -4,7 +4,7 @@ name = "crossbeam-queue" # - Update CHANGELOG.md # - Update README.md # - Create "crossbeam-queue-X.Y.Z" git tag -version = "0.3.6" +version = "0.3.7" edition = "2018" rust-version = "1.38" license = "MIT OR Apache-2.0" diff --git a/crossbeam-utils/CHANGELOG.md b/crossbeam-utils/CHANGELOG.md index 3a93e4659..c28f29826 100644 --- a/crossbeam-utils/CHANGELOG.md +++ b/crossbeam-utils/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 0.8.13 + +- Improve support for custom targets. (#922) + # Version 0.8.12 - Removes the dependency on the `once_cell` crate to restore the MSRV. (#913) diff --git a/crossbeam-utils/Cargo.toml b/crossbeam-utils/Cargo.toml index 7679a70ab..917632d7d 100644 --- a/crossbeam-utils/Cargo.toml +++ b/crossbeam-utils/Cargo.toml @@ -4,7 +4,7 @@ name = "crossbeam-utils" # - Update CHANGELOG.md # - Update README.md # - Create "crossbeam-utils-X.Y.Z" git tag -version = "0.8.12" +version = "0.8.13" edition = "2018" rust-version = "1.38" license = "MIT OR Apache-2.0"