|
From: <jo...@ai...> - 2025-12-08 23:20:32
|
Dear SDCC Developers, I'm happy to announce that I have successfully packaged SDCC v4.5.0 for Msys2's MINGW-packages: https://github.com/msys2/MINGW-packages/pull/26732 This has proved extremely difficult. I began this work in 2024, and I have been working on this periodically in the background since that time. This follows on from an earlier thread discussing the effort: https://sourceforge.net/p/sdcc/mailman/sdcc-devel/thread/46f5b428-3d05-4b62-8127-47cd38dbb4ad%40airwebreathe.org.uk/ As you will be able to see from the PR, here are the issues I had to solve: 1. Problems with "#define B" in ucsim. 2. Missing "#include <string.h>" include in src/SDCCattr.c 3. Problems with the assembler Makefile rules affecting parallel builds. On Msys2, single threaded build is unbearable slow. 4. Missing support/cpp/gcc/config/i386/xm-* files imported from GCC. In my patch I included xm-mingw32.h, but GCC has other xm-* files for various platforms. 5. Problems with C23 support. 6. Problem with the GCC pre-processor relating to the bin/sdcpp wrapper script. This relates to the following discussions: * https://sourceforge.net/p/sdcc/bugs/3589/ GCC/libiberty has the ability to invoke the shell if it detects a shell script. Perhaps sdcc_popen() needs to support this as well. 7. It shouldn't be necessary to specify "sdccconf_h_dir_separator". The configure script should take care of this automatically. 8. Problem with UNIX vs. Windows paths for gpasm. 9. Problems with rebuilding already built files during "make install" 10. Installation of spurious executables: dlltool, dllwrap, windmc, windres. Would someone be able to take a look at some of these issues? To varying degrees, I think the patches might be ready to go upstream. As for the other issues, I'm not sure what the best solutions would be. However, I think it's reasonable to expect SDCC to build cleanly for Msys2/MinGW with a simple "./configure && make && make install". It seems to me that this is achievable with a little effort. Best Regards Joel Holdsworth |