package/gcc: refactor nios2 obsolete handling into common gcc code
Commit 69cb6259479c548a09aac1140261c17f1cbb86b3 ("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>