Summary: | sys-libs/llvm-libunwind-13.0.0: fails to build on ppc (libunwind.cpp:80:57: error: ‘REGISTER_KIND’ was not declared in this scope) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://reviews.llvm.org/D118320 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 779742 | ||
Attachments: | build.log |
Description
Sam James
2022-01-27 07:07:08 UTC
REGISTER_KIND for PPC64 and PPC32 is defined here: https://github.com/llvm/llvm-project/blob/bab39816085d715e52c2131fa249ccd10178764b/libunwind/src/libunwind.cpp#L52-L55 Apparently __ppc__ is not defined by GCC, but probably it is defined by Clang. GCC on PPC32 defines: PPC, __PPC, __PPC__, _ARCH_PPC, powerpc, __powerpc, __powerpc__ Sam James confirmed that manually appending -D__ppc__ to CFLAGS / CXXFLAGS fixes compilation failure. Possible simple solution in ebuild: if use ppc && tc-is-gcc; then append-flags -D__ppc__ fi Fixes: https://github.com/llvm/llvm-project/commit/cd20e579df07517a4ddbf6eef58b96d04f6bd9a9 https://github.com/llvm/llvm-project/commit/11c2ef5638c3cff489744f1d342cd92e2a864614 Fixed in 13.0.1 (backported in Gentoo). |