aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2017-03-13 18:44:05 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2017-03-13 18:44:05 -0400
commit1a01e7c6b0eaed1bfe70d48692e1103c6e9ee2d9 (patch)
tree00bd909afe86d7f4a024c83a7686d96d692409ae /gdb
parent36bc18a810a13f884d826842abbdd6d744ff6481 (diff)
downloadgdb-1a01e7c6b0eaed1bfe70d48692e1103c6e9ee2d9.zip
gdb-1a01e7c6b0eaed1bfe70d48692e1103c6e9ee2d9.tar.gz
gdb-1a01e7c6b0eaed1bfe70d48692e1103c6e9ee2d9.tar.bz2
gdbserver: Use pattern rule for the remaining %-ipa.o objects
gdb/gdbserver/ChangeLog: * Makefile.in (%-ipa.o: %-ipa.c): New rule. (ax-ipa.o: ax.c): Remove. (linux-i386-ipa.o: linux-i386-ipa.c): Remove. (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove. (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove. (linux-s390-ipa.o: linux-s390-ipa.c): Remove. (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog10
-rw-r--r--gdb/gdbserver/Makefile.in30
2 files changed, 23 insertions, 17 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 9d56d0da..14594df 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,15 @@
2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
+ * Makefile.in (%-ipa.o: %-ipa.c): New rule.
+ (ax-ipa.o: ax.c): Remove.
+ (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
+ (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
+ (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
+ (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
+ (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
+
+2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
+
* Makefile.in (%-ipa.o: ../common/%.c): New rule.
(print-utils-ipa.o: ../common/print-utils.c): Remove.
(rsp-low-ipa.o: ../common/rsp-low.c): Remove.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 87dbad1..9935012 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -540,26 +540,11 @@ IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \
IPAGENT_COMPILE = $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post)
-# In-process agent object rules
+# Rules for special cases.
+
ax-ipa.o: ax.c
$(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
$(POSTCOMPILE)
-linux-i386-ipa.o: linux-i386-ipa.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-linux-amd64-ipa.o: linux-amd64-ipa.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-linux-aarch64-ipa.o: linux-aarch64-ipa.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-linux-s390-ipa.o: linux-s390-ipa.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-linux-ppc-ipa.o: linux-ppc-ipa.c
- $(IPAGENT_COMPILE) $<
- $(POSTCOMPILE)
-
ax.o: ax.c
$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
@@ -571,6 +556,17 @@ ax.o: ax.c
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)
+# Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one.
+# Therefore, this one needs to be before "%.o: %.c" for it to be considered for
+# files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c.
+#
+# Later versions of GNU Make choose the rule with the shortest stem, so it would
+# work in any order.
+
+%-ipa.o: %-ipa.c
+ $(IPAGENT_COMPILE) $<
+ $(POSTCOMPILE)
+
%-ipa.o: ../common/%.c
$(IPAGENT_COMPILE) $<
$(POSTCOMPILE)