Page MenuHomeFreeBSD

usr.bin/clang: use -mxgot for MIPS
ClosedPublic

Authored by kevans on Sep 18 2019, 2:19 AM.

Details

Summary

Various clang bits will fail to compile without -mxgot due to truncated relocations. -mxgot entails a speed penalty, but I do not think we care as much for the compiler in MIPS-land.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 26545

Event Timeline

kevans created this revision.Sep 18 2019, 2:19 AM
kevans updated this revision to Diff 62248.Sep 18 2019, 2:22 AM

Re-upload... forgot to squash my first stab at it with the second stab that extended it to all MIPS32 and excluded 64-bit variants.

arichardson accepted this revision.Sep 18 2019, 7:55 AM

I guess this happens because some files have more static globals than can be accessed in the immediate. In general lld should be able to use the multi-GOT trick but in that case it won't work.
If we really care about performance we could track down the individual files that need mxgot and only add it there but asking it globally should be fine.

Does it work for mips64 without mxgot? If it does I'm probably wrong and something else about the 32-bit ABI is stopping multi-GOT from being used.

This revision is now accepted and ready to land.Sep 18 2019, 7:55 AM

Yeah, mips64 is fine without -mxgot it seemed

This revision was automatically updated to reflect the committed changes.