public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Simplify definition of GUILE
@ 2023-08-22 19:48 Tom Tromey
  2023-08-26 19:09 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2023-08-22 19:48 UTC (permalink / raw)
  To: gdb-patches; +Cc: binutils, Tom Tromey

This patch sets GUILE to just plain 'guile'.

In the distant ("devo") past, the top-level build did support building
Guile in-tree.  However, I don't think this really works any more.
For one thing, there are no build dependencies on it, so there's no
guarantee it would actually be built before the uses.

This patch also removes the use of "-s" as an option to cgen scheme
scripts.  With my latest patch upstream, this is no longer needed.

After the upstream changes, either Guile 2 or Guile 3 will work, with
or without the compiler enabled.
---
 opcodes/Makefile.am | 2 +-
 opcodes/Makefile.in | 2 +-
 opcodes/cgen.sh     | 2 --
 sim/Makefile.in     | 2 +-
 sim/common/cgen.sh  | 4 ----
 sim/common/local.mk | 2 +-
 6 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 5d179e13168..5804dd1ab38 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -336,7 +336,7 @@ CLEANFILES = \
 
 CGENDIR = @cgendir@
 CPUDIR = $(srcdir)/../cpu
-GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+GUILE = guile
 CGEN = "$(GUILE) -l ${cgendir}/guile.scm -s"
 CGENFLAGS = -v
 
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 605ce0a9ff2..29c26263061 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -695,7 +695,7 @@ CLEANFILES = \
 
 CGENDIR = @cgendir@
 CPUDIR = $(srcdir)/../cpu
-GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+GUILE = guile
 CGEN = "$(GUILE) -l ${cgendir}/guile.scm -s"
 CGENFLAGS = -v
 CGENDEPS = \
diff --git a/opcodes/cgen.sh b/opcodes/cgen.sh
index 40ebdf3ca0a..9497c1bf853 100644
--- a/opcodes/cgen.sh
+++ b/opcodes/cgen.sh
@@ -99,7 +99,6 @@ opcodes)
 
 	# Run CGEN.
 	${cgen} ${cgendir}/cgen-opc.scm \
-		-s ${cgendir} \
 		${cgenflags} \
 		-f "${options}" \
 		-m all \
@@ -182,7 +181,6 @@ desc)
 	rm -f ${tmp}-opc.h1 ${tmp}-opc.h
 
 	${cgen} ${cgendir}/cgen-opc.scm \
-		-s ${cgendir} \
 		${cgenflags} \
 		-OPC ${opcfile} \
 		-f "${archflags}" \
diff --git a/sim/Makefile.in b/sim/Makefile.in
index 3da1b25d040..3dd14543450 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -1871,7 +1871,7 @@ SIM_COMMON_LIBS = \
 	$(LIBGNU) \
 	$(LIBGNU_EXTRA_LIBS)
 
-GUILE = $(or $(wildcard ../guile/libguile/guile),guile)
+GUILE = guile
 CGEN = "$(GUILE) -l $(cgendir)/guile.scm -s"
 CGENFLAGS = -v
 CGEN_CPU_DIR = $(cgendir)/cpu
diff --git a/sim/common/cgen.sh b/sim/common/cgen.sh
index 394ef2d2e1b..a7479ec8d4c 100755
--- a/sim/common/cgen.sh
+++ b/sim/common/cgen.sh
@@ -60,7 +60,6 @@ arch)
 	rm -f ${tmp}-all.h1 ${tmp}-all.h
 
 	${cgen} ${cgendir}/cgen-sim.scm \
-		-s ${cgendir} \
 		${cgenflags} \
 		-f "${archflags}" \
 		-m ${mach} \
@@ -125,7 +124,6 @@ cpu | decode | cpu-decode)
 	esac
 
 	${cgen} ${cgendir}/cgen-sim.scm \
-		-s ${cgendir} \
 		${cgenflags} \
 		-f "${archflags}" \
 		-m ${mach} \
@@ -187,7 +185,6 @@ defs)
 	rm -f ${tmp}-defs.h1 ${tmp}-defs.h
 	
 	${cgen} ${cgendir}/cgen-sim.scm \
-		-s ${cgendir} \
 		${cgenflags} \
 		-f "${archflags}" \
 		-m ${mach} \
@@ -205,7 +202,6 @@ desc)
 	rm -f ${tmp}-opc.h1 ${tmp}-opc.h
 
 	${cgen} ${cgendir}/cgen-opc.scm \
-		-s ${cgendir} \
 		${cgenflags} \
 		-OPC ${opcfile} \
 		-f "${archflags}" \
diff --git a/sim/common/local.mk b/sim/common/local.mk
index 5d0992fbd9e..08da2275b7d 100644
--- a/sim/common/local.mk
+++ b/sim/common/local.mk
@@ -178,7 +178,7 @@ SIM_COMMON_LIBS = \
 ##
 
 ## If the local tree has a bundled copy of guile, use that.
-GUILE = $(or $(wildcard ../guile/libguile/guile),guile)
+GUILE = guile
 CGEN = "$(GUILE) -l $(cgendir)/guile.scm -s"
 CGENFLAGS = -v
 CGEN_CPU_DIR = $(cgendir)/cpu
-- 
2.41.0


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

* Re: [PATCH] Simplify definition of GUILE
  2023-08-22 19:48 [PATCH] Simplify definition of GUILE Tom Tromey
@ 2023-08-26 19:09 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2023-08-26 19:09 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, binutils

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> This patch sets GUILE to just plain 'guile'.
Tom> In the distant ("devo") past, the top-level build did support building
Tom> Guile in-tree.  However, I don't think this really works any more.
Tom> For one thing, there are no build dependencies on it, so there's no
Tom> guarantee it would actually be built before the uses.

Tom> This patch also removes the use of "-s" as an option to cgen scheme
Tom> scripts.  With my latest patch upstream, this is no longer needed.

Tom> After the upstream changes, either Guile 2 or Guile 3 will work, with
Tom> or without the compiler enabled.

Alan OK'd the opcodes part of this, so I wrote a ChangeLog entry for
that, and I'm going to push the whole patch now.

To recap the current state -- cgen works with guile 2 and guile 3 now.
You can use the guile compiler, which speeds things up quite a bit; just
ignore all the warnings.

Tom

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

end of thread, other threads:[~2023-08-26 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 19:48 [PATCH] Simplify definition of GUILE Tom Tromey
2023-08-26 19:09 ` Tom Tromey

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