Page MenuHomeFreeBSD

usr.bin/clang: use -mxgot for MIPS

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



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

rS FreeBSD src repository
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 26544

Event Timeline

kevans created this revision.Wed, Sep 18, 2:19 AM
kevans updated this revision to Diff 62248.Wed, Sep 18, 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.Wed, Sep 18, 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.Wed, Sep 18, 7:55 AM

Yeah, mips64 is fine without -mxgot it seemed

This revision was automatically updated to reflect the committed changes.