diff options
author | gdb-3.1 <gdb@fsf.org> | 1989-01-31 17:56:40 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:31 +0100 |
commit | e91b87a36830d061ef87d67be5f309e4d4ed918f (patch) | |
tree | 3408ea913a9cccd51c9b7d0b3bc7d7897cac8a5b /gdb/config.gdb | |
parent | bb7592f01006b09c846831a9fb9c306307ba34f6 (diff) | |
download | ppe42-binutils-e91b87a36830d061ef87d67be5f309e4d4ed918f.tar.gz ppe42-binutils-e91b87a36830d061ef87d67be5f309e4d4ed918f.zip |
gdb-3.1
Diffstat (limited to 'gdb/config.gdb')
-rwxr-xr-x | gdb/config.gdb | 233 |
1 files changed, 151 insertions, 82 deletions
diff --git a/gdb/config.gdb b/gdb/config.gdb index 62848f83c8..2578462155 100755 --- a/gdb/config.gdb +++ b/gdb/config.gdb @@ -4,7 +4,7 @@ # Shell script to create proper links to machine-dependent files in # preparation for compiling gdb. # -# Usage: config.gdb machine +# Usage: config.gdb machine [operating-system] # # If config.gdb succeeds, it leaves its status in config.status. # If config.gdb fails after disturbing the status quo, @@ -13,79 +13,159 @@ progname=$0 -case $# in +case $# in 1) machine=$1 - paramfile=m-${machine}.h - initfile=m-${machine}init.h - pinsnfile=${machine}-pinsn.c - opcodefile=${machine}-opcode.h + os="none" + ;; +2) + machine=$1 + os=$2 + ;; +*) + echo "Usage: $progname machine [operating-system]" + echo "Available machine types:" + echo m-*.h | sed 's/m-//g' | sed 's/\.h//g' + if [ -r config.status ] + then + cat config.status + fi + exit 1 + ;; +esac - case $machine in - hp9k320) - initfile=m-sun3init.h - pinsnfile=m68k-pinsn.c - opcodefile=m68k-opcode.h - ;; - hp9k320bsd) - initfile=m-sun3init.h - pinsnfile=m68k-pinsn.c - opcodefile=m68k-opcode.h - ;; - isi) - # some version of m68k-pinsn.c should work here - pinsnfile=m68k-pinsn.c - opcodefile=m68k-opcode.h - ;; - merlin) - # m-umaxinit.h? - initfile=unknown-or-unavailable - pinsnfile=ns32k-pinsn.c - opcodefile=ns32k-opcode.h - ;; - news) - pinsnfile=m68k-pinsn.c - opcodefile=m68k-opcode.h - ;; - npl) - pinsnfile=gld-pinsn.c - ;; - pn) - pinsnfile=gld-pinsn.c - ;; - sun2) - pinsnfile=m68k-pinsn.c - opcodefile=m68k-opcode.h - ;; - sun3) - pinsnfile=m68k-pinsn.c - opcodefile=m68k-opcode.h - ;; - sun4) - pinsnfile=sparc-pinsn.c - opcodefile=sparc-opcode.h - ;; - umax) - pinsnfile=ns32k-pinsn.c - opcodefile=ns32k-opcode.h - ;; - test) - paramfile=one - initfile=two - pinsnfile=three - opcodefile=four +paramfile=m-${machine}.h +pinsnfile=${machine}-pinsn.c +opcodefile=${machine}-opcode.h +if [ -r ${machine}-dep.c ] +then + depfile=${machine}-dep.c +else + depfile=default-dep.c +fi + +# +# Special cases. +# If a file is not needed, set the filename to 'skip' and it will be +# ignored. +# +case $machine in +aux) + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +vax) + pinsnfile=vax-pinsn.c + opcodefile=vax-opcode.h + ;; +hp9k320) + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +isi) + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +i386) + echo "Note: i386 users need to modify \`CLIBS' & \`REGEX*' in the Makefile" + opcodefile=skip + ;; +i386gas) + echo "Note: i386 users need to modify \`CLIBS' & \`REGEX*' in the Makefile" + echo "Use of the coff encapsulation features also requires the GNU binutils utilities" + echo "to be ahead of their System V counterparts in your path." + pinsnfile=i386-pinsn.c + depfile=i386-dep.c + opcodefile=skip + ;; +merlin) + pinsnfile=ns32k-pinsn.c + opcodefile=ns32k-opcode.h + ;; +news) + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +npl) + pinsnfile=gld-pinsn.c + ;; +pn) + pinsnfile=gld-pinsn.c + ;; +sun2) + case $os in + os4|sunos4) + paramfile=m-sun2os4.h ;; + os2|sunos2) + paramfile=m-sun2os2.h esac + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +sun2os2) + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +sun2os4) + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +sun3) + case $os in + os4|sunos4) + paramfile=m-sun3os4.h + esac + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + ;; +sun3os4) + pinsnfile=m68k-pinsn.c + opcodefile=m68k-opcode.h + depfile=sun3-dep.c + ;; +sun4os4) + pinsnfile=sparc-pinsn.c + opcodefile=sparc-opcode.h + depfile=sparc-dep.c + ;; +umax) + pinsnfile=ns32k-pinsn.c + opcodefile=ns32k-opcode.h + ;; +sparc|sun4) + case $os in + os4|sunos4) + paramfile=m-sun4os4.h + esac + pinsnfile=sparc-pinsn.c + opcodefile=sparc-opcode.h + depfile=sparc-dep.c + paramfile=m-sparc.h + ;; +test) + paramfile=one + pinsnfile=three + opcodefile=four + ;; +*) + echo "Unknown machine type: \`$machine'" + echo "Available types:" + echo m-*.h | sed 's/m-//g' | sed 's/\.h//g' + exit 1 +esac - files="$paramfile $initfile $pinsnfile $opcodefile" - links="param.h m-init.h pinsn.c opcode.h" +files="$paramfile $pinsnfile $opcodefile $depfile" +links="param.h pinsn.c opcode.h dep.c" - while [ -n "$files" ] - do - # set file to car of files, files to cdr of files - set $files; file=$1; shift; files=$* - set $links; link=$1; shift; links=$* +while [ -n "$files" ] +do + # set file to car of files, files to cdr of files + set $files; file=$1; shift; files=$* + set $links; link=$1; shift; links=$* + if [ "$file" != skip ] + then if [ ! -r $file ] then echo "$progname: cannot create a link \`$link'," @@ -103,21 +183,10 @@ case $# in exit 1 fi echo "Linked \`$link' to \`$file'." - done - - echo "Links are now set up for use with a $machine." \ - | tee config.status - exit 0 - ;; -*) - echo "Usage: $progname machine" - echo -n "Where \`machine' is something like " - echo "\`vax', \`sun3', \`umax', etc." - if [ -r config.status ] - then - cat config.status fi - exit 1 - ;; -esac +done + +echo "Links are now set up for use with a $machine." \ + | tee config.status +exit 0 |