KEMBAR78
os/linux/ld: add support for using system ld.so by cho-m · Pull Request #20633 · Homebrew/brew · GitHub
Skip to content

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Sep 4, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Adding ability to query the system's ld.so --list-diagnostics to work even if brew glibc is installed

brew(main):001> OS::Linux::Ld.system_ld_so
=> #<Pathname:/lib/ld-linux-aarch64.so.1>

brew(main):002> OS::Linux::Ld.system_dirs
=> ["/home/linuxbrew/.linuxbrew/Cellar/glibc/2.35_1/lib/"]

brew(main):003> OS::Linux::Ld.system_dirs(brewed: false)
=> ["/lib/aarch64-linux-gnu/", "/usr/lib/aarch64-linux-gnu/", "/lib/", "/usr/lib/"]

brew(main):004> OS::Linux::Ld.library_paths
=> ["/home/linuxbrew/.linuxbrew/opt/glibc/lib", "/home/linuxbrew/.linuxbrew/lib"]

brew(main):005> OS::Linux::Ld.library_paths(brewed: false)
=> ["/usr/local/lib/aarch64-linux-gnu", "/lib/aarch64-linux-gnu", "/usr/lib/aarch64-linux-gnu", "/usr/local/lib"]

@cho-m cho-m mentioned this pull request Sep 4, 2025
7 tasks
@cho-m cho-m force-pushed the ld-system branch 3 times, most recently from 41f4f98 to 2ae7c6d Compare September 4, 2025 20:34
@cho-m cho-m marked this pull request as ready for review September 4, 2025 20:37
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One small optional nit.

@cho-m
Copy link
Member Author

cho-m commented Sep 11, 2025

Will merge later today so I can continue GCC 12 PR. Wait a few hours in case any last comments (can also follow up on anything afterward).

@cho-m cho-m added this pull request to the merge queue Sep 12, 2025
Merged via the queue into main with commit eda9e78 Sep 12, 2025
36 checks passed
@cho-m cho-m deleted the ld-system branch September 12, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants