This is an archive of the discontinued LLVM Phabricator instance.

Disable generating movt on FreeBSD
ClosedPublic

Authored by andrew on Dec 27 2015, 8:31 AM.

Details

Reviewers
davide
Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

andrew updated this revision to Diff 43666.Dec 27 2015, 8:31 AM
andrew retitled this revision from to Disable generating movt on FreeBSD.
andrew updated this object.
andrew set the repository for this revision to rL LLVM.
andrew added a subscriber: dim.
dim added a subscriber: davide.Dec 27 2015, 9:37 AM

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

dim added a comment.Dec 27 2015, 1:45 PM

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

In D15791#317172, @dim wrote:

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

lld/AArch64 can't still handle that properly, so I'd rather recommend to make it dependent on fuse-ld=bfd.

Thanks,

Davide

davide accepted this revision.Dec 29 2015, 6:42 AM
davide added a reviewer: davide.

LGTM

lib/Driver/Tools.cpp
941

I'd add a FIXME I expect this to be fixed in the foreseeable future.

This revision is now accepted and ready to land.Dec 29 2015, 6:42 AM

Can someone commit with the FIXME comment? I'm unable to do it myself.

davide closed this revision.Jan 11 2016, 7:04 PM

Close, this went in a while ago.