[PATCH v3 2/2] fixups for LTO enabled build