Summary: | sys-devel/llvm-3.1-r2 fails to compile on PPC64 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Bernard Cafarelli <voyageur> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kai, mgorny |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | fixed in 3.3-r1 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 320221 | ||
Attachments: |
build.log
Patch to fix the failure |
Description
Agostino Sarubbo
2012-12-11 17:42:46 UTC
> sibling call optimization to `llvm::TargetData::getTypeAllocSize(llvm::Type*) const' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `llvm::TargetData::getTypeAllocSize(llvm::Type*) const' extern
Hmm... llvm 3.2 release notes mention "PPC64 relocation support and (small code model) TOC handling added" among a big list of "PowerPC Target Improvements". Can you test with 3.2_rc3? (package.masked in tree) If that one works, we can wait for ppc64 keywording until 3.2
fails too LLVM compiles only if the flag -mminimal-toc is passed to gcc/g++. Created attachment 349806 [details, diff]
Patch to fix the failure
The fix is to add use ppc64 && append-flags "-mminimal-toc" in the configure step. I tested this with llvm-9999 but should apply to all user versions, too.
Is this a suitable change for upstream as well? We don't really want to keep hacking this around indefinitely. (In reply to Michał Górny from comment #5) > Is this a suitable change for upstream as well? We don't really want to keep > hacking this around indefinitely. Good questions. I will discuss this on the llvm mailing list. (In reply to Michał Górny from comment #5) > Is this a suitable change for upstream as well? We don't really want to keep > hacking this around indefinitely. I posted a patch upstream: http://article.gmane.org/gmane.comp.compilers.llvm.cvs/147365 It really depends on the compiler version. The flag is only required for gcc < 4.6. Could you retry with 3.3-r1, please? |