Fix suffixed vvp build under Windows.

Commit 95810b2f61 mistakenly added the suffix to the output file name
when linking the final vvp.exe binary. 'make check' and 'make install'
assume the suffix is only added when installing.
This commit is contained in:
Martin Whitaker 2025-10-11 10:39:46 +01:00
parent a4c90fb5f0
commit 23b6f955d4
1 changed files with 5 additions and 1 deletions

View File

@ -142,12 +142,16 @@ else
# This requires making the vvp.exe in two steps. The first step makes
# a vvp.exe that dlltool can use to make an export library, and the
# second step makes a vvp.exe that really exports those things.
#
# To get this to work correctly we must use the suffixed version of the
# executable to build the export library, but leave the final vvp.exe
# without a suffix.
vvp@EXEEXT@: main.o $O $(srcdir)/vvp.def
$(CXX) -o vvp$(suffix)@EXEEXT@ $(LDFLAGS) main.o $O $(dllib) $(LIBS)
$(DLLTOOL) --dllname vvp$(suffix)@EXEEXT@ --def $(srcdir)/vvp.def \
--output-exp vvp.exp
rm -f vvp$(suffix)@EXEEXT@
$(CXX) $(LDFLAGS) -o vvp$(suffix)@EXEEXT@ vvp.exp $(LDFLAGS) main.o $O $(dllib) $(LIBS)
$(CXX) $(LDFLAGS) -o vvp@EXEEXT@ vvp.exp $(LDFLAGS) main.o $O $(dllib) $(LIBS)
endif
else ifeq (@LIBVVP@,yes)