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

Use _GLIBXX_RELEASE instead of __GNUC__ to detect version of libstdc++ #53

Merged

Conversation

alexkaratarakis
Copy link
Collaborator

@alexkaratarakis alexkaratarakis commented Jul 19, 2023

clang defines the GNUC,GNUC_MINOR, GNUC_PATCHLEVEL macros, but they are hardcoded to version 4.2.1 and do not reflect the real version of libstdc++.

Instead, use _GLIBCXX_RELEASE. This allows proper libstdc++ version detection when compiling with clang (and using gcc libs)

clang defines the __GNUC__,__GNUC_MINOR__, __GNUC_PATCHLEVEL__ macros,
but they are hardcoded to version 4.2.1 and do not reflect the
real version of libstdc++.

Instead, use _GLIBCXX_RELEASE. This allows proper libstdc++ version
detection when compiling with clang (and using gcc libs)
@alexkaratarakis alexkaratarakis changed the title Use _GLIBXX_RELEASE instead of __GNUC__ to detect the version of libs… Use _GLIBXX_RELEASE instead of __GNUC__ to detect version of libstdc++ Jul 19, 2023
@alexkaratarakis alexkaratarakis merged commit f761e0e into teslamotors:main Jul 20, 2023
5 checks passed
@alexkaratarakis alexkaratarakis deleted the fix_libstdcpp_detection branch July 20, 2023 00:06
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.

1 participant