public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix make 3.81 build errors
@ 2018-02-19 14:32 Alan Hayward
  2018-02-19 16:11 ` Andreas Schwab
  2018-02-19 16:16 ` Simon Marchi
  0 siblings, 2 replies; 7+ messages in thread
From: Alan Hayward @ 2018-02-19 14:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: nd

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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-20 10:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 14:32 [PATCH] Fix make 3.81 build errors Alan Hayward
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

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).