Summary: | clang++ fails to produce a binary in powerpc64 | ||
---|---|---|---|
Product: | Base System | Reporter: | Julio Merino <julio+host-g5-jmmv> |
Component: | powerpc | Assignee: | freebsd-ppc (Nobody) <ppc> |
Status: | Closed Feedback Timeout | ||
Severity: | Affects Only Me | CC: | jhibbits, jmmv, marklmi26-fbsd |
Priority: | Normal | ||
Version: | 9.1-STABLE | ||
Hardware: | Any | ||
OS: | Any |
Description
Julio Merino
2013-04-22 04:10:00 UTC
Does this still happen with latest? There are hoops to jump through to build head's clang, as it doesn't build with base gcc (need to buildworld with CC=clang CXX=clang, or gcc48, etc). I've successfully built many binaries on FreeBSD, and I believe most, if not all, of head can be built with clang now (except csu, which still needs gcc to build). It's been 2 years since the last request for update. I've built many binaries on FreeBSD head with clang since then, but have not tried to reproduce the test conditions. [This is not an objection to closing 178038. It is more of a status note since while kyua builds it does not work.] I've built kyua via system clang 3.8 and later for powerpc family members. The builds completed. But even as of clang 4.0 the code generation is bad and kyua fails to run. This is for both TARGET_ARCH=powerpc64 and TARGET_ARCH=powerpc. All of the below applies to clang 4.0 (so far). kyua makes extensive use of C++ exception handling, among other things. One problem for both TARGET_ARCH's is that handling thrown C++ exceptions is messed up. Even: #include <exception> int main(void) { try { throw std::exception(); } catch (std::exception& e) {} return 0; } fails. This makes kyua currently useless. TARGET_ARCH=powerpc also has problems with use and restore of R31 when floating point code is involved (restored for returning but later used for floating point code expecting R31 to not have been restored yet). (There may be more issues for one or both TARGET_ARCH's but the above is sufficient to classify clang as broken for kyua.) Sorry, I don't have my powerpc64 machine any longer, so I cannot try to see if this is fixed. |