What do you mean with: "5.4 is the Version that ships with Ubuntu"?
5.4 was the default compiler on Ubuntu 16.04, which is end of life.
Ubuntu 18.04: 7.4 Ubuntu 20.04: 9.3 Ubuntu 22.04: 11.2
5.4 was the default compiler on Ubuntu 16.04, which is end of life.
Ubuntu 18.04: 7.4 Ubuntu 20.04: 9.3 Ubuntu 22.04: 11.2
https://packages.debian.org/sid/gcc-avr
https://packages.ubuntu.com/search?suite=kinetic&searchon=na...
I don't know why it's an older version, you'll have to ask the Debian people. Maybe there's a reason, but most likely ist's justthat gcc tends to be a difficult piece of software to package and not enough people care/have time to keep the avr version to to date.