Page MenuHomeFreeBSD

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

Authored by kevans on Sep 18 2019, 2:19 AM.
Tags
None
Referenced Files
F105995393: D21698.id62247.diff
Mon, Dec 23, 3:47 PM
Unknown Object (File)
Mon, Dec 9, 11:22 AM
Unknown Object (File)
Oct 12 2024, 7:08 PM
Unknown Object (File)
Sep 29 2024, 9:01 PM
Unknown Object (File)
Sep 24 2024, 2:58 AM
Unknown Object (File)
Sep 10 2024, 11:08 PM
Unknown Object (File)
Sep 10 2024, 11:08 PM
Unknown Object (File)
Sep 10 2024, 11:07 PM
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.