Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic-stdc++ #400

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Conversation

keith
Copy link
Member

@keith keith commented Oct 11, 2024

Depending on your project statically linking libstdc++ from your sysroot
might not be viable. For example if you rely on other shared libraries
that link the shared version, linking the static version to a binary
might result in ODR violations. This new dynamic-stdc++ sets the
compile flags correctly but doesn't force the static version, so the
sysroot's shared version will be preferred.

@rrbutani rrbutani removed their request for review October 11, 2024 18:55
@keith
Copy link
Member Author

keith commented Oct 11, 2024

i think i need diff flag here, in my testing it's still using the static version

@keith
Copy link
Member Author

keith commented Oct 11, 2024

nvm, this does work as long as you have a valid libstdc++.so in the sysroot

@keith keith force-pushed the ks/add-system-stdc-for-shared-libstdc-linking branch from 9bbf559 to ab5f458 Compare October 11, 2024 20:20
Copy link
Member

@fmeum fmeum left a comment

Choose a reason for hiding this comment

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

LGTM modulo naming

@keith keith requested review from fmeum and jmillikin December 20, 2024 00:16
@fmeum fmeum force-pushed the ks/add-system-stdc-for-shared-libstdc-linking branch from e882bcb to 1bccf2d Compare December 20, 2024 06:23
@fmeum fmeum enabled auto-merge (squash) December 20, 2024 06:24
@keith keith changed the title Add system-stdc++ for shared libstdc++ linking Add dynamic-stdc++ for shared libstdc++ linking Dec 20, 2024
@keith keith changed the title Add dynamic-stdc++ for shared libstdc++ linking Add dynamic-stdc++ Dec 20, 2024
@keith
Copy link
Member Author

keith commented Dec 20, 2024

ci fix: #427

Depending on your project statically linking libstdc++ from your sysroot
might not be viable. For example if you rely on other shared libraries
that link the shared version, linking the static version to a binary
might result in ODR violations. This new `system-stdc++` sets the
compile flags correctly but doesn't force the static version, so the
sysroot's shared version will be preferred.
@keith keith force-pushed the ks/add-system-stdc-for-shared-libstdc-linking branch from 1bccf2d to 5ed9eda Compare December 20, 2024 20:43
@keith keith disabled auto-merge December 20, 2024 20:43
@keith keith enabled auto-merge (squash) December 20, 2024 20:44
@keith keith merged commit 40ba838 into master Dec 20, 2024
36 checks passed
@keith keith deleted the ks/add-system-stdc-for-shared-libstdc-linking branch December 20, 2024 21:39
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