public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: Cygwin Patches <cygwin-patches@cygwin.com>
Subject: Re: [PATCH 3/6] gendef generates sigfe.s and cygwin.def
Date: Wed, 21 Oct 2020 15:31:37 +0100	[thread overview]
Message-ID: <fe4bf082-427b-9611-39a5-8d50a79ba9f1@dronecode.org.uk> (raw)
In-Reply-To: <20201020134304.11281-4-jon.turney@dronecode.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]

On 20/10/2020 14:43, Jon Turney wrote:
> Express that gendef generates sigfe.s and cygwin.def in a slightly less
> nutty way.
> ---
>   winsup/cygwin/Makefile.in | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
> index a56a311b8..9d05b17b3 100644
> --- a/winsup/cygwin/Makefile.in
> +++ b/winsup/cygwin/Makefile.in
> @@ -785,16 +785,13 @@ $(VERSION_OFILES): version.cc
>   Makefile: ${srcdir}/Makefile.in
>   	/bin/sh ./config.status
>   
> -$(DEF_FILE): gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE)
> +$(DEF_FILE) sigfe.s: gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE)
>   	$(word 1,$^) --cpu=${target_cpu} --output-def=$@  --tlsoffsets=$(word 2,$^) $(wordlist 3,99,$^)

Using $@ is wrong if make decides to build sigfe.s first, and $^ will 
contain an unwanted $(DEF_FILE) from the dependency below.

So please try the attached instead.

But maybe I need to do a bit more staring at [1].

[1] 
https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html

>   
>   $(srcdir)/$(TLSOFFSETS_H): gentls_offsets cygtls.h
>   	$^ $@ $(target_cpu) $(COMPILE.cc) -c || rm $@
>   
>   sigfe.s: $(DEF_FILE)
> -	@[ -s $@ ] || \
> -	{ rm -f $(DEF_FILE); $(MAKE) -s -j1 $(DEF_FILE); }; \
> -	[ -s $@ ] && touch $@
>   
>   sigfe.o: sigfe.s $(srcdir)/$(TLSOFFSETS_H)
>   	$(CC) ${CFLAGS} -c -o $@ $<
> 

[-- Attachment #2: 0003-gendef-generates-sigfe.s-and-cygwin.def.patch --]
[-- Type: text/plain, Size: 1313 bytes --]

From 15f8cc0f7cd273f1d10a7483399403487b2c2eb2 Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon, 12 Oct 2020 16:59:02 +0100
Subject: [PATCH 3/6] gendef generates sigfe.s and cygwin.def

Express that gendef generates sigfe.s and cygwin.def in a slightly less
nutty way.
---
 winsup/cygwin/Makefile.in | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index a56a311b8..70e38ead6 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -785,16 +785,13 @@ $(VERSION_OFILES): version.cc
 Makefile: ${srcdir}/Makefile.in
 	/bin/sh ./config.status
 
-$(DEF_FILE): gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE)
-	$(word 1,$^) --cpu=${target_cpu} --output-def=$@  --tlsoffsets=$(word 2,$^) $(wordlist 3,99,$^)
+$(DEF_FILE) sigfe.s: gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE)
+	$(word 1,$^) --cpu=${target_cpu} --output-def=$(DEF_FILE) --tlsoffsets=$(word 2,$^) $(wordlist 3,4,$^)
 
 $(srcdir)/$(TLSOFFSETS_H): gentls_offsets cygtls.h
 	$^ $@ $(target_cpu) $(COMPILE.cc) -c || rm $@
 
 sigfe.s: $(DEF_FILE)
-	@[ -s $@ ] || \
-	{ rm -f $(DEF_FILE); $(MAKE) -s -j1 $(DEF_FILE); }; \
-	[ -s $@ ] && touch $@
 
 sigfe.o: sigfe.s $(srcdir)/$(TLSOFFSETS_H)
 	$(CC) ${CFLAGS} -c -o $@ $<
-- 
2.28.0


  reply	other threads:[~2020-10-21 14:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 13:42 [PATCH 0/6] More Makefile/configure cleanups Jon Turney
2020-10-20 13:42 ` [PATCH 1/6] Remove lsaauth Jon Turney
2020-10-20 13:43 ` [PATCH 2/6] Drop cygwin version.o from cygserver Jon Turney
2020-10-20 13:43 ` [PATCH 3/6] gendef generates sigfe.s and cygwin.def Jon Turney
2020-10-21 14:31   ` Jon Turney [this message]
2020-10-21 15:07     ` Corinna Vinschen
2020-10-23  8:16       ` marco atzeri
2020-10-23 19:53         ` Jon Turney
2020-10-27 16:09     ` Jon Turney
2020-10-20 13:43 ` [PATCH 4/6] Remove nostdlib Makefile variable Jon Turney
2020-10-20 13:43 ` [PATCH 5/6] Drop do-nothing install_host target Jon Turney
2020-10-20 13:43 ` [PATCH 6/6] Drop do-nothing install_target target Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe4bf082-427b-9611-39a5-8d50a79ba9f1@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).