The copy of binutils in FreeBSD is too old to correctly handle movt instructions. It is unlikely to be updated as newer versions are GPLv3. To fix this disable generating movt until a linker that can handle these is ready.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
@davide, any idea whether lld will be able to handle movt correctly? If so, we might want to make this dependent on -fuse-ld=bfd or -fuse-ld=lld ?
@davide, any idea whether lld will be able to handle movt correctly? If so, we might want to make this dependent on -fuse-ld=bfd or -fuse-ld=lld ?
I'm sure lld will handle everything we need eventually (if it does not already), but I'm not sure it's reasonable to have different behaviour based on -fuse-ld here anyhow -- ld.bfd may well be a recent one from ports.
Right, so this really only applies for binutils ld below a certain version, then? IIRC the linker version on the system is detected at configuration time; maybe it can be used instead. Ideally there would be some sort of runtime detection, but it does not sound feasible with ld.
lld/AArch64 can't still handle that properly, so I'd rather recommend to make it dependent on fuse-ld=bfd.
Thanks,
Davide
LGTM
lib/Driver/Tools.cpp | ||
---|---|---|
941 | I'd add a FIXME I expect this to be fixed in the foreseeable future. |
I'd add a FIXME I expect this to be fixed in the foreseeable future.