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