Some more preparation for midgard-portable support