Quoting Zack Weinberg (2023-09-10 17:52:46)
> My suggested place to draw the line is, if you reasonably need a
> cross-compiler targeting A to be different from a cross-compiler targeting B,
> then the distinction between A and B can go in the canonical system name; if
> you don't, then it shouldn't.

The definition I've been using is: if you can link (both statically and if
applicable dynamically) their binaries into a single executable, they're the
same triple [*].

I think this is almost-equivalent, but additionally it explains why
x86_64-linux-gnu and x86_32-linux-gnu are different triples even though you can
use a single native compiler to produce binaries for either one.

For example, the recent powerpc64le-linux-gnu switch to ieee-standard floating
point didn't change the triple because glibc went to great (extreme?) lengths to
let you mix ieee-float and ibm-float binaries in the same executable.  OTOH
armhf-*-* is different from arm-*-* because of the regrettable decision to use a
different calling convention when the FPU is enabled.


[*] The one exception to this rule is i386-*/i486-*/i586-*/i686-* -- but they
    should be avoided these days anyways.

Reply via email to