Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCHv2: Allow parallel make
- X-seq: zsh-workers 55195
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: PATCHv2: Allow parallel make
- Date: Mon, 5 Oct 2026 06:14:39 +0200
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=osZoxTHwNpFS5rL7aCHPZL2XQWy7EhzgREtLfjI2XBw=; fh=Tph3Nvi7JV+RLjY+il02lI77hTx+KXSmQL0dZmUp3Z8=; b=kp+epEfMI6XvkxBAWtok4NmIQRE2VTJn4H5l1bPiPkwTVSkPmSlFtr7KK5SP6eWiP2 Rt0vgE2pm67kfIOQf57pZ73Av/MGc+n69+hmuwHJKF1NCULvTg7nU+U53zsKUTd1Y+06 YqlzGmK2W5i4LyoNSzFSPF1HeUXTC3FOLmlhGqoMDaJzy9ubVw2C7Guz5dDdrZYqQZvj ChwYBI2Sew13al4d2Rh0Ogu1wyFNu/4kC4cq+IRjA0puNOPZnNSAzoqBW+/jIlCEhmTI fkmpCwxOgtknNIH6mVKPMhz8EXBi1owrQsd8edXlbaq8k4+1DDtwdVb/YArYF0CB0Pjx e6gg==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1791173693; cv=none; d=google.com; s=arc-20260327; b=Mt2rYrzQu9+j9W9cUxbKbqnui21DFTfAqDqnpOZer6d/4Hlp9pLbjs31bnprGI+0kF 9oXSY75iCu7597l6LoiM0e4frJLikk7j6HAIZF+tOa+NzLLjBQ4iolso+0fS/BJ7Dg9L iYKZJzzsL8JbNxExP3yixoFYyfopAc950imXA/JLpTGEchX5g58rJ8FjL7B/D0dvZLct ZyBt2OubpAxR+YWCMWhvvzxkfBTeKXPaQ5Upgss0CvGTXlb5Msrzr9WFgzvAQ/NOqyiX 8n8ndEGbLCOF/6hFKEJJOsnstkRGY3281WEEjag39j40ucQoCYny1KOiwi04FcApKPnV bWxA==
- Archived-at: <https://zsh.org/workers/55195>
- In-reply-to: <0b445d7d-3fab-40a3-86c8-f4662493bcc3@app.fastmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <D360EC16-96D8-48B8-AE35-5197BFDC3446@kba.biglobe.ne.jp> <20261003162632.13626-1-mikachu@gmail.com> <9BDE0CF8-2BDE-43BB-B261-BD8497DA1E58@kba.biglobe.ne.jp> <47437E59-22BC-40FC-BADE-2677BC452808@kba.biglobe.ne.jp> <0b445d7d-3fab-40a3-86c8-f4662493bcc3@app.fastmail.com>
This is already handled by the @L@ mechanism, around line 2850 in configure.ac
if test "x$dynamic" = xyes; then
zsh_SYS_DYNAMIC_CLASH
zsh_SYS_DYNAMIC_GLOBAL
RTLD_GLOBAL_OK=$zsh_cv_sys_dynamic_rtld_global
zsh_SYS_DYNAMIC_EXECSYMS
if test "$zsh_cv_sys_dynamic_execsyms" != yes; then
L=L
fi
zsh_SYS_DYNAMIC_STRIP_EXE
zsh_SYS_DYNAMIC_STRIP_LIB
if $strip_exeldflags && test "$zsh_cv_sys_dynamic_strip_exe" = yes; then
EXELDFLAGS="$EXELDFLAGS -s"
fi
if $strip_libldflags && test "$zsh_cv_sys_dynamic_strip_lib" = yes; then
LIBLDFLAGS="$LIBLDFLAGS -s"
fi
if test "$host_os" = cygwin; then
INSTLIB="install.cygwin-lib"
UNINSTLIB="uninstall.cygwin-lib"
fi
else
$strip_exeldflags && EXELDFLAGS="$EXELDFLAGS -s"
$strip_libldflags && LIBLDFLAGS="$LIBLDFLAGS -s"
RTLD_GLOBAL_OK=no
fi
so we can hopefully just do this:
modules: $(@L@IBZSH)
Maybe this spot makes sense:
diff --git i/Src/Makefile.in w/Src/Makefile.in
index 99bafc065f..819d3a6136 100644
--- i/Src/Makefile.in
+++ w/Src/Makefile.in
@@ -131,11 +131,11 @@ FORCE:
# ========== LINKING IN MODULES ==========
mymods.conf:
@echo Linking with the standard modules.
-modules: $(@E@NTRYOBJ)
+modules: $(@E@NTRYOBJ) $(@L@IBZSH)
$(ENTRYOBJ): FORCE
@$(MAKE) -f Makemod $(MAKEDEFS) $@
# ========== DEPENDENCIES FOR INSTALLING ==========
> case-3:
> In this case, build apparently succeeds, but resulting zsh.exe depends on
> libzsh-5.9.999.3-test.dll.tmp.$$:
> % ldd Src/zsh.exe
> (snip)
> libzsh-5.9.999.3-test.dll.tmp.51386 => not found
I guess we can't use the tmp name directly with -o then, hm. Maybe
instead of invoking another make to build the target, it would be
better to just wait for the file to appears, since it presumably will.
I'm not sure if there's a good portable way to do that though (loop
with sleep and test?)... Or if such waits would take up 'slots' in the
make server and end up possibly deadlocking the build. (just a theory,
haven't seen that happen).
You could try removing this (the DLLINK change) hunk for now, it
should be pretty unlikely to actually hit the race, the idea was just
to ensure that it doesn't read a partial file if it does happen to
race.
On Sun, Oct 4, 2026 at 10:06 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Jun T wrote on Sun, 04 Oct 2026 18:12 +00:00:
> > The following seems to work (patch over PATCHv2, without 55190).
> > What is the simplest way to add this dependency only if building on
> > Cygwin?
>
> Add to Src/Makefile.in the line «@EXTRA_DEPENDENCIES_OF_modules@»
> next to one of the existing «modules: …» lines, and have configure.ac
> set ${EXTRA_DEPENDENCIES_OF_modules} either to the empty string or to
> «modules: $(LIBZSH)» and AC_SUBST() it?
>
> Alternatively, it looks like AC_CONFIG_FILES() has an optional second
> argument for running additional code; proof of concept:
>
> [[[
> --- configure.ac
> +++ configure.ac
> @@ -3068,7 +3068,9 @@ AC_SUBST_FILE(DEFS_MK)dnl
> AC_SUBST_FILE(VERSION_MK)dnl
>
> AC_CONFIG_FILES(Config/defs.mk Makefile Doc/Makefile Etc/Makefile \
> -Src/Makefile Test/Makefile)
> +Test/Makefile)
> +AC_CONFIG_FILES(Src/Makefile, [if uname -so | grep -qi linux; then echo '# yes'; else echo '# no'; fi >> Src/Makefile])
> +
> AC_CONFIG_COMMANDS([config.modules], [. ./config.modules.sh])
> AC_CONFIG_COMMANDS([stamp-h], [echo >stamp-h])
> ]]]
>
> I haven't checked whether this would require us to bump our autoconf
> version requirement.
>
> In any case, should the condition be literally "if building on Cygwin",
> or is there some behaviour or limitation of the Cygwin compiler/linker/etc
> that can be tested for? (e.g., by trying to compile/link a test program)
>
> Cheers,
>
> Daniel
>
> >
> > diff --git a/Src/Makefile.in b/Src/Makefile.in
> > index 7fc0b364d..755a911a0 100644
> > --- a/Src/Makefile.in
> > +++ b/Src/Makefile.in
> > @@ -88,6 +88,8 @@ $(LIBZSH): $(LIBOBJS) $(NSTMP)
> > rm -f $@
> > $(DLLINK) $(LIBOBJS) $(NLIST) $(LIBS)
> >
> > +modules: $(LIBZSH)
> > +
> > zsh.res.o: $(sdir)/zsh.rc $(sdir)/zsh.ico
> > windres -O coff --include-dir $(sdir) -i $(sdir)/zsh.rc -o zsh.res.o
>
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author