Triplets or.. quartets?

What is referred to as target triplets seems to map to the concatenation(separated by hyphens) of 4, not 3, values(target_arch, target_vendor,target_os, target_env):
E.g. target 64 bit Linux: "x86_64-unknown-linux-gnu":
target_arch="x86_64"
target_vendor="unknown"
target_os="linux"
target_env="gnu"

So, why aren't they called "quartets" ?

Regards,
Carl Michael Skog

Probably because the second component (of the four) seems to be optional.

LLVM says the environment is optional:
https://llvm.org/docs/LangRef.html#target-triple

In OSDev Wiki, they seem to count the environment as part of the operating system:
https://wiki.osdev.org/Target_Triplet

Autoconf seems to agree:
https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html

I see !
Thanks for the instructive answers !

Regards

There must be some law that says you have to have an off-by-one error in naming of targets. Debian has 3-component targets like arm-linux-gnu and calls them tuples.

6 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.