Import part of compiler-rt for needed runtime functions

Some architectures require parts of the runtime library to be linked
into the loader, however it is not always possible to use the
toolchain-provided library due to differing (incompatible) compiler
flags. Therefore, pull in the needed functions from compiler-et and
build them with correct flags instead.