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

Newer glibc needs __GLIBC_FLT_EVAL_METHOD to be defined, but it is not. #53931

Closed
JonPsson opened this issue Feb 18, 2022 · 5 comments
Closed
Assignees
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

Comments

@JonPsson
Copy link
Contributor

Starting with 32b73bc "Add support for floating-point option ffp-eval-method and for pragma clang fp eval_method", clang fails during compiliation with "# error "Unknown __GLIBC_FLT_EVAL_METHOD"".

This happens on SystemZ with glibc 2.32, but not 2.30.

GCC defines these macros like:

#define FLT_EVAL_METHOD 0
#define FLT_EVAL_METHOD_TS_18661_3 0

and I suppose that's what is missing in Clang.

It see in llvm sources:

libcxx/include/float.h:#define FLT_EVAL_METHOD FLT_EVAL_METHOD

, but no definition of FLT_EVAL_METHOD anywhere...?

@JonPsson JonPsson added the clang Clang issues not falling into any other category label Feb 18, 2022
@EugeneZelenko EugeneZelenko added clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' and removed clang Clang issues not falling into any other category new issue labels Feb 18, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 18, 2022

@llvm/issue-subscribers-clang-driver

@jdoerfert
Copy link
Member

This happens for X86 as well, just include cmath and add -save-temps: https://godbolt.org/z/W1fWcx5sT

@zahiraam
Copy link
Contributor

Yes, Working on a fix. Thanks.

@zahiraam
Copy link
Contributor

This happens for X86 as well, just include cmath and add -save-temps: https://godbolt.org/z/W1fWcx5sT

I looked at the pre-processed output of #include and I don't see any reference of FLT_EVAL_METHOD?

@zahiraam
Copy link
Contributor

zahiraam commented Feb 23, 2022

I was able to reproduce the issue and this fix https://reviews.llvm.org/D120155 (edited with the review comments) has been added to the bigger patch https://reviews.llvm.org/D109239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Projects
None yet
Development

No branches or pull requests

6 participants