Merged requested to merge makise-homura/cmake:lcc-updates into master
This is a draft MR consisting of remains from !7407 (merged), it will be marked as mergeable after !7407 (merged) is landed.
For now it is here to check if tests are actually passing everywhere.
Rebased on current
master and ready to test, review, stage and merge.
This MR consists of several fixes that make tests passing on Elbrus systems with older distros and/or LCC versions (and one of them makes CMake buildable with LibreSSL).
Additionally, there's a couple of fixes not directly related to Elbrus systems, but found in the process. <- these fixes were moved to !7421 (merged) and !7422 (closed).