Good point! They have too many switches in gcc, I wouldn't even think they have such a special one beyond standard "--version".
Thanks, I'll update the script, submitted an enhancement request for myself: Use "-dumpversion" switch instead of "--version" to determine GCC version · Issue #3 · alext-mkrs/galileo-fw · GitHub