Live data from Hacker News

Clang now makes binaries an original Pi B+ can't run

rachelbythebay.com

11–20 of 150 posts

Re: Clang now makes binaries an original Pi B+ can't run

#11
post #4

You'll see a whole bandwagon of people saying things like, "supporting old hardware is BAD! It takes time and money that nobody has!", as though someone needs to be hired to sit around and do nothing but pore over code and constantly rewrite code for old hardware. There's plenty of evidence to the contrary, but since when has evidence mattered when it comes to defending the right of big business / big distro to do wh…

> sit around and do nothing but pore over code and constantly rewrite code for old hardware

In case of refactoring / restructuring, that's exactly so.

But "drop support for this old hardware" is meant to be an intended decision with a clear deprecation warning, not accidentally.

Re: Clang now makes binaries an original Pi B+ can't run

#12

I didn't see it addressed here or in the article: this is a bug, right? Edit: oddly, after searching LLVM bugs, I found a bug that sounds pretty much exactly like this issue... but it's from 2012 and is closed (although the final couple of comments make it sound like maybe it wasn't actually fixed--note: I only skimmed the comments and I probably misunderstood): https://github.com/llvm/llvm-project/issues/13989 Edit…

[deleted]

Re: Clang now makes binaries an original Pi B+ can't run

#13

I didn't see it addressed here or in the article: this is a bug, right? Edit: oddly, after searching LLVM bugs, I found a bug that sounds pretty much exactly like this issue... but it's from 2012 and is closed (although the final couple of comments make it sound like maybe it wasn't actually fixed--note: I only skimmed the comments and I probably misunderstood): https://github.com/llvm/llvm-project/issues/13989 Edit…

Yeah, this is not the behavior people expect.

Re: Clang now makes binaries an original Pi B+ can't run

#14

I didn't see it addressed here or in the article: this is a bug, right? Edit: oddly, after searching LLVM bugs, I found a bug that sounds pretty much exactly like this issue... but it's from 2012 and is closed (although the final couple of comments make it sound like maybe it wasn't actually fixed--note: I only skimmed the comments and I probably misunderstood): https://github.com/llvm/llvm-project/issues/13989 Edit…

[deleted]

Re: Clang now makes binaries an original Pi B+ can't run

#15
post #9

[flagged]

It sounds like clang running on the RPi 1 generates code that doesn't run. Usually compilers default to targeting whatever ISA it's running on but that doesn't seem to be the case here.

Usually compilers default to the ISA they were built on. In the case of Clang this is controlled by LLVM_DEFAULT_TARGET_TRIPLE cmake option - maybe a weird mix of options occurred where Clang for armv6 was built on armv7 but the default triple was not adjusted correctly.

Current docs about this option:

> LLVM target to use for code generation when no target is explicitly specified. It defaults to “host”, meaning that it shall pick the architecture of the machine where LLVM is being built. If you are building a cross-compiler, set it to the target triple of your desired architecture.

Re: Clang now makes binaries an original Pi B+ can't run

#16
post #4

You'll see a whole bandwagon of people saying things like, "supporting old hardware is BAD! It takes time and money that nobody has!", as though someone needs to be hired to sit around and do nothing but pore over code and constantly rewrite code for old hardware. There's plenty of evidence to the contrary, but since when has evidence mattered when it comes to defending the right of big business / big distro to do wh…

I think RPi has struck a reasonable balance where the mainstream Linux community doesn't really support ancient ARMv6 so RPI themselves maintains forked software (e.g. Raspbian). This way the cost of legacy is borne by those who benefit from it, not everyone.

Re: Clang now makes binaries an original Pi B+ can't run

#18
post #15
post #9

Earlier quoted context omitted.

It sounds like clang running on the RPi 1 generates code that doesn't run. Usually compilers default to targeting whatever ISA it's running on but that doesn't seem to be the case here.

Usually compilers default to the ISA they were built on. In the case of Clang this is controlled by LLVM_DEFAULT_TARGET_TRIPLE cmake option - maybe a weird mix of options occurred where Clang for armv6 was built on armv7 but the default triple was not adjusted correctly. Current docs about this option: > LLVM target to use for code generation when no target is explicitly specified. It defaults to “host”, meaning that…

Yes this could very well be a packaging/build error of clang, rather than a code bug. It's quite usual to cross compile for pi1 because it's so slow to build on it.

Re: Clang now makes binaries an original Pi B+ can't run

#20
post #4

You'll see a whole bandwagon of people saying things like, "supporting old hardware is BAD! It takes time and money that nobody has!", as though someone needs to be hired to sit around and do nothing but pore over code and constantly rewrite code for old hardware. There's plenty of evidence to the contrary, but since when has evidence mattered when it comes to defending the right of big business / big distro to do wh…

The thing with free software is that you are in no position to demand anything. If the maintainer don't feel like supporting your hardware, they don't have to.

But the beauty of free software is that you can always do it yourself. (Or pay someone to do it)

Post reply on HN