The FreeBasic Compiler is licensed under GNU GPLv2 or later (that is GPLv2 or GPLv3 currently). Note that the runtime library as well as the graphics library and other code, which may be considered parts of the compiler are licensed under different licenses. See
https://github.com/freebasic/fbc/blob/master/readme.txt , section "Licensing" for more details.
Please read the according license texts for information about your rights and obligations when using, modifying or distributing the code.
GPLv2:
https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
GPLv3:
https://www.gnu.org/licenses/gpl.txt
A short summary (that may not be accurate, so please read the full license texts): You may modify the compiler source code (in src/compiler/), but you have to take care about a few things as soon as you distribute any part of that code not as source code (e.g. as a compiled executable):
a) publish your exact modifications to the source code so others can reproduce them
b) use an appropriate copyright notice and keep existing copyright notices intact
d) include a copy of the GPL (license text)
e) do not add/remove license terms
f) keep disclaimer intact
---
The license was chosen to allow people to modify the compiler AND to ensure that all modification may be used to improve the compiler. The original intent is that you modify the code to fix a bug or add some improvements, you send your modifications to the compiler developers for review and they integrate it in the official product.
In contrast your aim to publish a compiled version only with added notices about the author of the build looks a bit childish IMHO.
However, if you respect all terms of the GPL your intent is legal.