Hacker News new | ask | show | jobs
by cbmuser 933 days ago
The article doesn’t mention whether Debian or Raspian was installed. And, in case of Debian, whether the armel or armhf port is being used.

Without that information, it’s pretty pointless to make claims about the instruction set LLVM compiles to because that’s a matter of what native target LLVM has been configured for.

FWIW, in Debian, llvm-toolchaim-snapshot still supports armel which uses ARMv5T as the baseline (there is currently an unrelated bug in LLVM’s OpenMP library though which prevents a successful build).

1 comments

What's weird is that the Clang binary is clearly compiled for an instruction set that is compatible with the Pi B+, but it doesn't target an instruction set that is compatible with the Pi B+. This is genuinely weird, since that's not meant to be a cross-compiler; in theory, the host and the target should be the same.

Presumably the image is Raspbian. I don't see a reason why not to assume that.

One key thing is missing from your comment (which explains the 'weirdness') - clang, and other llvm-family tools are cross-compatible by default. There is no separate cross compilation binary. This is just a configuration bug.
Yes, that's true, although it doesn't actually explain the weirdness. I compile Clang all the time and there's no obvious reason why you'd get cross-compiled binaries out of Clang if you just compile and install it normally. The bug, configuration or otherwise, is the weirdness.