|
From: <jo...@ai...> - 2025-12-16 18:41:43
|
> Can you provide a patch for this? If it doesn't break the GNU/Linux
> build, I'd apply it (gpasm is needed for the pic ports, which are
> unmaintained).
My current work-around is to do this after ./configure is run:
# Replace gpasm path with a Windows path (with the file extension
removed).
# This is necessary because otherwise the native sdcc executable is
given a
# UNIX path to gpasm in the --asm argument by the Makefile.
local gpasm=$(cygpath -m ${MINGW_PREFIX}/bin/gpasm)
find device -name Makefile | \
xargs sed -i "s#\(CCAS\) = '.*gpasm'#\1 = ${gpasm%.*}#"
The issue is that ./configure creates Makefiles with Msys2 UNIX paths to
gpasm (/mingw64/bin/gpasm). This path is then passed to sdcc in the
--asm argument. But the sdcc executable is Windows-native, and can only
understand Windows paths. My workaround is to live-patch the Makefiles
with a Windows-compatible path to gpasm (e.g.
c:/msys2/mingw64/bin/gpasm).
We could improve the situation if there was a way to specify the path to
gpasm through an argument to the root configure script. This would at
least remove the need for Makefile patching.
Another approach is to add support for Msys2 UNIX paths to SDCC.
I don't really know what the best answer is. Let's see if the MSYS2 devs
have any bright ideas:
https://discord.com/channels/792780131906617355/794220101741838401/1450543239965966481
Joel
|