This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix make 3.81 build errors
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Mon, 19 Feb 2018 14:32:07 +0000
- Subject: [PATCH] Fix make 3.81 build errors
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan dot Hayward at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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)