This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[sim patch] Makefile tweaking
- To: gdb-patches at sources dot redhat dot com
- Subject: [sim patch] Makefile tweaking
- From: Ben Elliston <bje at redhat dot com>
- Date: Thu, 14 Sep 2000 16:59:12 -0400
- CC: bje at redhat dot com
Hi,
Here is a patch to enable the sim Makefile to specify an ISA to cgen
when producing the simulator files:
2000-09-14 Ben Elliston <bje@redhat.com>
* cgen.sh: Handle an isa argument between cpu and mach. Default to
`all'. Pass `-i' options to cgen applications.
* Make-common.in (cgen-arch, cgen-cpu, cgen-decode, cgen-cpu-decode,
cgen-desc): Pass $(isa) to cgen.sh.
Index: Make-common.in
===================================================================
RCS file: /cvs/cvsfiles/devo/sim/common/Make-common.in,v
retrieving revision 1.96
diff -u -r1.96 Make-common.in
--- Make-common.in 2000/08/21 08:52:07 1.96
+++ Make-common.in 2000/09/14 20:56:30
@@ -684,26 +684,26 @@
cgen-arch: force
$(SHELL) $(srccom)/cgen.sh arch $(srcdir) \
$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
- $(arch) "$(FLAGS)" ignored $(mach) ignored ignored
+ $(arch) "$(FLAGS)" ignored "$(isa)" $(mach) ignored ignored
cgen-cpu: force
$(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \
$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
- $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
+ $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
cgen-decode: force
$(SHELL) $(srccom)/cgen.sh decode $(srcdir) \
$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
- $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" ignored
+ $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" ignored
cgen-cpu-decode: force
$(SHELL) $(srccom)/cgen.sh cpu-decode $(srcdir) \
$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
- $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
+ $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
cgen-desc: force
$(SHELL) $(srccom)/cgen.sh desc $(srcdir) \
$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
- $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" ignored
+ $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" ignored
## End COMMON_POST_CONFIG_FRAG
Index: cgen.sh
===================================================================
RCS file: /cvs/cvsfiles/devo/sim/common/cgen.sh,v
retrieving revision 1.10
diff -u -r1.10 cgen.sh
--- cgen.sh 2000/03/02 09:09:04 1.10
+++ cgen.sh 2000/09/14 20:56:30
@@ -20,8 +20,9 @@
arch=$6
archflags=$7
cpu=$8
-mach=$9
+isa=$9
# bring parms past 9 portably into view
+shift ; mach=$9
shift ; suffix=$9
shift ; extrafiles=$9
@@ -32,6 +33,10 @@
ARCH=`echo ${arch} | tr "${lowercase}" "${uppercase}"`
CPU=`echo ${cpu} | tr "${lowercase}" "${uppercase}"`
+if test -z "$isa" ; then
+ isa=all
+fi
+
case $action in
arch)
rm -f tmp-arch.h1 tmp-arch.h
@@ -44,6 +49,7 @@
-f "${archflags}" \
-m ${mach} \
-a ${arch} \
+ -i ${isa} \
-A tmp-arch.h1 \
-B tmp-arch.c1 \
-N tmp-all.h1
@@ -91,6 +97,7 @@
-f "${archflags}" \
-m ${mach} \
-a ${arch} \
+ -i ${isa} \
${fileopts}
case $action in
@@ -152,6 +159,7 @@
-f "${archflags}" \
-m ${mach} \
-a ${arch} \
+ -i ${isa} \
-H tmp-desc.h1 \
-C tmp-desc.c1 \
-O tmp-opc.h1