niXman / mingw-builds

Scripts for building the 32 and 64-bit MinGW-W64 compilers for Windows
Other
282 stars 107 forks source link

Add GCC 14.1.0. #675

Closed guyutongxue closed 3 weeks ago

guyutongxue commented 4 months ago

Sorry for a so big PR, but it might be necessary to change these files.

Here is what it does:

I've tested these changes and successfully built GCC 14.1.0 with SEH, Win32, UCRT and v11 runtime. Let's wait for GitHub Actions' result.

starg2 commented 4 months ago

You might want to update .github/workflows/build_cmake.yml and func_map_gcc_name_to_gcc_version in library/functions.sh as well.

  • Sub-target termcap and python-3 needs CFLAGS like -fpermissive or -Wno-error=implicit-function-declaration now.

Is it possible to actually fix code rather than silencing warnings?

guyutongxue commented 4 months ago

You might want to update .github/workflows/build_cmake.yml and func_map_gcc_name_to_gcc_version in library/functions.sh as well.

Fixed, thanks!

Is it possible to actually fix code rather than silencing warnings?

Sure we can make many patches instead of silence warnings. But analyzing these errors is, somehow, quite difficult. For example in termcap, we don't have free declaration because <stdlib.h> not included, and that's because STDC_HEADERS is not defined, and that's because in Autoconf, AC_STDC_HEADERS will set ac_cv_header_stdc=no if we are cross-compiling (sad). That's just one error. In python-3, there are too many errors like this (and some errors about pointer const-ness is really hard to fix).

On the other hand, If we add (unnecessary) patches today, we will have more work to do in the future: maintaining these patches once the upstream has update. That's not what I expected, at least -- I just want a stable build script, that means updating packages should be an easy work.

At least, one may think these "-Wno-error" introduce some "bad smell"... probably yes, but actually it does not change anything from previous version since it just makes implicit options explicit.

starg2 commented 3 months ago

At least, one may think these "-Wno-error" introduce some "bad smell"... probably yes, but actually it does not change anything from previous version since it just makes implicit options explicit.

Fair enough.