Subject: bug#50666: 28.0.50; Fix native compilation on Cygwin

From: Ken Brown <[email-masked]>
Date: Sat, 18 Sep 2021 16:58:21 -0400

On 9/18/2021 4:46 PM, Ken Brown wrote:
> In a followup to this message, I'll submit a patch that does this
> ephemeral rebase and fixes the build problem.

Patch attached.
>From 3a655d37dea44876b1cbc624b4cf1813945f9f2e Mon Sep 17 00:00:00 2001
From: Ken Brown <[email-masked]>
Date: Sat, 18 Sep 2021 14:03:41 -0400
Subject: [PATCH] Fix build with native compilation on Cygwin

* src/Makefile.in (emacs$(EXEEXT)) [CYGWIN]: Rebase the *.eln
files after they are all created, to avoid fork problems later
in the build.  (Bug#50666)
---
 src/Makefile.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/Makefile.in b/src/Makefile.in
index 732cd8f099..bb69a65707 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -547,6 +547,8 @@ ${charscript}:
 
 ${lispintdir}/characters.elc: ${charscript:.el=.elc}
 
+SYSTEM_TYPE = @SYSTEM_TYPE@
+
 ## The dumped Emacs is as functional and more efficient than
 ## bootstrap-emacs, so we replace the latter with the former.
 ## Strictly speaking, emacs does not depend directly on all of $lisp,
@@ -555,6 +557,9 @@ ${lispintdir}/characters.elc: ${charscript:
 emacs$(EXEEXT): temacs$(EXEEXT) \
                 lisp.mk $(etc)/DOC $(lisp) \
                 $(lispsource)/international/charprop.el ${charsets}
+ifeq ($(SYSTEM_TYPE),cygwin)
+	find ${top_builddir} -name '*.eln' | rebase -v -O -T -
+endif
 ifeq ($(DUMPING),unexec)
 	LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
   ifneq ($(PAXCTL_dumped),)
-- 
2.33.0