Skip to content

Commit

Permalink
Rollup merge of rust-lang#120188 - devnexen:update_bsd_compiler_base_…
Browse files Browse the repository at this point in the history
…specs, r=wesleywiser

compiler: update freebsd and netbsd base specs.

both support thread local.
  • Loading branch information
fmease committed Jan 23, 2024
2 parents 8b069cc + ed4b99a commit 9c28877
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/base/dragonfly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/base/freebsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/base/netbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 4 additions & 1 deletion library/std/src/sys/pal/unix/thread_local_dtor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9c28877

Please sign in to comment.