OSDN Git Service

gdb/testsuite/
[pf3gnuchains/pf3gnuchains3x.git] / cgen / gen-all-desc
1 #! /bin/sh
2 # Utility script to generate basic description files for all ports.
3 # The main purpose of this script is to have a script that will
4 # exercise loading of all the ports.
5
6 # Run this script in the src/cgen directory.
7
8 # Exit on any error.
9 set -e
10
11 # For debugging.
12 set -x
13
14 # List of top-level .cpu files of all ports.
15 # ??? Some are missing: ia32, ia64
16 # Need to add them after some research.
17 # NOTE: Some of these ports are incomplete.
18
19 archs="
20 cpu/fr30.cpu
21 cpu/arm.cpu
22 ../cpu/cris.cpu
23 ../cpu/frv.cpu
24 cpu/i960.cpu
25 cpu/ip2k.cpu
26 ../cpu/iq2000.cpu
27 ../cpu/lm32.cpu
28 ../cpu/m32c.cpu
29 ../cpu/m32r.cpu
30 cpu/m68k.cpu
31 cpu/mep.cpu
32 ../cpu/mt.cpu
33 cpu/openrisc.cpu
34 cpu/powerpc.cpu
35 cpu/sh.cpu
36 cpu/sparc.cpu
37 ../cpu/xc16x.cpu
38 cpu/xstormy16.cpu
39 "
40
41 if [ ! -f opcodes.scm ]
42 then
43     echo "Not in the src/cgen directory." >& 2
44     exit 1
45 fi
46
47 export builddir=tmp-desc
48
49 rm -rf $builddir
50 mkdir $builddir
51
52 export cgendir=`pwd`
53
54 (
55   set -e
56   set -x
57   cd $builddir
58   $cgendir/configure --prefix /tmp/junk --target m32r-elf
59
60   for a in $archs
61   do
62     archfile=../$a
63     arch=$(basename $archfile .cpu)
64
65     # FIXME: Seems like this shouldn't be needed.  Could be wrong though.
66     ISAS="all"
67     MACHS="all"
68     case $arch in
69     arm) ISAS="arm" ;;
70     sh) ISAS="media" ;;
71     sparc) MACHS="sparc-v9" ;; # FIXME: ugh, would rather select on isa
72     esac
73
74     if make desc ARCH=$arch ARCHFILE=$archfile ISAS="$ISAS" MACHS="$MACHS" \
75         CGENFLAGS='-b -v'
76     then
77         echo "File generation for $arch succeeded."
78     else
79         echo "ERROR: File generation for $arch failed."
80     fi
81   done
82 )