The mac homebrew formula for mingw-w64 with adding gcc flags: --disable-sjlj-exceptions --with-dwarf2 Using: brew tap indlin/mingw-w64 brew install indlin/mingw-w64/mingw-w64