Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .#153718
Open
asomers wants to merge 1 commit intorust-lang:mainfrom
Open
Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .#153718asomers wants to merge 1 commit intorust-lang:mainfrom
asomers wants to merge 1 commit intorust-lang:mainfrom
Conversation
Instead of relying on the linker to find the 'environ' symbol, use dlsym. Fixes rust-lang#153451 Sponsored by: ConnectWise
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Collaborator
|
Member
|
cc @MikaelUrankar as the other freebsd target maintainer It seems not entirely unreasonable to me. @bors r+ |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 22, 2026
…mulacrum Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined . Instead of relying on the linker to find the 'environ' symbol, use dlsym. This fixes using `environ` from cdylibs that link with `-Wl,--no-undefined` . Fixes rust-lang#153451 Sponsored by: ConnectWise
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 22, 2026
…mulacrum Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined . Instead of relying on the linker to find the 'environ' symbol, use dlsym. This fixes using `environ` from cdylibs that link with `-Wl,--no-undefined` . Fixes rust-lang#153451 Sponsored by: ConnectWise
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 22, 2026
…mulacrum Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined . Instead of relying on the linker to find the 'environ' symbol, use dlsym. This fixes using `environ` from cdylibs that link with `-Wl,--no-undefined` . Fixes rust-lang#153451 Sponsored by: ConnectWise
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 23, 2026
…uwer Rollup of 22 pull requests Successful merges: - #122668 (Add APIs for dealing with titlecase) - #152543 (privacy: Fix type privacy holes in RPITITs) - #153107 (Optimize BTreeMap::append() using CursorMut) - #153312 (Packages as namespaces part 1) - #153534 (Remove a flaky `got_timeout` assert from two channel tests) - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .) - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname) - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests) - #153931 (remove usages of to-be-deprecated numeric constants) - #150630 (Unknown -> Unsupported compression algorithm) - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`) - #153582 (Simplify find_attr! for HirId usage) - #153623 (std: move `sys::pal::os` to `sys::paths`) - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes) - #153936 (Skip stack_start_aligned for immediate-abort) - #154011 (implement `BinaryHeap::as_mut_slice`) - #154167 (ui/lto: move and rename two tests from issues/) - #154174 (allow `incomplete_features` in most UI tests) - #154175 (Add new alias for Guillaume Gomez email address) - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - #154188 (Update the tracking issue for #[diagnostic::on_move]) - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 23, 2026
…uwer Rollup of 22 pull requests Successful merges: - #122668 (Add APIs for dealing with titlecase) - #152543 (privacy: Fix type privacy holes in RPITITs) - #153107 (Optimize BTreeMap::append() using CursorMut) - #153312 (Packages as namespaces part 1) - #153534 (Remove a flaky `got_timeout` assert from two channel tests) - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .) - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname) - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests) - #153931 (remove usages of to-be-deprecated numeric constants) - #150630 (Unknown -> Unsupported compression algorithm) - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`) - #153582 (Simplify find_attr! for HirId usage) - #153623 (std: move `sys::pal::os` to `sys::paths`) - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes) - #153936 (Skip stack_start_aligned for immediate-abort) - #154011 (implement `BinaryHeap::as_mut_slice`) - #154167 (ui/lto: move and rename two tests from issues/) - #154174 (allow `incomplete_features` in most UI tests) - #154175 (Add new alias for Guillaume Gomez email address) - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - #154188 (Update the tracking issue for #[diagnostic::on_move]) - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 23, 2026
…mulacrum Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined . Instead of relying on the linker to find the 'environ' symbol, use dlsym. This fixes using `environ` from cdylibs that link with `-Wl,--no-undefined` . Fixes rust-lang#153451 Sponsored by: ConnectWise
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 23, 2026
…uwer Rollup of 21 pull requests Successful merges: - #152543 (privacy: Fix type privacy holes in RPITITs) - #153107 (Optimize BTreeMap::append() using CursorMut) - #153312 (Packages as namespaces part 1) - #153534 (Remove a flaky `got_timeout` assert from two channel tests) - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .) - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname) - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests) - #153931 (remove usages of to-be-deprecated numeric constants) - #150630 (Unknown -> Unsupported compression algorithm) - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`) - #153582 (Simplify find_attr! for HirId usage) - #153623 (std: move `sys::pal::os` to `sys::paths`) - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes) - #153936 (Skip stack_start_aligned for immediate-abort) - #154011 (implement `BinaryHeap::as_mut_slice`) - #154167 (ui/lto: move and rename two tests from issues/) - #154174 (allow `incomplete_features` in most UI tests) - #154175 (Add new alias for Guillaume Gomez email address) - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - #154188 (Update the tracking issue for #[diagnostic::on_move]) - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of relying on the linker to find the 'environ' symbol, use dlsym. This fixes using
environfrom cdylibs that link with-Wl,--no-undefined.Fixes #153451
Sponsored by: ConnectWise