--- scons-4.9.1/SCons/Tool/cyglink.py.orig	2025-04-25 12:07:51.870163400 +0200
+++ scons-4.9.1/SCons/Tool/cyglink.py	2025-04-25 12:07:59.542045300 +0200
@@ -179,7 +179,7 @@
 
     env['LINKFLAGS'] = CLVar('-Wl,-no-undefined')
 
-    env['SHLIBPREFIX'] = 'cyg'
+    env['SHLIBPREFIX'] = 'msys-'
     env['SHLIBSUFFIX'] = '.dll'
 
     env['IMPLIBPREFIX'] = 'lib'
--- scons-4.9.1/SCons/Platform/cygwin.py.orig	2024-09-22 03:25:14.000000000 +0200
+++ scons-4.9.1/SCons/Platform/cygwin.py	2025-04-25 13:23:07.594688100 +0200
@@ -43,6 +43,10 @@
 def generate(env) -> None:
     posix.generate(env)
 
+    import os, subprocess
+    env['ENV']['PATH'] = os.getenv('PATH')
+    env['SPAWN']       = (lambda sh, esc, cmd, args, env_param:
+                          subprocess.call(['sh', '-c', ' '.join(args)]))
     env['PROGPREFIX']  = ''
     env['PROGSUFFIX']  = '.exe'
     env['SHLIBPREFIX'] = ''
