Yep, that’s an example of a packager bug report, as Ubuntu is a packager of GCC.
For any packager who has a bugged compiler package, it’s on them to figure out how to fix their package.
Obviously we’re here to help anyone who needs it, but CMake can’t be arbitrarily re-arranging files in a given distro’s package.