gcc: Rebase patches. Add some fixes.