* config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to
[deliverable/binutils-gdb.git] / ld / configure.in
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
6 srctrigger=ldmain.c
7 srcname="linker"
8 target_dependent=true
9
10 # per-host:
11
12 . ${srcdir}/../bfd/configure.host
13
14 host_makefile_frag=
15
16 if [ -f ${srcdir}/config/${my_host}.mh ] ; then
17 host_makefile_frag=config/${my_host}.mh
18 fi
19
20 # per-target:
21
22 # Canonicalize the secondary target names.
23 if [ -n "$with_targets" ]; then
24 for targ in `echo $with_targets | sed 's/,/ /g'`
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
34 fi
35
36 all_targets=false
37
38 for targ in $target $canon_targets
39 do
40
41 case "${targ}" in
42
43 sparc-sun-sunos4*) ld_target=sun4 ;;
44 sparclite*-*-coff) ld_target=coff-sparc ;;
45 sparclite*-fujitsu-*) ld_target=sun4 ;;
46 sparc*-*-aout) ld_target=sun4 ;;
47 sparc*-*-coff) ld_target=coff-sparc ;;
48 sparc*-*-elf) ld_target=sun4sol2 ;;
49 sparc*-*-lynxos*) ld_target=sparc-lynx ;;
50 sparc*-*-solaris2*) ld_target=sun4sol2 ;;
51 sparc*-wrs-vxworks*) ld_target=sun4 ;;
52 sparc*-*-netware) ld_target=sun4sol2 ;;
53 i960-wrs-vxworks5.0*) ld_target=i960 ;;
54 i960-wrs-vxworks5*) ld_target=i960coff ;;
55 i960-wrs-vxworks*) ld_target=i960 ;;
56 i960-intel-nindy) ld_target=i960 ;;
57 m68*-sun-sunos[34]*) ld_target=sun3 ;;
58 m68*-wrs-vxworks*) ld_target=vxworks68 ;;
59 m68*-ericsson-ose) ld_target=ose68 ;;
60 *-tandem-none) ld_target=st2000 ;; # FIXME needs better name
61 i[34]86-*-vsta) ld_target=vsta ;;
62 i[34]86-*-go32) ld_target=i386-go32 ;;
63 i[34]86-*-aix*) ld_target=i386-coff ;;
64 i[34]86-*-sco*) ld_target=i386-coff ;;
65 i[34]86-*-lynxos*) ld_target=i386-lynx ;;
66 i[34]86-*-coff) ld_target=i386-coff ;;
67 i[34]86-*-bsd) ld_target=i386-bsd ;;
68 i[34]86-*-bsd386) ld_target=i386-bsd ;;
69 i[34]86-*-aout) ld_target=i386-aout ;;
70 i[34]86-*-linux) ld_target=i386-linux ;;
71 i[34]86-*-sysv4*) ld_target=i386-elf ;;
72 i[34]86-*-unixware) ld_target=i386-elf ;;
73 i[34]86-*-netware) ld_target=i386-elf ;;
74 i[34]86-*-elf*) ld_target=i386-elf ;;
75 i[34]86-*-sysv*) ld_target=i386-coff ;;
76 i[34]86-*-mach*) ld_target=i386-mach ;;
77 i[34]86-*-gnu*) ld_target=i386-mach ;;
78 m8*-*-*) ld_target=m88k-bcs ;;
79 a29k-*-udi) ld_target=sa29200 ;;
80 a29k-*-ebmon) ld_target=ebmon29k ;;
81 a29k-*-*) ld_target=coff-a29k ;;
82 h8300-*-hms) ld_target=coff-h8300 ;;
83 h8300h-*-hms) ld_target=cf-h8300h ;;
84 h8500-*-hms) ld_target=coff-h8500 ;;
85 sh-*-*) ld_target=coff-sh ;;
86 m68k-sony-*) ld_target=news ;;
87 m68k-hp-bsd*) ld_target=hp300bsd ;;
88 m68k-motorola-sysv*) ld_target=delta68 ;;
89 m68*-*-aout) ld_target=m68k ;;
90 m68*-*-coff) ld_target=m68k-coff ;;
91 m68*-*-hpux) ld_target=hp300hpux ;;
92 m68*-*-lynxos*) ld_target=m68k-lynx ;;
93 m68*-*-*)
94 echo '***' "Unknown m68k target vendor for ld:" ${target_vendor} 1>&2
95 exit 1 ;;
96 hppa*-*-*elf*) ld_target=hppaelf ;;
97 vax-dec-ultrix* | vax-dec-bsd*) ld_target=vax ;;
98 mips*-dec-ultrix*) ld_target=mips-lit ;;
99 mips*-sgi-irix5*) ld_target=mipsb-elf32 ;;
100 mips*-sgi-irix*) ld_target=mips-big ;;
101 mips*el-idt-ecoff*) ld_target=mipsl-idt ;;
102 mips*-idt-ecoff*) ld_target=mips-idt ;;
103 mips*-dec-bsd*) ld_target=mipsbsd ;;
104 mips*-*-elf*) ld_target=mipsb-elf32 ;;
105 alpha-*-osf*) ld_target=alpha ;;
106 alpha-*-netware*) ld_target=alpha ;;
107 z8k-*-sim | z8k-*-coff) ld_target=z8ksim ;;
108 powerpc-*-elf*) ld_target=ppc-elf32 ;;
109 # start-sanitize-powerpc-netware
110 powerpc-*-netware*) ld_target=ppc-elf32 ;;
111 # end-sanitize-powerpc-netware
112 *-*-aout) ld_target=${target_cpu}-${target_vendor} ;;
113 *-*-coff) ld_target=${target_cpu}-${target_vendor} ;;
114 *-*-netware) ld_target=${target_cpu}-elf ;;
115
116 all) ld_target=all ;;
117 esac
118
119 if [ "x$ld_target" = "xall" ]; then
120 all_targets=true
121 else
122 if [ ! -f ${srcdir}/config/${ld_target}.mt ] ; then
123 echo '***' No file ${srcdir}/config/${ld_target}.mt 1>&2
124 echo '***' GNU LD does not support target ${ld_target} 1>&2
125 echo '***' Look in ld/configure.in for supported targets 1>&2
126 exit 1
127 fi
128
129 if [ "x$targ" = "x$target" ]; then
130 target_makefile_frag=${srcdir}/config/${ld_target}.mt
131 else
132 target_extra_frags="$target_extra_frags ${srcdir}/config/${ld_target}.mt"
133 fi
134 fi
135 done
136
137 # We don't do any links based on the target system, just makefile config.
138
139 # post-target:
140
141 rm -f Makefile.tmp Makefile.2
142 mv Makefile Makefile.tmp
143
144 if [ x${all_targets} = xfalse ]; then
145
146 allfrags="$target_makefile_frag $target_extra_frags"
147
148 # The emulations in all the configured targets.
149 tb=`sed -n '
150 s/EMUL[ ]*=[ ]*\([^ ]*\)/em_\1.o/p
151 ' $allfrags`
152 # uniq the list.
153 f=""
154 for i in $tb ; do
155 case " $f " in
156 *" $i "*) ;;
157 *) f="$f $i" ;;
158 esac
159 done
160 tb="$f"
161
162 echo "EMULATION_OFILES = $tb" >> Makefile.2
163
164 else # all_targets is true
165 echo 'EMULATION_OFILES = $(ALL_EMULATIONS)' >> Makefile.2
166 fi # all_targets is true
167
168 cat Makefile.tmp >> Makefile.2
169 rm -f Makefile.tmp
170 mv Makefile.2 Makefile
171
172 mkdir ldscripts 2>/dev/null
This page took 0.033095 seconds and 4 git commands to generate.