Live data from Hacker News

What the hell is a target triple?

mcyoung.xyz

41–50 of 139 posts

Re: What the hell is a target triple?

#41
post #37

Why does this person have such negative views of GCC and positive bias towards LLVM?

Seems to have a decent amount of knowledge in this domain in education and professional work. Author is from MIT so maybe professors had a lot of influence here. also, gcc is relatively old and comes with a lot of baggage. LLVM is sort of the defacto standard now with improvements in performance

> LLVM is sort of the defacto standard now...

Distributions, and therefore virtually all the software used by a distribution user, still generally use gcc. LLVM is only the de facto standard when doing something new, and for JIT.

Re: What the hell is a target triple?

#42

Noticed endians listed in the table. It seems like little-endian has basically taken over the world in 2025: * https://en.wikipedia.org/wiki/Endianness#Hardware Is there anything that is used a lot that is not little? IBM's stuff? Network byte order is BE: * https://en.wikipedia.org/wiki/Endianness#Networking

IBM's Power chips can run in either little or big modes, but "used a lot" is a stretch

Re: What the hell is a target triple?

#43
post #31

Offtopic, but I'm distracted by the opening example: > After all, you don’t want to be building your iPhone app on literal iPhone hardware. iPhones are impressively powerful, but you wouldn't know it from the software lockdown that Apple holds on it. Example: https://www.tomsguide.com/phones/iphones/iphone-16-is-actual... There's a reason people were clamoring for Apple to make ARM laptops/desktops for years before A…

A more pertinent (if dated) example would be " you don't want to be building your GBA game on literal Game Boy Advance hardware ".

Or a microcontroller

Re: What the hell is a target triple?

#44

The author's blog is a FANTASTIC source of information. I recommend checking out some of their other posts: - https://mcyoung.xyz/2021/06/01/linker-script/ - https://mcyoung.xyz/2023/08/09/yarns/ - https://mcyoung.xyz/2023/08/01/llvm-ir/

Given TFA's bias against GCC, I'm not so sure. e.g. looking at the linker script article… it's also missing the __start_XYZ and __stop_XYZ symbols automatically created by the linker.

Re: What the hell is a target triple?

#45

Noticed endians listed in the table. It seems like little-endian has basically taken over the world in 2025: * https://en.wikipedia.org/wiki/Endianness#Hardware Is there anything that is used a lot that is not little? IBM's stuff? Network byte order is BE: * https://en.wikipedia.org/wiki/Endianness#Networking

Some ARM stuff.

Re: What the hell is a target triple?

#46
post #37

Why does this person have such negative views of GCC and positive bias towards LLVM?

Seems to have a decent amount of knowledge in this domain in education and professional work. Author is from MIT so maybe professors had a lot of influence here. also, gcc is relatively old and comes with a lot of baggage. LLVM is sort of the defacto standard now with improvements in performance

as someone who uses both Clang and GCC to cover eachothers weaknesses, as far as I can tell both LLVM and GCC are hopelessly beastly codebases in terms of raw size and their complexity. I think that's just what happens when people desire to build an "everything compiler".

From what I gathered, LLVM has a lot of C++ specific design choices in its IR language anyway. I think I'd count that as baggage.

I personally don't think one is better than the other. Sometimes clang produces faster code, sometimes gcc. I haven't really dealt with compiler bugs from either. They compile my projects at the same speed. Clang is better at certain analyses, gcc better at certain others.

Re: What the hell is a target triple?

#47

Offtopic, but I'm distracted by the opening example: > After all, you don’t want to be building your iPhone app on literal iPhone hardware. iPhones are impressively powerful, but you wouldn't know it from the software lockdown that Apple holds on it. Example: https://www.tomsguide.com/phones/iphones/iphone-16-is-actual... There's a reason people were clamoring for Apple to make ARM laptops/desktops for years before A…

I do not think I like this author... > A critical piece of history here is to understand the really stupid way in which GCC does cross compiling. Traditionally, each GCC binary would be built for one target triple. [...] Nobody with a brain does this ^2 You're doing GCC a great disservice by ignoring its storied and essential history. It's over 40 years old, and was created at a time where there were no free/libre co…

"This was the right way to do it forty years ago, so that's why the experience is worse" isn't a compelling reason for a user to suffer today.

Also, in this specific case, this ignores the history around LLVM offering itself up to the FSF. gcc could have benefitted from this fresh start too. But purely by accident, it did not.

Re: What the hell is a target triple?

#48

Offtopic, but I'm distracted by the opening example: > After all, you don’t want to be building your iPhone app on literal iPhone hardware. iPhones are impressively powerful, but you wouldn't know it from the software lockdown that Apple holds on it. Example: https://www.tomsguide.com/phones/iphones/iphone-16-is-actual... There's a reason people were clamoring for Apple to make ARM laptops/desktops for years before A…

I do not think I like this author... > A critical piece of history here is to understand the really stupid way in which GCC does cross compiling. Traditionally, each GCC binary would be built for one target triple. [...] Nobody with a brain does this ^2 You're doing GCC a great disservice by ignoring its storied and essential history. It's over 40 years old, and was created at a time where there were no free/libre co…

The older I get the more this kind of commentary (the OP, not you!) is a total turn off. Systems evolve and there's usually, not always, a reason for why "things are the way they are". It's typically arrogance to have this kind of tone. That said I was a bit like that when I was younger, and it took a few knockings down to realise the world is complex.

Re: What the hell is a target triple?

#49
post #38

This article should be ignored, since it disregards the canonical origin of target triples (and the fact that it's linked to `configure`): https://git.savannah.gnu.org/cgit/config.git/tree/ The `testsuite/` directory contains some data files with a fairly extensive list of known targets. The vendor field should be considered fully extensible, and new combinations of know machine/kernel/libc shouldn't be considered in…

[deleted]

Re: What the hell is a target triple?

#50

Why does this person have such negative views of GCC and positive bias towards LLVM?

I have intense respect for the history of gcc, but everything about using it screams that it's stuck in the past.

LLVM has a lot of problems, but it feels significantly more modern.

I do wish we had a "new LLVM" doing to LLVM what it did to gcc. Just because it's better doesn't mean it's perfect.

Basically, you can respect history while also being honest about the current state of things. But also, doing so requires you to care primarily about things like ease of use, rather than things like licenses. For some people, they care about licenses first, usability second.

Post reply on HN