]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/configure.ac
[gdb/testsuite] Limit xfail in gdb.ada/call_pn.exp
[thirdparty/binutils-gdb.git] / bfd / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl Copyright (C) 2012-2024 Free Software Foundation, Inc.
4 dnl
5 dnl This file is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
9 dnl
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
14 dnl
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; see the file COPYING3. If not see
17 dnl <http://www.gnu.org/licenses/>.
18 dnl
19
20 m4_include([version.m4])
21 AC_INIT([bfd], [BFD_VERSION])
22 AC_CONFIG_SRCDIR([libbfd.c])
23
24 AC_CANONICAL_TARGET
25
26 AM_INIT_AUTOMAKE
27 AM_SILENT_RULES([yes])
28
29 dnl These must be called before LT_INIT, because it may want
30 dnl to call AC_CHECK_PROG.
31 AC_CHECK_TOOL(AR, ar)
32 AC_CHECK_TOOL(RANLIB, ranlib, :)
33
34 dnl Default to a non shared library. This may be overridden by the
35 dnl configure option --enable-shared.
36 AC_DISABLE_SHARED
37
38 AC_PROG_CC
39 AC_USE_SYSTEM_EXTENSIONS
40
41 LT_INIT([dlopen])
42
43 # AC_PLUGINS setting $plugins is called by ACX_LARGEFILE.
44 ACX_LARGEFILE
45
46 changequote(,)dnl
47 case "${target}" in
48 hppa*64*-*-*) ;;
49 *-*-*aout*| i[3-7]86-*-msdos* | ns32k-*-* | pdp11-*-*)
50 changequote([,])dnl
51 if test "$plugins" = "yes"; then
52 if test "${enable_plugins+set}" = set; then
53 AC_MSG_WARN(Enabling plugins for AOUT is experimental)
54 else
55 plugins=no
56 fi
57 fi ;;
58 hppa*-*-hpux* | *-*-*vms* | \
59 powerpc*-*-aix* | powerpc-*-beos* | powerpc-*-macos* | rs6000-*-*)
60 if test "$plugins" = "yes"; then
61 if test "${enable_plugins+set}" = set; then
62 AC_MSG_WARN(Enabling plugins may result in ar creating non-standard archives for ${target})
63 else
64 plugins=no
65 fi
66 fi ;;
67 esac
68
69 AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes")
70
71 ac_checking=
72 . ${srcdir}/development.sh
73 test "$development" = true && ac_checking=yes
74 AC_ARG_ENABLE(checking,
75 [ --enable-checking enable run-time checks],
76 [case "${enableval}" in
77 no|none) ac_checking= ;;
78 *) ac_checking=yes ;;
79 esac])dnl
80 if test x$ac_checking != x ; then
81 AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
82 fi
83
84 BFD_64_BIT
85 if test $enable_64_bit_bfd = yes ; then
86 want64=true
87 else
88 want64=false
89 fi
90
91 AC_ARG_ENABLE(targets,
92 [ --enable-targets alternative target configurations],
93 [case "${enableval}" in
94 yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
95 ;;
96 no) enable_targets= ;;
97 *) enable_targets=$enableval ;;
98 esac])dnl
99
100 AC_ARG_ENABLE(64_bit_archive,
101 AS_HELP_STRING([--enable-64-bit-archive],
102 [force 64-bit archives]),
103 [case "${enableval}" in
104 yes) want_64_bit_archive=true ;;
105 no) want_64_bit_archive=false ;;
106 *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-archive option) ;;
107 esac],[want_64_bit_archive=unset])dnl
108
109 AC_ARG_WITH(mmap,
110 [ --with-mmap try using mmap for BFD input files if available],
111 [case "${withval}" in
112 yes) want_mmap=true ;;
113 no) want_mmap=false ;;
114 *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
115 esac],[want_mmap=true])dnl
116
117 AC_ARG_ENABLE(secureplt,
118 [ --enable-secureplt Default to creating read-only plt entries],
119 [case "${enableval}" in
120 yes) use_secureplt=true ;;
121 no) use_secureplt=false ;;
122 *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;;
123 esac],[use_secureplt=true])dnl
124 if test $use_secureplt = true; then
125 AC_DEFINE(USE_SECUREPLT, 1,
126 [Define if we should default to creating read-only plt entries])
127 fi
128
129 # Decide if -z separate-code should be enabled in ELF linker by default.
130 ac_default_ld_z_separate_code=unset
131 AC_ARG_ENABLE(separate-code,
132 AS_HELP_STRING([--enable-separate-code],
133 [enable -z separate-code in ELF linker by default]),
134 [case "${enableval}" in
135 yes) ac_default_ld_z_separate_code=1 ;;
136 no) ac_default_ld_z_separate_code=0 ;;
137 esac])
138 # Enable -z separate-code by default for Linux/x86.
139 changequote(,)dnl
140 case "${target}" in
141 i[3-7]86-*-linux-* | x86_64-*-linux-*)
142 changequote([,])dnl
143 if test ${ac_default_ld_z_separate_code} = unset; then
144 ac_default_ld_z_separate_code=1
145 fi
146 ;;
147 esac
148 if test "${ac_default_ld_z_separate_code}" = unset; then
149 ac_default_ld_z_separate_code=0
150 fi
151 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE,
152 $ac_default_ld_z_separate_code,
153 [Define to 1 if you want to enable -z separate-code in ELF linker by default.])
154
155 AC_ARG_ENABLE(leading-mingw64-underscores,
156 AS_HELP_STRING([--enable-leading-mingw64-underscores],
157 [Enable leading underscores on 64 bit mingw targets]),
158 [],[])
159 AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ],
160 [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1,
161 [Define if we should use leading underscore on 64 bit mingw targets])])
162
163 DEBUGDIR=${libdir}/debug
164 AC_ARG_WITH(separate-debug-dir,
165 AS_HELP_STRING([--with-separate-debug-dir=DIR],
166 [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]),
167 [DEBUGDIR="${withval}"])
168 AC_SUBST(DEBUGDIR)
169
170 ACX_PKGVERSION([GNU Binutils])
171 ACX_BUGURL([https://sourceware.org/bugzilla/])
172
173 AM_BINUTILS_WARNINGS
174
175 AC_CONFIG_HEADERS(config.h:config.in)
176
177 # PR 14072
178 AH_VERBATIM([00_CONFIG_H_CHECK],
179 [/* Check that config.h is #included before system headers
180 (this works only for glibc, but that should be enough). */
181 #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
182 # error config.h must be #included before system headers
183 #endif
184 #define __CONFIG_H__ 1])
185
186 if test -z "$target" ; then
187 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
188 fi
189
190 AM_MAINTAINER_MODE
191 AM_CONDITIONAL(GENINSRC_NEVER, false)
192 AM_INSTALL_LIBBFD
193 AC_EXEEXT
194
195 AC_C_BIGENDIAN
196
197 host64=false
198 target64=false
199 bfd_default_target_size=32
200
201 # host stuff:
202
203 ALL_LINGUAS="da es fi fr hr id ja ro ru rw sr sv tr uk vi zh_CN pt"
204 ZW_GNU_GETTEXT_SISTER_DIR
205 AM_PO_SUBDIRS
206
207 # Permit host specific settings.
208 . ${srcdir}/configure.host
209
210 AC_SUBST(HDEFINES)
211 AC_PROG_INSTALL
212
213 AC_CHECK_SIZEOF(long long)
214 AC_CHECK_SIZEOF(void *)
215 AC_CHECK_SIZEOF(long)
216 AC_CHECK_SIZEOF(int)
217
218 if test "x${ac_cv_sizeof_void_p}" = "x8"; then
219 host64=true
220 fi
221
222 BFD_CC_FOR_BUILD
223
224 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/resource.h sys/stat.h sys/types.h \
225 unistd.h)
226
227 AC_CHECK_FUNCS(fcntl fdopen fileno fls getgid getpagesize getrlimit getuid \
228 sysconf)
229
230 AC_CHECK_DECLS([basename, ffs, stpcpy, asprintf, vasprintf, strnlen])
231 AC_CHECK_DECLS([___lc_codepage_func], [], [], [[#include <locale.h>]])
232
233 BFD_BINARY_FOPEN
234
235 AX_TLS
236
237 # Link in zlib/zstd if we can. This allows us to read compressed debug sections.
238 # This is used only by compress.c.
239 AM_ZLIB
240 AC_ZSTD
241
242 save_CFLAGS="$CFLAGS"
243 CFLAGS="$CFLAGS -Werror"
244 AC_CACHE_CHECK([compiler support for hidden visibility], bfd_cv_hidden,
245 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
246 const char hw[] __attribute__ ((__visibility__ ("hidden"))) = "Hello, World\n";
247 extern void print (const char *) __attribute__ ((__visibility__ ("hidden")));]],
248 [[print (hw);]])],
249 [bfd_cv_hidden=yes], [bfd_cv_hidden=no])])
250 CFLAGS="$save_CFLAGS"
251 if test $bfd_cv_hidden = yes; then
252 AC_DEFINE(HAVE_HIDDEN, 1,
253 [Define if your compiler supports hidden visibility.])
254 fi
255
256 # Check if linker supports --as-needed and --no-as-needed options
257 AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
258 [bfd_cv_ld_as_needed=no
259 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
260 bfd_cv_ld_as_needed=yes
261 fi
262 ])
263
264 LT_LIB_M
265
266 # When building a shared libbfd, link against the pic version of libiberty
267 # so that apps that use libbfd won't need libiberty just to satisfy any
268 # libbfd references.
269 # We can't do that if a pic libiberty is unavailable since including non-pic
270 # code would insert text relocations into libbfd.
271 SHARED_LIBADD=
272 SHARED_LDFLAGS=
273 if test "$enable_shared" = "yes"; then
274 changequote(,)dnl
275 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
276 changequote([,])dnl
277 if test -n "$x"; then
278 SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
279 fi
280 fi
281
282 SHARED_LIBADD="$SHARED_LIBADD $LTLIBINTL"
283
284 if test "$enable_shared" = "yes"; then
285 case "${host}" in
286 # More hacks to build DLLs on Windows.
287 *-*-cygwin*)
288 SHARED_LDFLAGS="-no-undefined"
289 SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32"
290 ;;
291 esac
292
293 if test -n "$SHARED_LIBADD"; then
294 if test -n "$LIBM"; then
295 if test x"$bfd_cv_ld_as_needed" = xyes; then
296 # Link against libm only when needed. Put -lc, -lm inside -Wl
297 # to stop libtool reordering these options.
298 SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed"
299 else
300 SHARED_LIBADD="$SHARED_LIBADD $LIBM"
301 fi
302 fi
303 fi
304 fi
305 AC_SUBST(SHARED_LDFLAGS)
306 AC_SUBST(SHARED_LIBADD)
307
308 # target stuff:
309
310 # Canonicalize the secondary target names.
311 if test -n "$enable_targets" ; then
312 for targ in `echo $enable_targets | sed 's/,/ /g'`
313 do
314 result=`$ac_config_sub $targ 2>/dev/null`
315 if test -n "$result" ; then
316 canon_targets="$canon_targets $result"
317 else
318 # Allow targets that config.sub doesn't recognize, like "all".
319 canon_targets="$canon_targets $targ"
320 fi
321 done
322 fi
323
324 all_targets=false
325 defvec=
326 selvecs=
327 assocvecs=
328 selarchs=
329 TDEFINES=
330 for targ in $target $canon_targets
331 do
332 if test $targ = all; then
333 all_targets=true
334 assocvecs="$assocvecs $targ_defvec $targ_selvecs"
335 elif test $targ != plugin; then
336 . $srcdir/config.bfd
337 if test $targ = $target; then
338 defvec=$targ_defvec
339 fi
340 selvecs="$selvecs $targ_defvec $targ_selvecs"
341 selarchs="$selarchs $targ_archs"
342 TDEFINES="$TDEFINES $targ_cflags"
343 fi
344 done
345 AC_SUBST(TDEFINES)
346
347 # This processing still needs to be done if we're to decide properly whether
348 # 64-bit support needs to be compiled in. Currently, it will be included if
349 # the default or any other explicitly requested target requires it; it
350 # will not be included on a 32-bit host if no 64-bit target is requested, and
351 # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
352 # used.
353
354 # uniq the default and selected vectors in all the configured targets.
355 f=""
356 for i in $selvecs ; do
357 case " $f " in
358 *" $i "*) ;;
359 *) f="$f $i" ;;
360 esac
361 done
362 selvecs="$f"
363
364
365 # uniq the associated vectors in all the configured targets.
366 f=""
367 for i in $assocvecs ; do
368 case " $f " in
369 *" $i "*) ;;
370 *) f="$f $i" ;;
371 esac
372 done
373 assocvecs="$f"
374
375
376 # uniq the architectures in all the configured targets.
377 f=""
378 for i in $selarchs ; do
379 case " $f " in
380 *" $i "*) ;;
381 *) f="$f $i" ;;
382 esac
383 done
384 selarchs="$f"
385
386 # Target backend .o files.
387 tb=
388
389 elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo
390 elf-sframe.lo dwarf1.lo dwarf2.lo"
391 coffgen="coffgen.lo dwarf2.lo"
392 coff="cofflink.lo $coffgen"
393 ecoff="ecofflink.lo $coffgen"
394 xcoff="xcofflink.lo $coffgen"
395
396 elfxx_x86="elfxx-x86.lo elf-ifunc.lo elf-vxworks.lo"
397 for vec in $selvecs
398 do
399 target_size=32
400 case "$vec" in
401 # This list is alphabetized to make it easy to compare
402 # with the two vector lists in targets.c. For the same reason,
403 # use one entry per line, even though this leads to long lines.
404 aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
405 aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
406 aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
407 aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
408 aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
409 aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
410 aarch64_mach_o_vec) tb="$tb mach-o-aarch64.lo"; target_size=64 ;;
411 aarch64_pei_le_vec) tb="$tb pei-aarch64.lo pe-aarch64igen.lo $coff"; target_size=64 ;;
412 aarch64_pe_le_vec) tb="$tb pe-aarch64.lo pe-aarch64igen.lo $coff"; target_size=64 ;;
413 alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
414 alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
415 alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
416 alpha_vms_vec) tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;;
417 alpha_vms_lib_txt_vec) tb="$tb vms-lib.lo vms-misc.lo" ;;
418 am33_elf32_linux_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
419 amdgcn_elf64_le_vec) tb="$tb elf64-amdgcn.lo elf64.lo $elf"; target_size=64 ;;
420 aout0_be_vec) tb="$tb aout0.lo aout32.lo" ;;
421 aout64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
422 aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
423 arc_elf32_be_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
424 arc_elf32_le_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
425 arm_elf32_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
426 arm_elf32_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
427 arm_elf32_fdpic_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
428 arm_elf32_fdpic_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
429 arm_elf32_nacl_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
430 arm_elf32_nacl_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
431 arm_elf32_vxworks_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
432 arm_elf32_vxworks_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
433 arm_pe_be_vec) tb="$tb pe-arm.lo peigen.lo $coff" ;;
434 arm_pe_le_vec) tb="$tb pe-arm.lo peigen.lo $coff" ;;
435 arm_pe_wince_be_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
436 arm_pe_wince_le_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
437 arm_pei_be_vec) tb="$tb pei-arm.lo peigen.lo $coff" ;;
438 arm_pei_le_vec) tb="$tb pei-arm.lo peigen.lo $coff" ;;
439 arm_pei_wince_be_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
440 arm_pei_wince_le_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
441 arm_mach_o_vec) tb="$tb mach-o-arm.lo" ;;
442 avr_elf32_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
443 bfin_elf32_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
444 bfin_elf32_fdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
445 cr16_elf32_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
446 cris_aout_vec) tb="$tb aout-cris.lo" ;;
447 cris_elf32_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
448 cris_elf32_us_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
449 crx_elf32_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
450 csky_elf32_be_vec) tb="$tb elf32-csky.lo elf32.lo $elf" ;;
451 csky_elf32_le_vec) tb="$tb elf32-csky.lo elf32.lo $elf" ;;
452 d10v_elf32_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
453 d30v_elf32_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
454 dlx_elf32_be_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
455 elf32_be_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
456 elf32_le_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
457 elf64_be_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
458 elf64_le_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
459 bpf_elf64_le_vec) tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64;;
460 bpf_elf64_be_vec) tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64 ;;
461 epiphany_elf32_vec) tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
462 fr30_elf32_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
463 frv_elf32_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
464 frv_elf32_fdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
465 h8300_elf32_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
466 h8300_elf32_linux_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
467 hppa_elf32_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
468 hppa_elf32_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
469 hppa_elf32_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
470 hppa_elf64_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
471 hppa_elf64_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
472 hppa_som_vec) tb="$tb som.lo" ;;
473 i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
474 i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
475 i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
476 i386_coff_vec) tb="$tb coff-i386.lo $coff" ;;
477 i386_coff_go32_vec) tb="$tb coff-go32.lo $coff" ;;
478 i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo $coff" ;;
479 i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;;
480 i386_elf32_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
481 i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
482 i386_elf32_sol2_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
483 i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
484 i386_mach_o_vec) tb="$tb mach-o-i386.lo" ;;
485 i386_msdos_vec) tb="$tb i386msdos.lo" ;;
486 i386_pe_vec) tb="$tb pe-i386.lo peigen.lo $coff" ;;
487 i386_pe_big_vec) tb="$tb pe-i386.lo peigen.lo $coff" ;;
488 i386_pei_vec) tb="$tb pei-i386.lo peigen.lo $coff" ;;
489 iamcu_elf32_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
490 ia64_elf32_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
491 ia64_elf32_hpux_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
492 ia64_elf64_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
493 ia64_elf64_le_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
494 ia64_elf64_hpux_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
495 ia64_elf64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
496 ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;;
497 ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
498 iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
499 kvx_elf32_vec) tb="$tb elf32-kvx.lo elfxx-kvx.lo elf32.lo $elf $ipa" ;;
500 kvx_elf64_vec) tb="$tb elf64-kvx.lo elfxx-kvx.lo elf64.lo $elf $ipa"; target_size=64 ;;
501 lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
502 lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
503 loongarch_elf32_vec) tb="$tb elf32-loongarch.lo elfxx-loongarch.lo elf32.lo elf-ifunc.lo $elf" ;;
504 loongarch_elf64_vec) tb="$tb elf64-loongarch.lo elf64.lo elfxx-loongarch.lo elf32.lo elf-ifunc.lo $elf"; target_size=64 ;;
505 loongarch64_pei_vec) tb="$tb pei-loongarch64.lo pe-loongarch64igen.lo $coff"; target_size=64 ;;
506 m32c_elf32_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
507 m32r_elf32_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
508 m32r_elf32_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
509 m32r_elf32_linux_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
510 m32r_elf32_linux_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
511 m68hc11_elf32_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
512 m68hc12_elf32_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
513 m68k_elf32_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
514 s12z_elf32_vec) tb="$tb elf32-s12z.lo elf32.lo $elf" ;;
515 mach_o_be_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
516 mach_o_le_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
517 mach_o_fat_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
518 mcore_elf32_be_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
519 mcore_elf32_le_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
520 mcore_pe_be_vec) tb="$tb pe-mcore.lo peigen.lo $coff" ;;
521 mcore_pe_le_vec) tb="$tb pe-mcore.lo peigen.lo $coff" ;;
522 mcore_pei_be_vec) tb="$tb pei-mcore.lo peigen.lo $coff" ;;
523 mcore_pei_le_vec) tb="$tb pei-mcore.lo peigen.lo $coff" ;;
524 mep_elf32_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
525 mep_elf32_le_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
526 metag_elf32_vec) tb="$tb elf32-metag.lo elf32.lo $elf" ;;
527 microblaze_elf32_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
528 microblaze_elf32_le_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
529 mips_ecoff_be_vec) tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
530 mips_ecoff_le_vec) tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
531 mips_ecoff_bele_vec) tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
532 mips_elf32_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
533 mips_elf32_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
534 mips_elf32_n_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
535 mips_elf32_n_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
536 mips_elf32_ntrad_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
537 mips_elf32_ntrad_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
538 mips_elf32_ntradfbsd_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
539 mips_elf32_ntradfbsd_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
540 mips_elf32_trad_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
541 mips_elf32_trad_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
542 mips_elf32_tradfbsd_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
543 mips_elf32_tradfbsd_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
544 mips_elf32_vxworks_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
545 mips_elf32_vxworks_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
546 mips_elf64_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
547 mips_elf64_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
548 mips_elf64_trad_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
549 mips_elf64_trad_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
550 mips_elf64_tradfbsd_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
551 mips_elf64_tradfbsd_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
552 mmix_elf64_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
553 mmix_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
554 mn10200_elf32_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
555 mn10300_elf32_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
556 moxie_elf32_be_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
557 moxie_elf32_le_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
558 msp430_elf32_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
559 msp430_elf32_ti_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
560 mt_elf32_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
561 nds32_elf32_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
562 nds32_elf32_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
563 nds32_elf32_linux_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
564 nds32_elf32_linux_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
565 nfp_elf64_vec) tb="$tb elf64-nfp.lo elf64.lo $elf" ;;
566 nios2_elf32_be_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
567 nios2_elf32_le_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
568 ns32k_aout_pc532mach_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
569 ns32k_aout_pc532nbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
570 or1k_elf32_vec) tb="$tb elf32-or1k.lo elf32.lo $elf" ;;
571 pdb_vec) tb="$tb pdb.lo" ;;
572 pdp11_aout_vec) tb="$tb pdp11.lo" ;;
573 pef_vec) tb="$tb pef.lo" ;;
574 pef_xlib_vec) tb="$tb pef.lo" ;;
575 pj_elf32_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;;
576 pj_elf32_le_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;;
577 powerpc_boot_vec) tb="$tb ppcboot.lo" ;;
578 powerpc_elf32_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
579 powerpc_elf32_le_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
580 powerpc_elf32_fbsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
581 powerpc_elf32_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
582 powerpc_elf64_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
583 powerpc_elf64_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
584 powerpc_elf64_fbsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
585 powerpc_elf64_fbsd_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
586 powerpc_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
587 pru_elf32_vec) tb="$tb elf32-pru.lo elf32.lo $elf" ;;
588 riscv_elf32_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf" ;;
589 riscv_elf64_vec) tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
590 riscv_elf32_be_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf" ;;
591 riscv_elf64_be_vec) tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
592 riscv64_pei_vec) tb="$tb pei-riscv64.lo pe-riscv64igen.lo $coff"; target_size=64 ;;
593 rl78_elf32_vec) tb="$tb elf32-rl78.lo elf32.lo $elf" ;;
594 rs6000_xcoff64_vec) tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
595 rs6000_xcoff64_aix_vec) tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
596 rs6000_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
597 rx_elf32_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
598 rx_elf32_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
599 rx_elf32_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
600 rx_elf32_linux_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
601 s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
602 s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
603 score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;;
604 score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;;
605 sh_coff_vec) tb="$tb coff-sh.lo $coff" ;;
606 sh_coff_le_vec) tb="$tb coff-sh.lo $coff" ;;
607 sh_coff_small_vec) tb="$tb coff-sh.lo $coff" ;;
608 sh_coff_small_le_vec) tb="$tb coff-sh.lo $coff" ;;
609 sh_elf32_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
610 sh_elf32_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
611 sh_elf32_fdpic_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
612 sh_elf32_fdpic_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
613 sh_elf32_linux_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
614 sh_elf32_linux_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
615 sh_elf32_nbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
616 sh_elf32_nbsd_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
617 sh_elf32_vxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
618 sh_elf32_vxworks_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
619 sh_pe_le_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo $coff" ;;
620 sh_pei_le_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo $coff" ;;
621 sparc_elf32_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
622 sparc_elf32_sol2_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
623 sparc_elf32_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
624 sparc_elf64_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
625 sparc_elf64_fbsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
626 sparc_elf64_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
627 spu_elf32_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
628 sym_vec) tb="$tb xsym.lo" ;;
629 tic30_coff_vec) tb="$tb coff-tic30.lo $coffgen" ;;
630 tic4x_coff0_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
631 tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
632 tic4x_coff1_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
633 tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
634 tic4x_coff2_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
635 tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
636 tic54x_coff0_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
637 tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
638 tic54x_coff1_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
639 tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
640 tic54x_coff2_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
641 tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
642 tic6x_elf32_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
643 tic6x_elf32_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
644 tic6x_elf32_c6000_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
645 tic6x_elf32_c6000_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
646 tic6x_elf32_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
647 tic6x_elf32_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
648 tilegx_elf32_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
649 tilegx_elf32_le_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
650 tilegx_elf64_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
651 tilegx_elf64_le_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
652 tilepro_elf32_vec) tb="$tb elf32-tilepro.lo elf32.lo $elf" ;;
653 v800_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
654 v850_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
655 vax_aout_1knbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
656 vax_aout_nbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
657 vax_elf32_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
658 ft32_elf32_vec) tb="$tb elf32-ft32.lo elf32.lo $elf" ;;
659 visium_elf32_vec) tb="$tb elf32-visium.lo elf32.lo $elf" ;;
660 wasm_vec) tb="$tb wasm-module.lo" ;;
661 wasm32_elf32_vec) tb="$tb elf32-wasm32.lo elf32.lo $elf" ;;
662 x86_64_coff_vec) tb="$tb coff-x86_64.lo $coff"; target_size=64 ;;
663 x86_64_elf32_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo elf32.lo $elf"; target_size=64 ;;
664 x86_64_elf64_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
665 x86_64_elf64_cloudabi_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
666 x86_64_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
667 x86_64_elf64_sol2_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
668 x86_64_mach_o_vec) tb="$tb mach-o-x86-64.lo" ;;
669 x86_64_pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
670 x86_64_pe_big_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
671 x86_64_pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
672 xgate_elf32_vec) tb="$tb elf32-xgate.lo elf32.lo $elf" ;;
673 xstormy16_elf32_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
674 xtensa_elf32_be_vec) tb="$tb xtensa-dynconfig.lo xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
675 xtensa_elf32_le_vec) tb="$tb xtensa-dynconfig.lo xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
676 z80_coff_vec) tb="$tb coff-z80.lo reloc16.lo $coffgen" ;;
677 z80_elf32_vec) tb="$tb elf32-z80.lo elf32.lo $elf" ;;
678 z8k_coff_vec) tb="$tb coff-z8k.lo reloc16.lo $coff" ;;
679
680 # These appear out of order in targets.c
681 srec_vec) tb="$tb srec.lo" ;;
682 symbolsrec_vec) tb="$tb srec.lo" ;;
683 tekhex_vec) tb="$tb tekhex.lo" ;;
684 core_cisco_be_vec) tb="$tb cisco-core.lo" ;;
685 core_cisco_le_vec) tb="$tb cisco-core.lo" ;;
686
687 "") ;;
688 *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
689 esac
690
691 if test ${target_size} = 64; then
692 target64=true
693 fi
694 if test x"${vec}" = x"${defvec}"; then
695 bfd_default_target_size=${target_size}
696 fi
697 done
698
699 if test "$plugins" = "yes"; then
700 tb="$tb plugin.lo"
701 fi
702
703 # Target architecture .o files.
704 # A couple of CPUs use shorter file names to avoid problems on DOS
705 # filesystems.
706 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
707
708 # Weed out duplicate .o files.
709 f=""
710 for i in $tb ; do
711 case " $f " in
712 *" $i "*) ;;
713 *) f="$f $i" ;;
714 esac
715 done
716 tb="$f"
717
718 f=""
719 for i in $ta ; do
720 case " $f " in
721 *" $i "*) ;;
722 *) f="$f $i" ;;
723 esac
724 done
725 ta="$f"
726
727 bfd_backends="$tb"
728 bfd_machines="$ta"
729
730 if test x${all_targets} = xtrue ; then
731 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
732 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
733 selvecs=
734 havevecs=-DHAVE_all_vecs
735 selarchs=
736 test -n "$assocvecs" &&
737 assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
738 else # all_targets is true
739 # Only set these if they will be nonempty, for the clever echo.
740 havevecs=
741 assocvecs=
742 test -n "$selvecs" &&
743 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
744 test -n "$selvecs" &&
745 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
746 test -n "$selarchs" &&
747 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
748 fi # all_targets is true
749
750 # 64-bit archives need a 64-bit bfd_vma.
751 if test "x$want_64_bit_archive" = xtrue; then
752 want64=true
753 AC_DEFINE(USE_64_BIT_ARCHIVE, 1,
754 [Define if 64-bit archives should always be used.])
755 fi
756
757 case ${host64}-${target64}-${want64} in
758 *true*)
759 wordsize=64
760 bfd64_libs='$(BFD64_LIBS)'
761 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
762 if test -n "$GCC" ; then
763 bad_64bit_gcc=no;
764 AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
765 # Add more tests for gcc versions with non-working 64-bit support here.
766 AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
767 bad_64bit_gcc=yes;
768 AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
769 AC_MSG_RESULT(no))
770 if test $bad_64bit_gcc = yes ; then
771 AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
772 fi
773 fi
774 ;;
775 false-false-false)
776 wordsize=32
777 all_backends='$(BFD32_BACKENDS)'
778 ;;
779 esac
780
781 tdefaults=""
782 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
783 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
784 test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
785 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
786
787 AC_SUBST(wordsize)
788 AC_SUBST(bfd64_libs)
789 AC_SUBST(all_backends)
790 AC_SUBST(bfd_backends)
791 AC_SUBST(bfd_machines)
792 AC_SUBST(bfd_default_target_size)
793 AC_SUBST(tdefaults)
794 AC_SUBST(havevecs)
795
796 # If we are configured native, pick a core file support file.
797 COREFILE=
798 COREFLAG=
799 CORE_HEADER=
800 TRAD_HEADER=
801 if test "${target}" = "${host}"; then
802 case "${host}" in
803 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
804 COREFILE=''
805 ;;
806 alpha*-*-linux-*)
807 COREFILE=trad-core.lo
808 TRAD_HEADER='"hosts/alphalinux.h"'
809 ;;
810 alpha*-*-netbsd* | alpha*-*-openbsd*)
811 COREFILE=netbsd-core.lo
812 ;;
813 alpha*-*-*)
814 COREFILE=osf-core.lo
815 ;;
816 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
817 COREFILE='' ;;
818 arm*-*-netbsd* | arm-*-openbsd*)
819 COREFILE=netbsd-core.lo
820 ;;
821 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
822 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
823 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
824 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
825 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
826 hppa*-*-netbsd* | hppa*-*-openbsd*)
827 COREFILE=netbsd-core.lo
828 ;;
829
830 changequote(,)dnl
831 i[3-7]86-*-bsdi)
832 changequote([,])dnl
833 COREFILE=
834 ;;
835 changequote(,)dnl
836 i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.*)
837 changequote([,])dnl
838 COREFILE=trad-core.lo
839 TRAD_HEADER='"hosts/i386bsd.h"'
840 ;;
841 changequote(,)dnl
842 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
843 changequote([,])dnl
844 COREFILE=''
845 TRAD_HEADER='"hosts/i386bsd.h"'
846 ;;
847 changequote(,)dnl
848 i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
849 changequote([,])dnl
850 COREFILE=netbsd-core.lo
851 ;;
852 changequote(,)dnl
853 i[3-7]86-esix-sysv3*)
854 changequote([,])dnl
855 COREFILE=trad-core.lo
856 TRAD_HEADER='"hosts/esix.h"'
857 ;;
858 changequote(,)dnl
859 i[3-7]86-*-mach3*)
860 changequote([,])dnl
861 COREFILE=trad-core.lo
862 TRAD_HEADER='"hosts/i386mach3.h"'
863 ;;
864 changequote(,)dnl
865 i[3-7]86-*-linux-*)
866 changequote([,])dnl
867 COREFILE=trad-core.lo
868 TRAD_HEADER='"hosts/i386linux.h"'
869 case "$enable_targets"-"$want64" in
870 *x86_64-*linux*|*-true)
871 CORE_HEADER='"hosts/x86-64linux.h"'
872 esac
873 ;;
874 mips*-*-netbsd* | mips*-*-openbsd*)
875 COREFILE=netbsd-core.lo
876 ;;
877 mips-*-irix*)
878 COREFILE=irix-core.lo
879 ;;
880 m68*-*-linux-*)
881 COREFILE=trad-core.lo
882 TRAD_HEADER='"hosts/m68klinux.h"'
883 ;;
884 m68*-*-netbsd*)
885 COREFILE=netbsd-core.lo
886 ;;
887 ns32k-pc532-mach)
888 COREFILE=trad-core.lo
889 TRAD_HEADER='"hosts/pc532mach.h"'
890 ;;
891 ns32k-*-netbsd* | ns32k-*-openbsd*)
892 COREFILE=netbsd-core.lo
893 ;;
894 rs6000-*-lynx*)
895 COREFILE=lynx-core.lo
896 ;;
897 changequote(,)dnl
898 rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].* | powerpc64-*-aix[5-9].*)
899 changequote([,])dnl
900 COREFILE=rs6000-core.lo
901 COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
902 ;;
903 changequote(,)dnl
904 rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
905 changequote([,])dnl
906 COREFILE=rs6000-core.lo
907 COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
908 # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
909 # have c_impl as a member of struct core_dumpx
910 AC_MSG_CHECKING([for c_impl in struct core_dumpx])
911 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
912 [Define if struct core_dumpx has member c_impl])
913 AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
914 ;;
915 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
916 rs6000-*-*) COREFILE=rs6000-core.lo ;;
917 powerpc64-*-aix*) COREFILE=rs6000-core.lo ;;
918 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
919 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
920 powerpc-*-beos*) ;;
921 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
922 COREFILE='' ;;
923 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
924 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
925 s390*-*-*) COREFILE=trad-core.lo ;;
926 sh*-*-netbsd* | sh*-*-openbsd*)
927 COREFILE=netbsd-core.lo
928 ;;
929 sparc-*-netbsd* | sparc*-*-openbsd*)
930 COREFILE=netbsd-core.lo
931 ;;
932 vax-*-netbsd* | vax-*-openbsd*)
933 COREFILE=netbsd-core.lo
934 ;;
935 vax-*-linux-*)
936 COREFILE=trad-core.lo
937 TRAD_HEADER='"hosts/vaxlinux.h"'
938 ;;
939 vax-*-*)
940 COREFILE=trad-core.lo
941 TRAD_HEADER='"hosts/vaxbsd.h"'
942 ;;
943 x86_64-*-linux*)
944 CORE_HEADER='"hosts/x86-64linux.h"'
945 ;;
946 x86_64-*-netbsd* | x86_64-*-openbsd*)
947 COREFILE=netbsd-core.lo
948 ;;
949 esac
950
951 case "$COREFILE" in
952 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
953 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
954 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
955 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
956 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
957 osf-core.lo) COREFLAG=-DOSF_CORE ;;
958 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
959 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
960 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
961 esac
962
963 # ELF corefile support has several flavors, but all of
964 # them use something called <sys/procfs.h>
965 BFD_SYS_PROCFS_H
966 if test "$ac_cv_header_sys_procfs_h" = yes; then
967 BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
968 BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
969 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
970 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
971 BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
972 BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
973 BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
974 BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
975 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
976 BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
977 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
978 BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
979 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
980 BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
981 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
982 BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
983 BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
984 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
985 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
986 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg)
987 BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
988 fi
989 fi
990 AC_SUBST(COREFILE)
991 AC_SUBST(COREFLAG)
992 if test -n "$CORE_HEADER"; then
993 AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
994 [Name of host specific core header file to include in elf.c.])
995 fi
996 if test -n "$TRAD_HEADER"; then
997 AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
998 [Name of host specific header file to include in trad-core.c.])
999 fi
1000
1001 if test "$plugins" = "yes"; then
1002 supports_plugins=1
1003 else
1004 supports_plugins=0
1005 fi
1006 AC_SUBST(supports_plugins)
1007 AC_SUBST(lt_cv_dlopen_libs)
1008
1009 # Determine the host dependent file_ptr a.k.a. off_t type. In order
1010 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
1011 # fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
1012 # Hopefully a reasonable assumption since fseeko et.al. should be
1013 # upward compatible.
1014 AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
1015 AC_CHECK_DECLS([ftello, ftello64, fseeko, fseeko64, fopen64])
1016 if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
1017 AC_CHECK_SIZEOF(off_t)
1018 fi
1019 AC_MSG_CHECKING([file_ptr type])
1020 bfd_file_ptr="long"
1021 bfd_ufile_ptr="unsigned long"
1022 if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
1023 -o x"${ac_cv_sizeof_off_t}" = x8; then
1024 bfd_file_ptr=int64_t
1025 bfd_ufile_ptr=uint64_t
1026 fi
1027 AC_MSG_RESULT($bfd_file_ptr)
1028 AC_SUBST(bfd_file_ptr)
1029 AC_SUBST(bfd_ufile_ptr)
1030
1031 GCC_AC_FUNC_MMAP
1032 AC_CHECK_FUNCS(madvise mprotect)
1033 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
1034 true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
1035 esac
1036
1037 AC_CONFIG_FILES([Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
1038
1039 dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
1040 dnl our two separate POTFILES. Yuck.
1041 AC_CONFIG_COMMANDS([default],
1042 [[
1043 case "$srcdir" in
1044 .) srcdirpre= ;;
1045 *) srcdirpre='$(srcdir)/' ;;
1046 esac
1047 POFILES=
1048 GMOFILES=
1049 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
1050 if test $lang != dummy; then
1051 POFILES="$POFILES $srcdirpre$lang.po"
1052 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1053 fi
1054 done
1055 sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
1056 -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
1057 -e "s,@POFILES@,$POFILES," \
1058 -e "s,@GMOFILES@,$GMOFILES," \
1059 po/Makefile.in > po/Makefile]],[[]])
1060
1061 dnl Required by html, pdf, install-pdf and install-html
1062 AC_SUBST(datarootdir)
1063 AC_SUBST(docdir)
1064 AC_SUBST(htmldir)
1065 AC_SUBST(pdfdir)
1066
1067 AC_OUTPUT
1068
1069 GNU_MAKE_JOBSERVER