Separated out opcode aliases from m68k opcode table, to reduce table size and
[deliverable/binutils-gdb.git] / ld / configure.in
CommitLineData
02757e59
SC
1# This file is a shell script fragment that supplies the information
2# necessary to tailor a template configure script into the configure
3# script appropriate for this directory. For more information, check
4# any existing configure script.
5
6srctrigger=ldmain.c
7srcname="linker"
818a192a 8target_dependent=true
02757e59
SC
9
10# per-host:
11
8ddef552
DM
12. ${srcdir}/../bfd/configure.host
13
8a60817c 14host_makefile_frag=
ab57b174 15
9d1fe8a4
SC
16if [ -f ${srcdir}/config/${my_host}.mh ] ; then
17 host_makefile_frag=config/${my_host}.mh
8a60817c 18fi
02757e59
SC
19
20# per-target:
21
1c4b3cda 22# Canonicalize the secondary target names.
cdf71377
KR
23if [ -n "$enable_targets" ]; then
24 for targ in `echo $enable_targets | sed 's/,/ /g'`
1c4b3cda
ILT
25 do
26 result=`$configsub $targ 2>/dev/null`
27 if [ -n "$result" ]; then
28 canon_targets="$canon_targets $result"
29 else
30 # Allow targets that config.sub doesn't recognize, like "all".
31 canon_targets="$canon_targets $targ"
32 fi
33 done
34fi
35
36all_targets=false
37
38for targ in $target $canon_targets
39do
40
41case "${targ}" in
42
c1e128e5
ILT
43# start-sanitize-arc
44 arc-*-elf*) ld_target=arc-elf ;;
45# end-sanitize-arc
1c4b3cda 46 sparc-sun-sunos4*) ld_target=sun4 ;;
028f8872 47 sparclite*-*-coff) ld_target=coff-sparc ;;
1c4b3cda 48 sparclite*-fujitsu-*) ld_target=sun4 ;;
1c4b3cda 49 sparc*-*-aout) ld_target=sun4 ;;
d05ac46b 50 sparc*-*-coff) ld_target=coff-sparc ;;
5cad5873
ILT
51 sparc64-*-elf*) ld_target=sparc64-elf ;;
52 sparc64*) ld_target=sun4 ;;
1c4b3cda 53 sparc*-*-elf) ld_target=sun4sol2 ;;
7b95fe96 54 sparc*-*-lynxos*) ld_target=sparc-lynx ;;
32286e08 55 sparc*-*-netbsd*) ld_target=sparc-nbsd ;;
1c4b3cda 56 sparc*-*-solaris2*) ld_target=sun4sol2 ;;
d05ac46b 57 sparc*-wrs-vxworks*) ld_target=sun4 ;;
97dc4cf8
KR
58 i960-wrs-vxworks5.0*) ld_target=i960 ;;
59 i960-wrs-vxworks5*) ld_target=i960coff ;;
1c4b3cda 60 i960-wrs-vxworks*) ld_target=i960 ;;
6d445436 61 i960-*-coff) ld_target=i960coff ;;
1c4b3cda 62 i960-intel-nindy) ld_target=i960 ;;
d05ac46b
KR
63 m68*-sun-sunos[34]*) ld_target=sun3 ;;
64 m68*-wrs-vxworks*) ld_target=vxworks68 ;;
65 m68*-ericsson-ose) ld_target=ose68 ;;
1c4b3cda 66 *-tandem-none) ld_target=st2000 ;; # FIXME needs better name
6d445436
ILT
67 i[345]86-*-vsta) ld_target=vsta ;;
68 i[345]86-*-go32) ld_target=i386-go32 ;;
69 i[345]86-*-aix*) ld_target=i386-coff ;;
70 i[345]86-*-sco*) ld_target=i386-coff ;;
71 i[345]86-*-lynxos*) ld_target=i386-lynx ;;
72 i[345]86-*-coff) ld_target=i386-coff ;;
73 i[345]86-*-bsd) ld_target=i386-bsd ;;
74 i[345]86-*-bsd386) ld_target=i386-bsd ;;
3286598f 75 i[345]86-*-bsdi*) ld_target=i386-bsd ;;
6d445436 76 i[345]86-*-aout) ld_target=i386-aout ;;
3286598f 77 i[345]86-*-linux*) ld_target=i386-linux ;;
6d445436
ILT
78 i[345]86-*-sysv4*) ld_target=i386-elf ;;
79 i[345]86-*-unixware) ld_target=i386-elf ;;
32286e08 80 i[345]86-*-netbsd*) ld_target=i386-nbsd ;;
3286598f 81 i[345]86-*-netware) ld_target=i386-nw ;;
6d445436
ILT
82 i[345]86-*-elf*) ld_target=i386-elf ;;
83 i[345]86-*-sysv*) ld_target=i386-coff ;;
84 i[345]86-*-mach*) ld_target=i386-mach ;;
c1e128e5 85 i[345]86-*-gnu*) ld_target=i386-gnu ;;
1c4b3cda
ILT
86 m8*-*-*) ld_target=m88k-bcs ;;
87 a29k-*-udi) ld_target=sa29200 ;;
88 a29k-*-ebmon) ld_target=ebmon29k ;;
89 a29k-*-*) ld_target=coff-a29k ;;
f1781adc 90# arm-*-riscix*) ld_target=riscix ;;
1c4b3cda 91 h8300-*-hms) ld_target=coff-h8300 ;;
97dc4cf8 92 h8300h-*-hms) ld_target=cf-h8300h ;;
1c4b3cda
ILT
93 h8500-*-hms) ld_target=coff-h8500 ;;
94 sh-*-*) ld_target=coff-sh ;;
ff030c98 95# start-sanitize-rce
c1e128e5 96 rce-*-aout) ld_target=rce-aout ;;
ff030c98 97# end-sanitize-rce
1c4b3cda
ILT
98 m68k-sony-*) ld_target=news ;;
99 m68k-hp-bsd*) ld_target=hp300bsd ;;
100 m68*-*-aout) ld_target=m68k ;;
101 m68*-*-coff) ld_target=m68k-coff ;;
3286598f 102 m68*-*-hpux*) ld_target=hp300hpux ;;
1c4b3cda 103 m68*-*-lynxos*) ld_target=m68k-lynx ;;
5fa60968 104 m68*-*-netbsd*) ld_target=m68k-nbsd ;;
1c4b3cda
ILT
105 m68*-*-*)
106 echo '***' "Unknown m68k target vendor for ld:" ${target_vendor} 1>&2
107 exit 1 ;;
f39a73b1 108 hppa*-*-*elf*) ld_target=hppaelf ;;
1c4b3cda 109 vax-dec-ultrix* | vax-dec-bsd*) ld_target=vax ;;
7b95fe96 110 mips*-dec-ultrix*) ld_target=mips-lit ;;
d05ac46b 111 mips*-sgi-irix5*) ld_target=mipsb-elf32 ;;
7b95fe96 112 mips*-sgi-irix*) ld_target=mips-big ;;
decc32b7
RS
113 mips*el-*-ecoff*) ld_target=mipsl-idt ;;
114 mips*-*-ecoff*) ld_target=mips-idt ;;
7b95fe96 115 mips*-dec-bsd*) ld_target=mipsbsd ;;
3286598f 116 mips*el-*-elf*) ld_target=mipsl-elf32 ;;
7b95fe96 117 mips*-*-elf*) ld_target=mipsb-elf32 ;;
1c4b3cda 118 alpha-*-osf*) ld_target=alpha ;;
8a432746 119 alpha-*-netware*) ld_target=alpha ;;
1c4b3cda 120 z8k-*-sim | z8k-*-coff) ld_target=z8ksim ;;
cdf71377 121 ns32k-pc532-mach) ld_target=pc532mach ;;
32286e08 122 ns32k-pc532-netbsd*) ld_target=ns32k-nbsd ;;
f39a73b1 123 powerpc-*-elf*) ld_target=ppc-elf32 ;;
decc32b7 124 powerpc-*-eabi*) ld_target=ppc-elf32 ;;
3286598f 125 powerpc-*-netware*) ld_target=ppc-nw ;;
c1e128e5 126 w65-*-*) ld_target=coff-w65 ;;
1c4b3cda
ILT
127 *-*-aout) ld_target=${target_cpu}-${target_vendor} ;;
128 *-*-coff) ld_target=${target_cpu}-${target_vendor} ;;
3286598f 129 *-*-netware) ld_target=${target_cpu}-nw ;;
1c4b3cda
ILT
130
131 all) ld_target=all ;;
02757e59
SC
132esac
133
1c4b3cda
ILT
134 if [ "x$ld_target" = "xall" ]; then
135 all_targets=true
136 else
137 if [ ! -f ${srcdir}/config/${ld_target}.mt ] ; then
138 echo '***' No file ${srcdir}/config/${ld_target}.mt 1>&2
139 echo '***' GNU LD does not support target ${ld_target} 1>&2
140 echo '***' Look in ld/configure.in for supported targets 1>&2
141 exit 1
142 fi
7f2649bb 143
1c4b3cda
ILT
144 if [ "x$targ" = "x$target" ]; then
145 target_makefile_frag=${srcdir}/config/${ld_target}.mt
146 else
147 target_extra_frags="$target_extra_frags ${srcdir}/config/${ld_target}.mt"
148 fi
149 fi
150done
151
152# We don't do any links based on the target system, just makefile config.
153
154# post-target:
155
156rm -f Makefile.tmp Makefile.2
157mv Makefile Makefile.tmp
158
159if [ x${all_targets} = xfalse ]; then
160
161 allfrags="$target_makefile_frag $target_extra_frags"
162
163 # The emulations in all the configured targets.
164 tb=`sed -n '
eb8f714f 165 s/EMUL[ ]*=[ ]*\([^ ]*\)/e\1.o/p
cdf71377 166 s/EMUL_EXTRA.*=[ ]*\([^ ]*\)/e\1.o/p
1c4b3cda
ILT
167 ' $allfrags`
168 # uniq the list.
169 f=""
170 for i in $tb ; do
171 case " $f " in
172 *" $i "*) ;;
173 *) f="$f $i" ;;
174 esac
175 done
176 tb="$f"
177
178 echo "EMULATION_OFILES = $tb" >> Makefile.2
179
180else # all_targets is true
181 echo 'EMULATION_OFILES = $(ALL_EMULATIONS)' >> Makefile.2
182fi # all_targets is true
183
184cat Makefile.tmp >> Makefile.2
185rm -f Makefile.tmp
186mv Makefile.2 Makefile
8ddef552 187
173a0c3d 188mkdir ldscripts 2>/dev/null
This page took 0.135733 seconds and 4 git commands to generate.