Skip to content

Clang + libstdc++ binaries to use rpath#632

Merged
nikobockerman merged 1 commit into
mainfrom
use-rpath-for-all-c++-stdlibs
Jul 25, 2026
Merged

Clang + libstdc++ binaries to use rpath#632
nikobockerman merged 1 commit into
mainfrom
use-rpath-for-all-c++-stdlibs

Conversation

@nikobockerman

Copy link
Copy Markdown
Owner

Binaries built with clang + libstdc++ from brew GCC didn't actually use same libstdc++ at runtime. Instead, they used system provided libstdc++. This change adds an rpath linker command to instruct ldd to load libstdc++.so.6 from the same brew GCC library dir that is used during linking.

Binaries built with clang + libstdc++ from brew GCC didn't actually use
same libstdc++ at runtime. Instead, they used system provided libstdc++.
This change adds an rpath linker command to instruct ldd to load
libstdc++.so.6 from the same brew GCC library dir that is used during
linking.
Copilot AI review requested due to automatic review settings July 25, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Ensures CI-built binaries that are compiled with Clang but linked against Homebrew GCC’s libstdc++ use the intended Homebrew-provided runtime library by adding an rpath to the link flags.

Changes:

  • Add -Wl,-rpath,<brew gcc libdir> to the preset linker flags used for Clang + libstdc++ builds.
  • Apply the same rpath addition for both executable and shared-library linker flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/files/CMakeUserPresets.json
@nikobockerman
nikobockerman merged commit c6437d5 into main Jul 25, 2026
53 checks passed
@nikobockerman
nikobockerman deleted the use-rpath-for-all-c++-stdlibs branch July 25, 2026 21:14
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.

2 participants