If you're going for a small EXE, I'd recommend telling GCC to optimise for size with "-Os".
Link-Time Optimisation with "-flto" might also help, depending on how the libraries were built.
Link-Time Optimisation with "-flto" might also help, depending on how the libraries were built.
Random example: https://news.ycombinator.com/item?id=39547329