public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: vapier@gentoo.org,	Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCH 2/2] sim/cris: Fix references to cgen cpu directory
Date: Tue, 06 Nov 2018 17:35:00 -0000	[thread overview]
Message-ID: <812b9a92f4412fcb6fd4728f85c4fe6a367ab0b4.1541525137.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1541525136.git.andrew.burgess@embecosm.com>
In-Reply-To: <cover.1541525136.git.andrew.burgess@embecosm.com>

Don't assume that cgen is located within the binutils-gdb tree.  We
already have CGEN_CPU_DIR and CPU_DIR defined, these are the cpu/
directory within cgen, and the cpu/ directory within binutils-cpu.

The cris target tries to find CPU_DIR relative to the cgen source
tree, which can be wrong when building with an out of tree cgen.

sim/cris/ChangeLog:

	* Makefile.in: Replace uses of CGEN_CPU_DIR with CPU_DIR, and
	remove the definition of CGEN_CPU_DIR.
---
 sim/cris/ChangeLog   |  5 +++++
 sim/cris/Makefile.in | 18 ++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 2c901fdcab..f5880eaf29 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -45,8 +45,6 @@ NL_TARGET = -DNL_TARGET_cris
 
 ## COMMON_POST_CONFIG_FRAG
 
-CGEN_CPU_DIR = $(CGENDIR)/../cpu
-
 arch = cris
 
 sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(sim-core_h) $(sim-options_h)
@@ -140,17 +138,17 @@ CGEN_MAINT = ; @true
 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
 stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu stamp-desc
 
-stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
+stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=crisv10,crisv32 \
-	  archfile=$(CGEN_CPU_DIR)/cris.cpu \
+	  archfile=$(CPU_DIR)/cris.cpu \
 	  FLAGS="with-scache with-profile=fn"
 	touch stamp-arch
 arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
 
 # The sed-hack is supposed to be temporary, until we get CGEN to emit it.
-stamp-v10fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
+stamp-v10fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
-	  archfile=$(CGEN_CPU_DIR)/cris.cpu \
+	  archfile=$(CPU_DIR)/cris.cpu \
 	  cpu=crisv10f mach=crisv10 SUFFIX=v10 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"
 	$(SHELL) $(srcroot)/move-if-change $(srcdir)/semv10-switch.c $(srcdir)/semcrisv10f-switch.c
 	sed -ne 'p; s/^\(#include "sim-assert.h"\)$$/#include "cgen-ops.h"/p' < $(srcdir)/decodev10.c > decodev10.c.tmp
@@ -158,9 +156,9 @@ stamp-v10fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DI
 	touch stamp-v10fcpu
 cpuv10.h cpuv10.c semcrisv10f-switch.c modelv10.c decodev10.c decodev10.h: $(CGEN_MAINT) stamp-v10fcpu
 
-stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
+stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
-	  archfile=$(CGEN_CPU_DIR)/cris.cpu \
+	  archfile=$(CPU_DIR)/cris.cpu \
 	  cpu=crisv32f mach=crisv32 SUFFIX=v32 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"
 	$(SHELL) $(srcroot)/move-if-change $(srcdir)/semv32-switch.c $(srcdir)/semcrisv32f-switch.c
 	sed -ne 'p; s/^\(#include "sim-assert.h"\)$$/#include "cgen-ops.h"/p' < $(srcdir)/decodev32.c > decodev32.c.tmp
@@ -168,9 +166,9 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DI
 	touch stamp-v32fcpu
 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
 
-stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
+stamp-desc: $(CGEN_READ_SCM) $(CGEN_DESC_SCM) $(CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) \
-		archfile=$(CGEN_CPU_DIR)/cris.cpu \
+		archfile=$(CPU_DIR)/cris.cpu \
 		cpu=cris mach=all
 	touch stamp-desc
 cris-desc.c cris-desc.h cris-opc.h: $(CGEN_MAINT) stamp-desc
-- 
2.14.5

  parent reply	other threads:[~2018-11-06 17:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 17:35 [PATCH 0/2] Allow use of out-of-tree CGEN source Andrew Burgess
2018-11-06 17:35 ` [PATCH 1/2] sim/opcodes: Allow use of out of tree cgen source directory Andrew Burgess
2018-11-26 21:07   ` Simon Marchi
2018-11-27 11:21     ` Andrew Burgess
2018-11-27 19:47       ` Simon Marchi
2018-11-27 20:03         ` John Baldwin
2018-11-29 19:01           ` Tom Tromey
2018-11-27 20:27         ` Andrew Burgess
2018-11-27 20:31           ` Simon Marchi
2018-11-30 19:07   ` Andrew Burgess
2018-11-30 19:50     ` Tom Tromey
2018-11-06 17:35 ` Andrew Burgess [this message]
2018-11-30 19:51   ` [PATCH 2/2] sim/cris: Fix references to cgen cpu directory Tom Tromey
2018-11-26 15:17 ` [PATCH 0/2] Allow use of out-of-tree CGEN source Andrew Burgess

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=812b9a92f4412fcb6fd4728f85c4fe6a367ab0b4.1541525137.git.andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.org \
    /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).