From 3b97d162806eaaeaa590b673d2209c42954fa651 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 7 May 2024 02:06:55 +0700 Subject: [PATCH 1/2] Fix warnings by `rustc --print cfg --target ci/switch.json` ``` warning: target json file contains unused fields: abi-blacklist, family, has-elf-tls, target-env ``` --- ci/switch.json | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/ci/switch.json b/ci/switch.json index bc1894879d7f7..c2df6610c5628 100644 --- a/ci/switch.json +++ b/ci/switch.json @@ -1,7 +1,5 @@ { - "family": "unix", "env": "newlib", - "target-env": "newlib", "target-family": "unix", "target-c-int-width": "32", "target-endian": "little", @@ -9,14 +7,6 @@ "os": "horizon", "arch": "aarch64", "panic-strategy": "unwind", - "abi-blacklist": [ - "stdcall", - "fastcall", - "vectorcall", - "thiscall", - "win64", - "sysv64" - ], "dynamic-linking" : false, "features": "+a53,+strict-align", "data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", @@ -24,7 +14,7 @@ "position-independent-executables" : true, "linker-flavor": "gcc", "llvm-target": "aarch64-unknown-none", - "has-elf-tls" : false, + "has-thread-local": false, "linker-is-gnu" : true, "disable-redzone" : true, "relocation-model" : "pic", @@ -34,4 +24,4 @@ "trap-unreachable" : true, "emit-debug-gdb-scripts" : true, "requires-uwtable" : true -} \ No newline at end of file +} From 5b2fa07cac128b09fc3f29b92e520f9ff2fb5700 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 7 May 2024 01:01:47 +0700 Subject: [PATCH 2/2] ci: wrong cfg emscripten --- build.rs | 3 ++- libc-test/test/makedev.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 53532c68f27bf..ea053bd8b3d7a 100644 --- a/build.rs +++ b/build.rs @@ -7,6 +7,7 @@ use std::str; // make sure to add it to this list as well. const ALLOWED_CFGS: &'static [&'static str] = &[ "emscripten_new_stat_abi", + "espidf_time64", "freebsd10", "freebsd11", "freebsd12", @@ -35,7 +36,7 @@ fn main() { let (rustc_minor_ver, is_nightly) = rustc_minor_nightly(); let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok(); let libc_ci = env::var("LIBC_CI").is_ok(); - let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok(); + let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok() || rustc_minor_ver >= 80; let const_extern_fn_cargo_feature = env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok(); // The ABI of libc used by std is backward compatible with FreeBSD 12. diff --git a/libc-test/test/makedev.rs b/libc-test/test/makedev.rs index c9a92aa83e686..6b5b85efb8197 100644 --- a/libc-test/test/makedev.rs +++ b/libc-test/test/makedev.rs @@ -79,7 +79,7 @@ mod t { // These OSes allow 32 bits for both minor and major #[cfg(any( - target_os = "empscripten", + target_os = "emscripten", target_os = "freebsd", target_os = "fuchsia", target_os = "linux",