I already tried to use GCC but building that way exceed system flash size.
Exceeds by how much?
Is it a C++ project?
What GCC version did you use?
Do you have
assert() in the code? You might see all the file names with full paths in the binary.
What about
-Os compiler option? Did you specify right architecture? Does your MCU has FPU, and if yes, what floating-point ABI you used for compilation?
IAR compiler must do miracles, if its generated code fits the flash, and GCC's does not.
You could share the source code from your Linux (or Mac, for that matter) via Samba server, do development there, and dispatch compilation on Windose with
ssh for example. Opportunities are plenty.