diff -Nur gcc-13.4.0.orig/gcc/configure gcc-13.4.0/gcc/configure
--- gcc-13.4.0.orig/gcc/configure	2025-06-13 18:58:03.644152200 +0200
+++ gcc-13.4.0/gcc/configure	2025-06-13 19:17:22.955206000 +0200
@@ -18986,7 +18986,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -22663,7 +22663,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/gcc/jit/Make-lang.in gcc-13.4.0/gcc/jit/Make-lang.in
--- gcc-13.4.0.orig/gcc/jit/Make-lang.in	2025-06-13 18:58:03.584758700 +0200
+++ gcc-13.4.0/gcc/jit/Make-lang.in	2025-06-13 19:17:35.024629900 +0200
@@ -46,7 +46,7 @@
 
 SHARED_PFX=lib
 ifneq (,$(filter %cygwin,$(target)))
-SHARED_PFX=cyg
+SHARED_PFX=msys-
 endif
 
 ifneq (,$(filter %-mingw% %-cygwin,$(target)))
diff -Nur gcc-13.4.0.orig/libatomic/configure gcc-13.4.0/libatomic/configure
--- gcc-13.4.0.orig/libatomic/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libatomic/configure	2025-06-13 19:17:22.780282400 +0200
@@ -10485,7 +10485,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/libbacktrace/configure gcc-13.4.0/libbacktrace/configure
--- gcc-13.4.0.orig/libbacktrace/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libbacktrace/configure	2025-06-13 19:17:22.780282400 +0200
@@ -10620,7 +10620,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/libcc1/configure gcc-13.4.0/libcc1/configure
--- gcc-13.4.0.orig/libcc1/configure	2025-06-05 18:03:02.000000000 +0200
+++ gcc-13.4.0/libcc1/configure	2025-06-13 19:17:22.780282400 +0200
@@ -9880,7 +9880,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -13963,7 +13963,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libffi/configure gcc-13.4.0/libffi/configure
--- gcc-13.4.0.orig/libffi/configure	2025-06-05 18:03:02.000000000 +0200
+++ gcc-13.4.0/libffi/configure	2025-06-13 19:17:22.764898800 +0200
@@ -10675,7 +10675,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -14352,7 +14352,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libgfortran/configure gcc-13.4.0/libgfortran/configure
--- gcc-13.4.0.orig/libgfortran/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libgfortran/configure	2025-06-13 19:17:22.954201800 +0200
@@ -11852,7 +11852,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -15643,7 +15643,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libgm2/configure gcc-13.4.0/libgm2/configure
--- gcc-13.4.0.orig/libgm2/configure	2025-06-05 18:03:02.000000000 +0200
+++ gcc-13.4.0/libgm2/configure	2025-06-13 19:17:22.948697100 +0200
@@ -11803,7 +11803,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -15504,7 +15504,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libgo/config/libtool.m4 gcc-13.4.0/libgo/config/libtool.m4
--- gcc-13.4.0.orig/libgo/config/libtool.m4	2025-06-05 18:03:02.000000000 +0200
+++ gcc-13.4.0/libgo/config/libtool.m4	2025-06-13 19:17:22.764898800 +0200
@@ -2236,7 +2236,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
diff -Nur gcc-13.4.0.orig/libgo/configure gcc-13.4.0/libgo/configure
--- gcc-13.4.0.orig/libgo/configure	2025-06-05 18:03:02.000000000 +0200
+++ gcc-13.4.0/libgo/configure	2025-06-13 19:17:22.779277300 +0200
@@ -10647,7 +10647,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/libgomp/configure gcc-13.4.0/libgomp/configure
--- gcc-13.4.0.orig/libgomp/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libgomp/configure	2025-06-13 19:17:22.755391300 +0200
@@ -10498,7 +10498,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -14159,7 +14159,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libitm/configure gcc-13.4.0/libitm/configure
--- gcc-13.4.0.orig/libitm/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libitm/configure	2025-06-13 19:17:22.947696800 +0200
@@ -11161,7 +11161,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -14838,7 +14838,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libobjc/configure gcc-13.4.0/libobjc/configure
--- gcc-13.4.0.orig/libobjc/configure	2025-06-05 18:03:02.000000000 +0200
+++ gcc-13.4.0/libobjc/configure	2025-06-13 19:17:22.764898800 +0200
@@ -9857,7 +9857,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/libphobos/configure gcc-13.4.0/libphobos/configure
--- gcc-13.4.0.orig/libphobos/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libphobos/configure	2025-06-13 19:17:22.747885500 +0200
@@ -10853,7 +10853,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/libquadmath/configure gcc-13.4.0/libquadmath/configure
--- gcc-13.4.0.orig/libquadmath/configure	2025-06-05 18:03:02.000000000 +0200
+++ gcc-13.4.0/libquadmath/configure	2025-06-13 19:17:22.747885500 +0200
@@ -9891,7 +9891,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/libsanitizer/configure gcc-13.4.0/libsanitizer/configure
--- gcc-13.4.0.orig/libsanitizer/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libsanitizer/configure	2025-06-13 19:17:22.907475200 +0200
@@ -11462,7 +11462,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -15139,7 +15139,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libssp/configure gcc-13.4.0/libssp/configure
--- gcc-13.4.0.orig/libssp/configure	2025-06-05 18:03:03.000000000 +0200
+++ gcc-13.4.0/libssp/configure	2025-06-13 19:17:22.741380200 +0200
@@ -10077,7 +10077,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/libstdc++-v3/configure gcc-13.4.0/libstdc++-v3/configure
--- gcc-13.4.0.orig/libstdc++-v3/configure	2025-06-13 18:58:03.533035000 +0200
+++ gcc-13.4.0/libstdc++-v3/configure	2025-06-13 19:17:22.979307300 +0200
@@ -11250,7 +11250,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -14951,7 +14951,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/libtool.m4 gcc-13.4.0/libtool.m4
--- gcc-13.4.0.orig/libtool.m4	2025-06-05 18:03:03.000000000 +0200
+++ gcc-13.4.0/libtool.m4	2025-06-13 19:17:22.734376600 +0200
@@ -2233,7 +2233,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
diff -Nur gcc-13.4.0.orig/libvtv/configure gcc-13.4.0/libvtv/configure
--- gcc-13.4.0.orig/libvtv/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/libvtv/configure	2025-06-13 19:17:22.955206000 +0200
@@ -11357,7 +11357,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -15034,7 +15034,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       ;;
     mingw* | cegcc*)
diff -Nur gcc-13.4.0.orig/lto-plugin/configure gcc-13.4.0/lto-plugin/configure
--- gcc-13.4.0.orig/lto-plugin/configure	2025-06-05 18:03:03.000000000 +0200
+++ gcc-13.4.0/lto-plugin/configure	2025-06-13 19:17:22.740380400 +0200
@@ -11213,7 +11213,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
diff -Nur gcc-13.4.0.orig/zlib/configure gcc-13.4.0/zlib/configure
--- gcc-13.4.0.orig/zlib/configure	2025-06-05 18:05:01.000000000 +0200
+++ gcc-13.4.0/zlib/configure	2025-06-13 19:17:22.737380400 +0200
@@ -9820,7 +9820,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
