@posti85
the workaround is to check you gcc version on your setup for example mine is 9.3
in CLi type
gcc --version
then in the scriptmodule as @mitu advised initially find the 2 entries pointing gcc-6 lines 20 and 32 (im having 4.7.2 rpie setup script) and in my case i added gcc-9 fo example
save, start or restart rpi setup and should compile ok
BUT again as @mitu
i d recommend lr-mgba which is better for gba