diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-01-23 21:19:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-23 21:19:53 +0100 |
| commit | 1e5ec4d82ad8c0823de5556ecb196b42e07a0e8f (patch) | |
| tree | 6b16749a30171a4fc3c44470bd15397c4fc82a8b | |
| parent | dd538b5f05a648d50f7e94ccf01763e68a053453 (diff) | |
| parent | ed4b99a99c5ef1ac54ade6b8b02ce5f44b905221 (diff) | |
| download | rust-1e5ec4d82ad8c0823de5556ecb196b42e07a0e8f.tar.gz rust-1e5ec4d82ad8c0823de5556ecb196b42e07a0e8f.zip | |
Rollup merge of #120188 - devnexen:update_bsd_compiler_base_specs, r=wesleywiser
compiler: update freebsd and netbsd base specs. both support thread local.
| -rw-r--r-- | compiler/rustc_target/src/spec/base/dragonfly.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/freebsd.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/base/netbsd.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/pal/unix/thread_local_dtor.rs | 5 |
4 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/base/dragonfly.rs b/compiler/rustc_target/src/spec/base/dragonfly.rs index de2be781796..3c1846696f7 100644 --- a/compiler/rustc_target/src/spec/base/dragonfly.rs +++ b/compiler/rustc_target/src/spec/base/dragonfly.rs @@ -8,6 +8,7 @@ pub fn opts() -> TargetOptions { has_rpath: true, position_independent_executables: true, relro_level: RelroLevel::Full, + has_thread_local: true, default_dwarf_version: 2, ..Default::default() } diff --git a/compiler/rustc_target/src/spec/base/freebsd.rs b/compiler/rustc_target/src/spec/base/freebsd.rs index 80b3da8a752..c772754aa8d 100644 --- a/compiler/rustc_target/src/spec/base/freebsd.rs +++ b/compiler/rustc_target/src/spec/base/freebsd.rs @@ -9,6 +9,7 @@ pub fn opts() -> TargetOptions { crt_static_respected: true, position_independent_executables: true, relro_level: RelroLevel::Full, + has_thread_local: true, abi_return_struct_as_int: true, default_dwarf_version: 2, ..Default::default() diff --git a/compiler/rustc_target/src/spec/base/netbsd.rs b/compiler/rustc_target/src/spec/base/netbsd.rs index be94ea23465..495e3d10fbc 100644 --- a/compiler/rustc_target/src/spec/base/netbsd.rs +++ b/compiler/rustc_target/src/spec/base/netbsd.rs @@ -9,6 +9,7 @@ pub fn opts() -> TargetOptions { has_rpath: true, position_independent_executables: true, relro_level: RelroLevel::Full, + has_thread_local: true, use_ctors_section: true, default_dwarf_version: 2, ..Default::default() diff --git a/library/std/src/sys/pal/unix/thread_local_dtor.rs b/library/std/src/sys/pal/unix/thread_local_dtor.rs index 58f7ab84101..7e19e6eb9eb 100644 --- a/library/std/src/sys/pal/unix/thread_local_dtor.rs +++ b/library/std/src/sys/pal/unix/thread_local_dtor.rs @@ -17,7 +17,10 @@ target_os = "android", target_os = "fuchsia", target_os = "redox", - target_os = "hurd" + target_os = "hurd", + target_os = "freebsd", + target_os = "netbsd", + target_os = "dragonfly" ))] // FIXME: The Rust compiler currently omits weakly function definitions (i.e., // __cxa_thread_atexit_impl) and its metadata from LLVM IR. |
