Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: LLVM/Clang Can Build LibreOffice

  1. #1
    Join Date
    Jan 2007
    Posts
    15,697

    Default LLVM/Clang Can Build LibreOffice

    Phoronix: LLVM/Clang Can Build LibreOffice

    Clang, the C/C++ compiler for LLVM, can now build a patched version of LibreOffice...

    http://www.phoronix.com/vr.php?view=MTAwNDM

  2. #2
    Join Date
    Sep 2007
    Location
    Connecticut,USA
    Posts
    985

    Default

    I would say Clang/LLVM would be really feature-complete if it can properly compile *unpatched* applications. Having to apply patches to application or kernel code to make it properly compile on Clang/LLVM sounds to me like it still isn't quite ready.

  3. #3
    Join Date
    Sep 2008
    Posts
    332

    Default

    i would classify this as bugs ans not missing features

  4. #4
    Join Date
    Nov 2008
    Posts
    787

    Default

    Quote Originally Posted by DeepDayze View Post
    I would say Clang/LLVM would be really feature-complete if it can properly compile *unpatched* applications.
    unpatched *standards-compliant, bug-free* applications? Sure. If there ever was such a thing.

    Browsing through the small list of patches, it appears that many of these fix bugs in LibreOffice, where the code relies on gcc's quirks or gcc's acceptance of non-standard code.

    At least one of them is clearly a workaround due to llvm bugs. Then again, do you know how many workarounds due to gcc bugs LO's codebase contains?

  5. #5
    Join Date
    Sep 2007
    Location
    Connecticut,USA
    Posts
    985

    Default

    Quote Originally Posted by rohcQaH View Post
    unpatched *standards-compliant, bug-free* applications? Sure. If there ever was such a thing.

    Browsing through the small list of patches, it appears that many of these fix bugs in LibreOffice, where the code relies on gcc's quirks or gcc's acceptance of non-standard code.

    At least one of them is clearly a workaround due to llvm bugs. Then again, do you know how many workarounds due to gcc bugs LO's codebase contains?
    So you saying Clang/LLVM is using strict interpretations of how code's to be compiled vs gcc? So then these patches are quite instructive to the gcc team as these patches point out some quirks within gcc itself that need to be addressed.

    I'm sure there are bugs in gcc and application and kernel developers work around them, and same thing would apply for LLVM's own quirks and bugs...so yes you are right

    However altering code due to compiler bugs should be ideally kept to a minimum
    Last edited by DeepDayze; 10-22-2011 at 01:46 PM.

  6. #6
    Join Date
    Jul 2011
    Posts
    50

    Default

    ... and the generated executable evidently doesn't work
    That hardly classifies as "building" for me. The language parser has seen some improvement again, okay, so that it doesn't err on the source code. But if I make a program that can only parse the source files but produces garbage binary output, that won't be called a compiler. So I'll acknowledge that it can "build" LibreOffice once the output really works.

  7. #7
    Join Date
    Nov 2008
    Posts
    787

    Default

    Quote Originally Posted by DeepDayze View Post
    So you saying Clang/LLVM is using strict interpretations of how code's to be compiled vs gcc?
    No, I'm saying it's using a different set of strictness, different behaviour for things that the C standard determines to be "undefined", different compiler specific extensions and different subtle bugs and shortcomings.

    Quote Originally Posted by DeepDayze View Post
    However altering code due to compiler bugs should be ideally kept to a minimum
    The thing is, this has already happened, by virtue of OOo/LO being developed using gcc. If OOo/LO had been developed on LLVM, we'd now need patches to compile LO on gcc.

    The fact that LLVM needs some patches on a gcc-developed project does not allow us to determine which is the better compiler. It merely tells us that the compilers aren't identical.


    Quote Originally Posted by ultimA View Post
    [..]But if I make a program that can only parse the source files but produces garbage binary output, that won't be called a compiler. So I'll acknowledge that it can "build" LibreOffice once the output really works.
    You may want to read the linked article. It's a valid binary, but it crashes during startup. Whether that's due to a bug in LLVM or a bug in LO (i.e. reliance on gcc specific behaviour) hasn't been researched yet.

  8. #8
    Join Date
    Jul 2011
    Posts
    50

    Default

    I did read it before. Compiling something that does not work when it should is not considered a valid output, so it's all the same. Except if it is due to GCC-specific behaviour, then I take my words back. I mean, there is not much difference between not producing a usable output, and producing a valid binary that is not usable. But, you're right, LO might be relying on some non-standard GCC thing, if that is the only cause then I am sorry.
    Last edited by ultimA; 10-22-2011 at 05:11 PM.

  9. #9
    Join Date
    Jan 2010
    Posts
    160

    Default

    This is as much a non News as the Plymouth one.

    It builds now but what it builds is crap! Yay!

    I'm pretty sure I'm also able to build a compiler that can generate code that doesn't work. o.O
    (this is not aimed against Clang, it's aimed against the non news)
    Last edited by Ragas; 10-22-2011 at 05:57 PM.

  10. #10
    Join Date
    Oct 2008
    Posts
    902

    Default

    Quote Originally Posted by Ragas View Post
    I'm pretty sure I'm also able to build a compiler that can generate code that doesn't work. o.O
    But can you end the mono-culture that exists around gcc that results in blog posts about patches that allow something else to build?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •