This is an archive of the discontinued LLVM Phabricator instance.

Add -mno-movt frontend option, to disable movt/movw on ARM
ClosedPublic

Authored by dim on Jan 5 2016, 12:12 PM.

Details

Summary

In rL256641, @davide turned off movt generation by default for FreeBSD.
This was because our ld is very old, and did not support the relocations
for it. However, Ian Lepore added the support very recently, so we
would like to revert rL256641, and replace it with a new -mno-movt
frontend option. This way, it can be turned off when needed.

Diff Detail

Event Timeline

dim updated this revision to Diff 44041.Jan 5 2016, 12:12 PM
dim retitled this revision from to Add -fno-movt frontend option, to disable movt/movw on ARM.
dim updated this object.
dim added reviewers: davide, echristo, dexonsmith.
dim added subscribers: emaste, ahatanak, cfe-commits, davide.
dim added a subscriber: andrew.Jan 5 2016, 12:14 PM
davide edited edge metadata.Jan 5 2016, 12:17 PM

I'm not opposed to this but ... this will likely it only 11 (and maybe 10.3 if backported) -- what about people running <= 10.2 ? Isn't this a problem for them?

davide accepted this revision.Jan 5 2016, 12:18 PM
davide edited edge metadata.

Hmm, probably they can use the new frontend options so it's fine. LGTM.

This revision is now accepted and ready to land.Jan 5 2016, 12:18 PM
emaste accepted this revision.Jan 5 2016, 12:20 PM
emaste added a reviewer: emaste.

This LGTM

echristo accepted this revision.Jan 5 2016, 12:23 PM
echristo edited edge metadata.

Sure.

-eric

dim added a comment.Jan 5 2016, 12:24 PM

I'm not opposed to this but ... this will likely it only 11 (and maybe 10.3 if backported) -- what about people running <= 10.2 ? Isn't this a problem for them?

People running ports-provided or hand-built clang 3.8.0 or higher on older FreeBSD's can use -fno-movt. For clang versions 3.7.x and earlier, they can still use the old style -mllvm -arm-use-movt=0.

We'll fix the FreeBSD build system so it uses the right options for older and newer clang versions.

In D15899#319918, @dim wrote:

I'm not opposed to this but ... this will likely it only 11 (and maybe 10.3 if backported) -- what about people running <= 10.2 ? Isn't this a problem for them?

People running ports-provided or hand-built clang 3.8.0 or higher on older FreeBSD's can use -fno-movt. For clang versions 3.7.x and earlier, they can still use the old style -mllvm -arm-use-movt=0.

We'll fix the FreeBSD build system so it uses the right options for older and newer clang versions.

Sounds like a plan.

dim updated this revision to Diff 44059.Jan 5 2016, 2:08 PM
dim edited edge metadata.

Rename -fno-movt to -mno-movt.

dim closed this revision.Jan 5 2016, 11:45 PM
dim retitled this revision from Add -fno-movt frontend option, to disable movt/movw on ARM to Add -mno-movt frontend option, to disable movt/movw on ARM.Jan 6 2016, 12:00 AM
dim updated this object.