Hacker News new | ask | show | jobs
by kazinator 935 days ago
She's not building on the B+, though.

Quote:

I started trying to take binaries from my "build host" (a much faster Pi 4B) to run them on this original beast. It throws an illegal instruction.

This is like building something with the latest MSVC on Windows 11 and trying to run the .EXE on an old PC running Windows XP. :)

I suspect the entire Pi distro she's running on the Pi 4B itself won't run on the B+, since all of it is probably compiled the same way, possibly down to the kernel.

2 comments

But at the end, she puts together a new SD card for the B+, boots it, and tries to compile an empty program on the B+ itself. "It can compile something it can't even run", she says.
She was building on the B+ in the later example of the blog.
Ah I see that now.

The interesting question there is why does the clang binary itself run on the old hardware?

It must be that the distro build uses a different compiler configuration for itself from the configuration imbued into the installed clang.

Maybe it even builds clang twice: once to produce a clang that runs on the machine that builds the distro, which then compiles the packages, including the clang to run on the Pi.

Or the build system uses GCC.