* configure.in (alpha-*-osf*): New target; use alpha.mt.
[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 m68k-sun-sunos[34]*) ld_target=sun3 ;;
45 sparclite*-fujitsu-*) ld_target=sun4 ;;
46 # start-sanitize-v9
47 sparc64-*-elf*) ld_target=sparc64-elf ;;
48 sparc64*) ld_target=sun4 ;;
49 # end-sanitize-v9
50 sparc*-*-aout) ld_target=sun4 ;;
51 sparc*-*-elf) ld_target=sun4sol2 ;;
52 sparc*-*-solaris2*) ld_target=sun4sol2 ;;
53 i960-wrs-vxworks*) ld_target=i960 ;;
54 i960-intel-nindy) ld_target=i960 ;;
55 m68k-wrs-vxworks*) ld_target=vxworks68 ;;
56 m680[01234]0-wrs-vxworks*) ld_target=vxworks68 ;;
57 m683?2-wrs-vxworks*) ld_target=vxworks68 ;;
58 sparc*-wrs-vxworks*) ld_target=sun4 ;;
59 m68k-ericsson-ose) ld_target=ose68 ;;
60 m680[01234]0-ericsson-ose) ld_target=ose68 ;;
61 m683?2-ericsson-ose) ld_target=ose68 ;;
62 *-tandem-none) ld_target=st2000 ;; # FIXME needs better name
63 i[34]86-*-go32) ld_target=go32 ;;
64 i[34]86-*-aix*) ld_target=i386-coff ;;
65 i[34]86-*-sco*) ld_target=i386-coff ;;
66 i[34]86-*-lynxos*) ld_target=i386-lynx ;;
67 i[34]86-*-coff) ld_target=i386-coff ;;
68 i[34]86-*-bsd) 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-*-elf*) ld_target=i386-elf ;;
73 i[34]86-*-sysv*) ld_target=i386-coff ;;
74 m8*-*-*) ld_target=m88k-bcs ;;
75 a29k-*-udi) ld_target=sa29200 ;;
76 a29k-*-ebmon) ld_target=ebmon29k ;;
77 a29k-*-*) ld_target=coff-a29k ;;
78 h8300-*-hms) ld_target=coff-h8300 ;;
79 h8300h-*-hms) ld_target=coff-h8300h ;;
80 h8500-*-hms) ld_target=coff-h8500 ;;
81 sh-*-*) ld_target=coff-sh ;;
82 m68k-sony-*) ld_target=news ;;
83 m68k-hp-bsd*) ld_target=hp300bsd ;;
84 m68*-*-aout) ld_target=m68k ;;
85 m68*-*-coff) ld_target=m68k-coff ;;
86 m68*-*-hpux) ld_target=hp300hpux ;;
87 m68*-*-lynxos*) ld_target=m68k-lynx ;;
88 m68*-*-*)
89 echo '***' "Unknown m68k target vendor for ld:" ${target_vendor} 1>&2
90 exit 1 ;;
91 hppa*-hp-osf) ld_target=hppaosf ;;
92 vax-dec-ultrix* | vax-dec-bsd*) ld_target=vax ;;
93 mips-dec-ultrix*) ld_target=mips-lit ;;
94 mips-sgi-irix*) ld_target=mips-big ;;
95 mips-idt-ecoffl*) ld_target=mips-idtl ;;
96 mips-idt-ecoff*) ld_target=mips-idt ;;
97 mips-dec-bsd*) ld_target=mipsbsd ;;
98 mips-*-elf*) ld_target=mipsb-elf32 ;;
99 alpha-*-osf*) ld_target=alpha ;;
100 z8k-*-sim | z8k-*-coff) ld_target=z8ksim ;;
101 *-*-aout) ld_target=${target_cpu}-${target_vendor} ;;
102 *-*-coff) ld_target=${target_cpu}-${target_vendor} ;;
103
104 all) ld_target=all ;;
105 esac
106
107 if [ "x$ld_target" = "xall" ]; then
108 all_targets=true
109 else
110 if [ ! -f ${srcdir}/config/${ld_target}.mt ] ; then
111 echo '***' No file ${srcdir}/config/${ld_target}.mt 1>&2
112 echo '***' GNU LD does not support target ${ld_target} 1>&2
113 echo '***' Look in ld/configure.in for supported targets 1>&2
114 exit 1
115 fi
116
117 if [ "x$targ" = "x$target" ]; then
118 target_makefile_frag=${srcdir}/config/${ld_target}.mt
119 else
120 target_extra_frags="$target_extra_frags ${srcdir}/config/${ld_target}.mt"
121 fi
122 fi
123 done
124
125 # We don't do any links based on the target system, just makefile config.
126
127 # post-target:
128
129 rm -f Makefile.tmp Makefile.2
130 mv Makefile Makefile.tmp
131
132 if [ x${all_targets} = xfalse ]; then
133
134 allfrags="$target_makefile_frag $target_extra_frags"
135
136 # The emulations in all the configured targets.
137 tb=`sed -n '
138 s/EMUL[ ]*=[ ]*\([^ ]*\)/em_\1.o/p
139 ' $allfrags`
140 # uniq the list.
141 f=""
142 for i in $tb ; do
143 case " $f " in
144 *" $i "*) ;;
145 *) f="$f $i" ;;
146 esac
147 done
148 tb="$f"
149
150 echo "EMULATION_OFILES = $tb" >> Makefile.2
151
152 else # all_targets is true
153 echo 'EMULATION_OFILES = $(ALL_EMULATIONS)' >> Makefile.2
154 fi # all_targets is true
155
156 cat Makefile.tmp >> Makefile.2
157 rm -f Makefile.tmp
158 mv Makefile.2 Makefile
159
160 mkdir ldscripts 2>/dev/null
This page took 0.035145 seconds and 5 git commands to generate.