Hacker News new | ask | show | jobs
by JonChesterfield 934 days ago
I doubt this is a deliberate change. Picking up information from the environment - a sibling mentions /etc/env.d/gcc - seems fairly likely. I'd guess the default triple is something like arm-unknown-linux unless clang finds or is is told something more specific to use, and the mechanism by which it gets told to use something more specific has fallen over.

This might mean there are no arm v6 buildbots running, or it might mean there are ones running but the implicit configuration is still working on them.

LLVM is a really good cross compiler. Build for any target from any target, no trouble. Clang is less compelling - if it's built with the target, and you manage to tell it what target to build for, it'll probably do the right thing (as in this post - it guessed wrong, but given more information, did the right thing). Then the runtime library story is worse again - you've built for armv4 or whatever, but now you need to find a libc etc for it, and you might need to tell the compiler where those libraries and headers are, and for that part I'm still unclear on the details.

2 comments

Most distros and compilers effectively dropped ARMv6 a couple of years back - I had similar trouble building binaries for my old Synology NAS.
Alpine Linux might still support it I think.
> Picking up information from the environment - a sibling mentions /etc/env.d/gcc - seems fairly likely.

Why would CLANG do this ?

Clang already replicates a bunch of flags, macros, and behaviors from gcc. The objective is to be a drop-in replacement, and make the developer experience much nicer when migrating. There are some rough corners, of course, but overall it’s actually very nice.
If clang didn't try to do the right thing based on the context it finds itself in, people would have to specify a lot more compiler flags to tell it what to do. Target triple, where libc is, where libstdc++ or libc++ is, what linker to use, what flags to pass the linker and so forth. This is much more annoying than `clang foo.c`.