Page MenuHomeFreeBSD

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

Authored by kevans on Sep 18 2019, 2:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 19, 10:01 PM
Unknown Object (File)
Feb 9 2024, 2:49 AM
Unknown Object (File)
Dec 25 2023, 11:05 PM
Unknown Object (File)
Dec 21 2023, 7:44 AM
Unknown Object (File)
Dec 20 2023, 1:44 AM
Unknown Object (File)
Dec 11 2023, 1:19 AM
Unknown Object (File)
Nov 8 2023, 6:10 AM
Unknown Object (File)
Nov 6 2023, 11:23 AM
Subscribers

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.

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.