Commit 69cb625947 ("package/gcc: enable
obsolete nios2 target") added some handling of nios2 with gcc 14.x,
duplicated between gcc-initial and gcc-final. Let's deduplicate this
logic into the common package/gcc/gcc.mk code.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>