1993-08-17 16:43:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# config.bfd
|
|
|
|
# Convert a canonical host type into a BFD host type.
|
|
|
|
# Call with canonical name as the argument.
|
|
|
|
# Echos the result.
|
|
|
|
|
|
|
|
canon="$1"
|
|
|
|
cpu=`echo $canon | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
|
|
|
|
|
|
|
# WHEN ADDING ENTRIES TO THIS MATRIX:
|
|
|
|
# Make sure that the left side always has two dashes. Otherwise you
|
|
|
|
# can get spurious matches. Even for unambiguous cases, do this as a
|
|
|
|
# convention, else the table becomes a real mess to understand and maintain.
|
|
|
|
|
|
|
|
case "${canon}" in
|
1994-02-16 00:59:39 +00:00
|
|
|
alpha-*-netware*) bfd_name=alpha-nlm ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
alpha-*-*) bfd_name=alphaosf ;;
|
1993-10-22 13:36:28 +00:00
|
|
|
a29k-*-ebmon*) bfd_name=a29k-coff ;;
|
|
|
|
a29k-*-udi*) bfd_name=a29k-coff ;;
|
|
|
|
a29k-*-aout*) bfd_name=a29k-aout ;;
|
|
|
|
a29k-*-coff*) bfd_name=a29k-coff ;;
|
|
|
|
a29k-*-sym1*) bfd_name=a29k-coff ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
h8300*-*-*) bfd_name=h8300-coff ;;
|
|
|
|
h8500-*-*) bfd_name=h8500-coff ;;
|
|
|
|
sh-*-*) bfd_name=sh-coff ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
hppa*-*-*elf*) bfd_name=hppa-elf ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
hppa*-*-bsd*) bfd_name=hppabsd ;;
|
|
|
|
hppa*-*-hpux*) bfd_name=hppahpux ;;
|
1993-10-05 17:46:28 +00:00
|
|
|
hppa*-*-hiux*) bfd_name=hppahpux ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
hppa*-*-osf*) bfd_name=hppaosf ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
i[34]86-*-sysv4*) bfd_name=i386-elf ;;
|
1993-11-17 19:54:02 +00:00
|
|
|
i[34]86-*-unixware) bfd_name=i386-elf ;;
|
1993-09-12 01:16:45 +00:00
|
|
|
i[34]86-*-solaris2*) bfd_name=i386-elf ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
i[34]86-*-sysv*) bfd_name=i386-coff ;;
|
1993-09-22 14:54:50 +00:00
|
|
|
i[34]86-*-isc*) bfd_name=i386-coff ;;
|
|
|
|
i[34]86-*-sco*) bfd_name=i386-coff ;;
|
1994-03-30 08:53:45 +00:00
|
|
|
i[34]86-sequent-bsd*) bfd_name=i386-dynix ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
i[34]86-*-bsd*) bfd_name=i386-bsd ;;
|
|
|
|
i[34]86-*-coff) bfd_name=i386-coff ;;
|
|
|
|
i[34]86-*-aix*) bfd_name=i386-coff ;;
|
|
|
|
i[34]86-*-elf) bfd_name=i386-elf ;;
|
1993-09-10 17:10:13 +00:00
|
|
|
i[34]86-*-netbsd*) bfd_name=i386-netbsd ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
i[34]86-*-netware*) bfd_name=i386-nlm ;;
|
|
|
|
i[34]86-*-linux*) bfd_name=i386-linux ;;
|
1993-10-05 17:46:28 +00:00
|
|
|
i[34]86-*-lynxos*) bfd_name=i386-lynx ;;
|
1993-08-20 19:19:51 +00:00
|
|
|
i[34]86-*-mach*) bfd_name=i386-mach3 ;;
|
|
|
|
i[34]86-*-osf1mk*) bfd_name=i386-mach3 ;;
|
1994-03-28 18:02:05 +00:00
|
|
|
i[34]86-*-os9k) bfd_name=i386-os9k;;
|
1993-08-17 16:43:52 +00:00
|
|
|
i[34]86-none-*) bfd_name=i386-coff ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
i960-*-vxworks4*) bfd_name=i960-bout ;;
|
|
|
|
i960-*-vxworks5.0) bfd_name=i960-bout ;;
|
|
|
|
i960-*-vxworks5.*) bfd_name=i960-coff ;;
|
1993-10-22 13:36:28 +00:00
|
|
|
i960-*-vxworks*) bfd_name=i960-bout ;;
|
|
|
|
i960-*-aout*) bfd_name=i960-bout ;;
|
|
|
|
i960-*-bout*) bfd_name=i960-bout ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
i960-*-coff*) bfd_name=i960-coff ;;
|
1993-10-05 17:46:28 +00:00
|
|
|
i960-*-nindy*) bfd_name=i960-bout ;;
|
1993-10-22 13:36:28 +00:00
|
|
|
m68*-apollo-bsd*) bfd_name=apollo ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
m68*-bull-sysv*) bfd_name=u68k-coff ;;
|
|
|
|
m68*-hp-bsd*) bfd_name=hp300bsd ;;
|
1993-10-22 13:36:28 +00:00
|
|
|
m68*-*-aout*) bfd_name=m68k-aout ;;
|
|
|
|
m68*-*-coff*) bfd_name=m68k-coff ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
m68*-*-hpux*) bfd_name=hp300hpux ;;
|
1993-10-05 17:46:28 +00:00
|
|
|
m68*-*-lynxos*) bfd_name=m68k-lynx ;;
|
1993-10-22 13:36:28 +00:00
|
|
|
m68*-*-os68k*) bfd_name=m68k-aout ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
m68*-*-sunos*) bfd_name=m68k-aout ;;
|
1993-11-01 15:19:29 +00:00
|
|
|
m68*-*-sysv4*) bfd_name=m68k-elf ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
m68*-*-sysv*) bfd_name=m68k-coff ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
m68*-*-vxworks*) bfd_name=m68k-aout ;;
|
|
|
|
m68*-ericsson-*) bfd_name=m68k-aout ;;
|
|
|
|
m68*-netx-*) bfd_name=m68k-aout ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
|
1993-08-21 00:52:58 +00:00
|
|
|
m88*-*-sysv4*) bfd_name=m88k-elf ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
# DGUX used to use COFF, but now (Jan 94) I believe it uses ELF by default.
|
|
|
|
m88*-*-dgux*) bfd_name=m88k-elf ;;
|
|
|
|
m88*-*-*) bfd_name=m88k-coff ;;
|
|
|
|
|
1993-11-01 15:19:29 +00:00
|
|
|
mips*-big-*) bfd_name=bigmips ;;
|
|
|
|
mips*-dec-bsd*) bfd_name=mipsdecbsd ;;
|
|
|
|
mips*-dec-*) bfd_name=decstation ;;
|
|
|
|
mips*el-*-ecoff*) bfd_name=decstation ;;
|
|
|
|
mips*-*-ecoff*) bfd_name=bigmips ;;
|
1993-12-01 19:47:15 +00:00
|
|
|
mips*-*-irix5*) bfd_name=mipsbelf ;;
|
1993-11-01 15:19:29 +00:00
|
|
|
mips*-sgi-*) bfd_name=bigmips ;;
|
|
|
|
mips*-*-sysv*) bfd_name=riscos ;;
|
|
|
|
mips*-*-riscos*) bfd_name=riscos ;;
|
1993-11-02 15:40:29 +00:00
|
|
|
mips*-*-bsd*) bfd_name=bigmips ;; # Sony News
|
1993-11-01 15:19:29 +00:00
|
|
|
mips*el-*-elf*) bfd_name=mipslelf ;;
|
|
|
|
mips*-*-elf*) bfd_name=mipsbelf ;;
|
1993-08-20 19:19:51 +00:00
|
|
|
# Apparently this is similar enough to 386 mach to use the same target.
|
|
|
|
ns32*-*-mach*) bfd_name=i386-mach3 ;;
|
1994-03-28 18:02:05 +00:00
|
|
|
powerpc-*-aix*) bfd_name=rs6000 ;;
|
|
|
|
powerpc-*-sysv4*) bfd_name=ppc-elf ;;
|
|
|
|
# start-sanitize-powerpc-netware
|
|
|
|
powerpc-*-netware*) bfd_name=ppc-nlm ;;
|
|
|
|
# end-sanitize-powerpc-netware
|
1993-08-17 16:43:52 +00:00
|
|
|
rs6000-*-*) bfd_name=rs6000 ;;
|
1993-11-01 15:19:29 +00:00
|
|
|
sparc-*-lynxos*) bfd_name=sparc-lynx ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
sparc-*-solaris2*) bfd_name=sparc-elf ;;
|
|
|
|
sparc-*-sysv4*) bfd_name=sparc-elf ;;
|
|
|
|
# start-sanitize-v9
|
|
|
|
sparc64-*-aout*) bfd_name=sparc-aout ;;
|
1993-12-01 19:47:15 +00:00
|
|
|
sparc64-*-elf*) bfd_name=sparc64-elf ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
# end-sanitize-v9
|
1993-11-17 19:54:02 +00:00
|
|
|
sparc-*-netware*) bfd_name=sparc-nlm ;;
|
1993-12-01 22:26:06 +00:00
|
|
|
sparc*-*-coff*) bfd_name=sparc-coff ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
sparc*-*-*) bfd_name=sparc-aout ;;
|
|
|
|
tahoe-*-*) bfd_name=tahoe ;;
|
1993-10-22 13:36:28 +00:00
|
|
|
vax-*-vms*) bfd_name=vax-vms ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
vax-*-*) bfd_name=vax ;;
|
|
|
|
we32k-*-*) bfd_name=we32k ;;
|
|
|
|
z8k*-*-*) bfd_name=z8k-coff ;;
|
|
|
|
|
1993-10-22 13:36:28 +00:00
|
|
|
*-*-aout*) bfd_name=${cpu}-aout ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
*-*-bsd*) bfd_name=${cpu}-aout ;;
|
|
|
|
*-*-netware*) bfd_name=${cpu}-nlm ;;
|
|
|
|
*-*-sysv4*) bfd_name=${cpu}-elf ;;
|
|
|
|
*-*-solaris2*) bfd_name=${cpu}-elf ;;
|
1994-02-16 00:59:39 +00:00
|
|
|
*-*-vsta*) bfd_name=${cpu}-aout ;;
|
1993-10-22 13:36:28 +00:00
|
|
|
*-*-go32*) bfd_name=${cpu}-aout ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
*-*-sysv*) bfd_name=${cpu}-coff ;;
|
|
|
|
|
1993-12-01 19:47:15 +00:00
|
|
|
*-*-aout64*) bfd_name=${cpu}-aout64 ;;
|
|
|
|
*-*-elf64*) bfd_name=${cpu}-elf64 ;;
|
1993-08-17 16:43:52 +00:00
|
|
|
|
|
|
|
*-adobe-*) bfd_name=adobe ;;
|
|
|
|
*-sony-*) bfd_name=news ;;
|
|
|
|
*-intel-*) bfd_name=${cpu}-coff ;;
|
|
|
|
*-stratus-*) bfd_name=${cpu}-elf ;;
|
|
|
|
*-cbm-*) bfd_name=${cpu}-elf ;;
|
|
|
|
*-ncr-*) bfd_name=${cpu}-elf ;;
|
|
|
|
*-tandem-*) bfd_name=st2000 ;;
|
|
|
|
|
|
|
|
# Allow targets that config.sub doesn't recognize, like "all".
|
|
|
|
*) bfd_name=$canon ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo $bfd_name
|