about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Richardson <alexrichardson@google.com>2024-12-04 09:41:51 -0800
committerAlex Richardson <alexrichardson@google.com>2024-12-10 08:33:29 -0800
commite8bcce77bb96a7d6935ede6cfc20d4c6616e9e4f (patch)
tree854f44ee403fc2028704a576d495eb2f2f1142c0
parent028ca8e6160bc193cf6e119b9f22c7f81ff5dbde (diff)
downloadrust-e8bcce77bb96a7d6935ede6cfc20d4c6616e9e4f.tar.gz
rust-e8bcce77bb96a7d6935ede6cfc20d4c6616e9e4f.zip
Remove l4re from the unsigned char operating system list
As noted in https://github.com/rust-lang/rust/pull/132975#issuecomment-2484645240,
the default for userland apps is to follow the architecture defaults, the
-funsigned-char flag only applies to kernel builds.
-rw-r--r--library/core/src/ffi/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ffi/mod.rs b/library/core/src/ffi/mod.rs
index a9be4ebea4e..827c8ca15d4 100644
--- a/library/core/src/ffi/mod.rs
+++ b/library/core/src/ffi/mod.rs
@@ -97,7 +97,8 @@ mod c_char_definition {
         // in clang/lib/Driver/ToolChains/Clang.cpp):
         // - PowerPC uses unsigned char for all targets except Darwin
         // - Arm/AArch64 uses unsigned char except for Darwin and Windows
-        // - L4RE builds with -funsigned-char on all targets
+        // Note: the L4RE kernel builds with -funsigned-char on all targets, but
+        //  we only have a target for userspace apps so it follows the architectures.
         if #[cfg(all(
             not(windows),
             not(target_vendor = "apple"),
@@ -113,7 +114,6 @@ mod c_char_definition {
                 target_arch = "riscv32",
                 target_arch = "s390x",
                 target_arch = "xtensa",
-                target_os = "l4re",
             )
         ))] {
             pub type c_char = u8;