• Re: [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS

    From Wols Lists@21:1/5 to Nikos Chantziaras on Sat Mar 12 15:50:01 2022
    On 12/03/2022 14:22, Nikos Chantziaras wrote:
    On 12/03/2022 10:43, Dale wrote:
    https://bugs.gentoo.org/767700

    Is that the one?  It mentions the target but I don't quite understand
    the why.  The biggest thing, will this break something if I let it do
    it?

    No. Unlike GCC, LLVM/Clang is always a cross-compiler. This just enables
    some extra targets. It won't actually affect anything other than perhaps
    the binaries becoming a bit larger.


    I don't fully understand it (and I thought gcc was moving in the same direction), but Clang is a front-end, compiling C to "Intermediate Representation". LLVM is a middle/back end which calls optimisation
    modules on the IR which finally end up spitting out machine code - for
    whatever definition of machine code floats your boat.

    So I guess adding these extra targets just adds another LLVM module that
    just happens to spit out these extra different machine codes.

    But that's how LLVM can compile so many different languages - it simply converts IR to machine code. There's a whole bunch of different front
    ends, it's just that Clang is the most well known because the world and
    his dog work in C/C++. I believe there's a rust front end, amongst
    others, but it feels like other languages are a bit "second class". Not intentionally, but the C guys have so much input into the IR that the
    other languages get swamped, and people take a while to realise that
    what was a good decision for C was not a good decision for languages in general, and the other guys are playing catch-up because nobody noticed.

    That's not a dig at anybody, it's just life.

    I used to follow this on the LLVM mailing list, but that's now migrated
    to discourse, and I think I'm amongst a lot of people who didn't follow
    it ...

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nikos Chantziaras@21:1/5 to Dale on Sat Mar 12 15:30:01 2022
    On 12/03/2022 10:43, Dale wrote:
    https://bugs.gentoo.org/767700

    Is that the one?  It mentions the target but I don't quite understand
    the why.  The biggest thing, will this break something if I let it do
    it?

    No. Unlike GCC, LLVM/Clang is always a cross-compiler. This just enables
    some extra targets. It won't actually affect anything other than perhaps
    the binaries becoming a bit larger.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Nikos Chantziaras on Sat Mar 12 17:10:01 2022
    On 2022-03-12, Nikos Chantziaras <realnc@gmail.com> wrote:
    On 12/03/2022 10:43, Dale wrote:
    https://bugs.gentoo.org/767700

    Is that the one?  It mentions the target but I don't quite understand
    the why.  The biggest thing, will this break something if I let it do
    it?

    No. Unlike GCC, LLVM/Clang is always a cross-compiler.

    You can't use LLVM/Clang to compile for the host on which it's
    running?

    --
    Grant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Nikos Chantziaras on Sat Mar 12 18:40:01 2022
    Nikos Chantziaras wrote:
    On 12/03/2022 10:43, Dale wrote:
    https://bugs.gentoo.org/767700

    Is that the one?  It mentions the target but I don't quite understand
    the why.  The biggest thing, will this break something if I let it do
    it?

    No. Unlike GCC, LLVM/Clang is always a cross-compiler. This just
    enables some extra targets. It won't actually affect anything other
    than perhaps the binaries becoming a bit larger.





    I'm doing this in a chroot so it is recoverable if it was a problem but
    now I know it's OK to do on my main install.  I still find it odd but if
    it is needed and there is a reason for it, sounds good to me. 

    If this were a bad thing tho, this is why it is always good to look at
    the output before doing a update.  If this was a serious package that
    would cause widespread breakage, one would want to catch this.  I've
    sort of read about llvm and clang and I seem to recall things like
    Firefox needing them or something.  Even if it did break things, I don't
    think it would cause breakage to the point of rendering a system
    unbootable or anything.  Still, I check the output of updates for this reason.  If nothing else, I could have caught the tree in the middle of
    a change and missed some important bits. 

    Thanks to all for the info. 

    Dale

    :-)  :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nikos Chantziaras@21:1/5 to Grant Edwards on Sat Mar 12 22:50:01 2022
    On 12/03/2022 18:03, Grant Edwards wrote:
    On 2022-03-12, Nikos Chantziaras <realnc@gmail.com> wrote:
    On 12/03/2022 10:43, Dale wrote:
    https://bugs.gentoo.org/767700

    Is that the one?  It mentions the target but I don't quite understand
    the why.  The biggest thing, will this break something if I let it do
    it?

    No. Unlike GCC, LLVM/Clang is always a cross-compiler.

    You can't use LLVM/Clang to compile for the host on which it's
    running?

    Why not?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Nikos Chantziaras on Sun Mar 13 05:00:01 2022
    On 2022-03-12, Nikos Chantziaras <realnc@gmail.com> wrote:
    On 12/03/2022 18:03, Grant Edwards wrote:
    On 2022-03-12, Nikos Chantziaras <realnc@gmail.com> wrote:
    On 12/03/2022 10:43, Dale wrote:
    https://bugs.gentoo.org/767700

    Is that the one?  It mentions the target but I don't quite understand >>>> the why.  The biggest thing, will this break something if I let it do >>>> it?

    No. Unlike GCC, LLVM/Clang is always a cross-compiler.

    You can't use LLVM/Clang to compile for the host on which it's
    running?

    Why not?

    Because "LLVM/Clang is always a cross compiler".

    A cross compiler is a compiler that compiles for a target
    architecture/OS different than that of the host on which it is
    running.

    Therefore, LLVM/Clang always compiles for a target architecture/OS
    different than that of the host on which it is running.

    --
    Grant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wols Lists@21:1/5 to Dale on Sun Mar 13 09:10:01 2022
    On 12/03/2022 17:36, Dale wrote:
    I've
    sort of read about llvm and clang and I seem to recall things like
    Firefox needing them or something.

    I've just watched firefox emerging (yes I know, paint drying and all
    that :-), and there's loads of Rust code in there.

    To the best of my knowledge, gcc can't currently handle Rust, so yes
    LLVM is needed. (Not Clang, because it isn't C :-) (Although Firefox
    probably also uses loads of C, so Clang would be needed for that.)

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Peter Humphrey on Sun Mar 13 12:10:01 2022
    Peter Humphrey wrote:
    On Sunday, 13 March 2022 08:03:04 GMT Wols Lists wrote:

    To the best of my knowledge, gcc can't currently handle Rust, so yes
    LLVM is needed. (Not Clang, because it isn't C :-) (Although Firefox
    probably also uses loads of C, so Clang would be needed for that.)
    And that's why we have dev-lang/rust on hand, no?



    So, it takes rust, gcc, clang and maybe some other stuff to make
    Firefox???  Jeez, that sounds complicated.  o_O  Sounds like a recipe
    for a soup or something.  ROFL

    I might add, I did finish the updates and everything compiled and works
    fine.  So, it is safe to have all those options enabled.  Weird but
    safe.  ;-)

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Sun Mar 13 11:30:01 2022
    On Sunday, 13 March 2022 08:03:04 GMT Wols Lists wrote:

    To the best of my knowledge, gcc can't currently handle Rust, so yes
    LLVM is needed. (Not Clang, because it isn't C :-) (Although Firefox
    probably also uses loads of C, so Clang would be needed for that.)

    And that's why we have dev-lang/rust on hand, no?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)