MSYS2-packages/msys2-runtime/0001-Fix-msys-library-name-in-import-libraries.patch
Johannes Schindelin 56b1ad3d0d msys2-runtime: Rebase to Cygwin v3.6.4
This corresponds to https://github.com/msys2/msys2-runtime/pull/304

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2025-07-16 18:07:43 +02:00

27 lines
1022 B
Diff

From b662426d796ad9fa7593f17840f49282835fa876 Mon Sep 17 00:00:00 2001
From: Kaleb Barrett <dev.ktbarrett@gmail.com>
Date: Sun, 14 Mar 2021 18:58:55 -0500
Subject: [PATCH 01/N] Fix msys library name in import libraries
Cygwin's speclib doesn't handle dashes or dots. However, we are about to
rename the output file name from `cygwin1.dll` to `msys-2.0.dll`.
Let's preemptively fix up all the import libraries that would link
against `msys_2_0.dll` to correctly link against `msys-2.0.dll` instead.
---
winsup/cygwin/scripts/speclib | 1 +
1 file changed, 1 insertion(+)
diff --git a/winsup/cygwin/scripts/speclib b/winsup/cygwin/scripts/speclib
index 41a3a8e..42a02c5 100755
--- a/winsup/cygwin/scripts/speclib
+++ b/winsup/cygwin/scripts/speclib
@@ -38,6 +38,7 @@ while (<$nm_fd>) {
study;
if (/ I _?(.*)_dll_iname/o) {
$dllname = $1;
+ $dllname =~ s/_2_0/-2.0/;
} else {
my ($file, $member, $symbol) = m%^([^:]*):([^:]*(?=:))?.* T (.*)%o;
next if !defined($symbol) || $symbol =~ $exclude_regex;