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.
@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.