Hard-link the new DLL with the name 'cygwin0.dll', as that's what the
testsuite expects. (Must be a hardlink as the Windows loader needs to be
able to traverse the link).

Fixes: 90236c3a2cf6 ("Cygwin: Makefile: build new-cygwin1.dll in a single step")
---
 winsup/cygwin/Makefile.am | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
index 0200f6e2a..5ea962ccd 100644
--- a/winsup/cygwin/Makefile.am
+++ b/winsup/cygwin/Makefile.am
@@ -41,6 +41,7 @@ toolincludedir=$(tooldir)/include
 
 DLL_NAME=cygwin1.dll
 NEW_DLL_NAME=new-cygwin1.dll
+TEST_DLL_NAME=cygwin0.dll
 DEF_FILE=cygwin.def
 LIB_NAME=libcygwin.a
 TEST_LIB_NAME=libcygwin0.a
@@ -622,6 +623,9 @@ $(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(NEW_DLL_NAME)
 $(TEST_LIB_NAME): $(LIB_NAME)
        $(AM_V_GEN)perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; 
s/cygwin1/cygwin0/g' < $? > $@
 
+$(TEST_DLL_NAME): $(NEW_DLL_NAME)
+       $(AM_V_GEN)ln -f $(NEW_DLL_NAME) $(TEST_DLL_NAME)
+
 # sublibs
 # import libraries for some subset of symbols indicated by given objects
 speclib=\
@@ -664,7 +668,7 @@ libssp.a: $(LIB_NAME) $(wildcard 
$(newlib_build)/libc/ssp/*.o)
 # all
 #
 
-all-local: $(LIB_NAME) $(TEST_LIB_NAME) $(SUBLIBS)
+all-local: $(LIB_NAME) $(TEST_LIB_NAME) $(TEST_DLL_NAME) $(SUBLIBS)
 
 #
 # clean
-- 
2.39.0

Reply via email to