public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Alan Hayward <Alan.Hayward@arm.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: nd <nd@arm.com>
Subject: [PATCH] Fix make 3.81 build errors
Date: Mon, 19 Feb 2018 14:32:00 -0000	[thread overview]
Message-ID: <2254C28C-A28A-4720-A573-CFC2BA60C5A1@arm.com> (raw)

Make rules in make 3.81 are parsed slightly different than newer
versions of make.

Patch b5884fa7101cc528f07fd57c3de445a3680964a6 caused build errors
on the older 3.81:
make[4]: *** No rule to make target `../../../binutils-gdb/gdb/gdbserver/common/btrace-common.c'.  Stop.

This is because make 3.81 was using the wrong rule to build btrace-common.c,
causing it to look in the wrong source directory.

This fix simply re-orders the make rules in gdbserver. However, for reasons
I am unsure of, this requires moving the corresponding ipa rule. I've tried
many many different combinations, and this is the only one that works.
Therefore, not pushing as obvious and asking for review first.

Tested on x86 and Ubuntu-AArch32-native-extended-gdbserver-m32 builds using
both make 4.1 and make 3.81

gdbserver/

2018-02-19  Alan Hayward  <alan.hayward@arm.com>

	* Makefile.in: Switch order of make rules. 

---
 gdb/gdbserver/Makefile.in | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index fcb6e1e817f521385de3986861c430c31a1b7eec..e19885c7fef7c82bd2808cfcaa990dbfc5d40c18 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -541,6 +541,14 @@ arch/%.o: ../arch/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)

+common/%.o: ../common/%.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+
+common/%-ipa.o: ../common/%.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
+
 # Rules for objects that go in the in-process agent.

 %-ipa.o: %-generated.c
@@ -562,10 +570,6 @@ arch/%.o: ../arch/%.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)

-common/%-ipa.o: ../common/%.c
-	$(IPAGENT_COMPILE) $<
-	$(POSTCOMPILE)
-
 arch/%-ipa.o: ../arch/%.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
@@ -580,10 +584,6 @@ arch/%-ipa.o: ../arch/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)

-common/%.o: ../common/%.c
-	$(COMPILE) $<
-	$(POSTCOMPILE)
-
 %.o: ../nat/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)

             reply	other threads:[~2018-02-19 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 14:32 Alan Hayward [this message]
2018-02-19 16:11 ` Andreas Schwab
2018-02-19 16:39   ` Alan Hayward
2018-02-19 16:44     ` Simon Marchi
2018-02-20 10:59       ` Alan Hayward
2018-02-20 10:32     ` Szabolcs Nagy
2018-02-19 16:16 ` Simon Marchi

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=2254C28C-A28A-4720-A573-CFC2BA60C5A1@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.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).