* Re: [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-12 14:22 ` [gentoo-user] " Nikos Chantziaras
@ 2022-03-12 14:39 ` Wols Lists
2022-03-12 16:03 ` Grant Edwards
2022-03-12 17:36 ` Dale
2 siblings, 0 replies; 13+ messages in thread
From: Wols Lists @ 2022-03-12 14:39 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-12 14:22 ` [gentoo-user] " Nikos Chantziaras
2022-03-12 14:39 ` Wols Lists
@ 2022-03-12 16:03 ` Grant Edwards
2022-03-12 21:49 ` Nikos Chantziaras
2022-03-12 17:36 ` Dale
2 siblings, 1 reply; 13+ messages in thread
From: Grant Edwards @ 2022-03-12 16:03 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-12 16:03 ` Grant Edwards
@ 2022-03-12 21:49 ` Nikos Chantziaras
2022-03-13 3:57 ` Grant Edwards
0 siblings, 1 reply; 13+ messages in thread
From: Nikos Chantziaras @ 2022-03-12 21:49 UTC (permalink / raw
To: gentoo-user
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?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-12 21:49 ` Nikos Chantziaras
@ 2022-03-13 3:57 ` Grant Edwards
0 siblings, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2022-03-13 3:57 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-12 14:22 ` [gentoo-user] " Nikos Chantziaras
2022-03-12 14:39 ` Wols Lists
2022-03-12 16:03 ` Grant Edwards
@ 2022-03-12 17:36 ` Dale
2022-03-13 8:03 ` Wols Lists
2 siblings, 1 reply; 13+ messages in thread
From: Dale @ 2022-03-12 17:36 UTC (permalink / raw
To: gentoo-user
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
:-) :-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-12 17:36 ` Dale
@ 2022-03-13 8:03 ` Wols Lists
2022-03-13 10:26 ` Peter Humphrey
0 siblings, 1 reply; 13+ messages in thread
From: Wols Lists @ 2022-03-13 8:03 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-13 8:03 ` Wols Lists
@ 2022-03-13 10:26 ` Peter Humphrey
2022-03-13 11:05 ` Dale
0 siblings, 1 reply; 13+ messages in thread
From: Peter Humphrey @ 2022-03-13 10:26 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: sys-devel/llvm and LLVM_TARGETS
2022-03-13 10:26 ` Peter Humphrey
@ 2022-03-13 11:05 ` Dale
0 siblings, 0 replies; 13+ messages in thread
From: Dale @ 2022-03-13 11:05 UTC (permalink / raw
To: gentoo-user
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
:-) :-)
^ permalink raw reply [flat|nested] 13+ messages in thread