1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
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.
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.
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/>.
20 m4_include([version.m4])
21 AC_INIT([bfd], BFD_VERSION)
22 AC_CONFIG_SRCDIR([libbfd.c])
27 AM_SILENT_RULES([yes])
29 dnl These must be called before LT_INIT, because it may want
30 dnl to call AC_CHECK_PROG.
32 AC_CHECK_TOOL(RANLIB, ranlib, :)
34 dnl Default to a non shared library. This may be overridden by the
35 dnl configure option --enable-shared.
40 AC_USE_SYSTEM_EXTENSIONS
44 # AC_PLUGINS setting $plugins is called by ACX_LARGEFILE.
50 *-*-*aout*| i[3-7]86-*-msdos* | ns32k-*-* | pdp11-*-*)
52 if test "$plugins" = "yes"; then
53 if test "${enable_plugins+set}" = set; then
54 AC_MSG_WARN(Enabling plugins for AOUT is experimental)
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})
70 AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes")
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= ;;
81 if test x$ac_checking != x ; then
82 AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
86 if test $enable_64_bit_bfd = yes ; then
92 AC_ARG_ENABLE(targets,
93 [ --enable-targets alternative target configurations],
94 [case "${enableval}" in
95 yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
97 no) enable_targets= ;;
98 *) enable_targets=$enableval ;;
101 AC_ARG_ENABLE(64_bit_archive,
102 AS_HELP_STRING([--enable-64-bit-archive],
103 [force 64-bit archives]),
104 [case "${enableval}" in
105 yes) want_64_bit_archive=true ;;
106 no) want_64_bit_archive=false ;;
107 *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-archive option) ;;
108 esac],[want_64_bit_archive=unset])dnl
111 [ --with-mmap try using mmap for BFD input files if available],
112 [case "${withval}" in
113 yes) want_mmap=true ;;
114 no) want_mmap=false ;;
115 *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
116 esac],[want_mmap=false])dnl
118 AC_ARG_ENABLE(secureplt,
119 [ --enable-secureplt Default to creating read-only plt entries],
120 [case "${enableval}" in
121 yes) use_secureplt=true ;;
122 no) use_secureplt=false ;;
123 *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;;
124 esac],[use_secureplt=true])dnl
125 if test $use_secureplt = true; then
126 AC_DEFINE(USE_SECUREPLT, 1,
127 [Define if we should default to creating read-only plt entries])
130 # Decide if -z separate-code should be enabled in ELF linker by default.
131 ac_default_ld_z_separate_code=unset
132 AC_ARG_ENABLE(separate-code,
133 AS_HELP_STRING([--enable-separate-code],
134 [enable -z separate-code in ELF linker by default]),
135 [case "${enableval}" in
136 yes) ac_default_ld_z_separate_code=1 ;;
137 no) ac_default_ld_z_separate_code=0 ;;
139 # Enable -z separate-code by default for Linux/x86.
142 i[3-7]86-*-linux-* | x86_64-*-linux-*)
144 if test ${ac_default_ld_z_separate_code} = unset; then
145 ac_default_ld_z_separate_code=1
149 if test "${ac_default_ld_z_separate_code}" = unset; then
150 ac_default_ld_z_separate_code=0
152 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE,
153 $ac_default_ld_z_separate_code,
154 [Define to 1 if you want to enable -z separate-code in ELF linker by default.])
156 AC_ARG_ENABLE(leading-mingw64-underscores,
157 AS_HELP_STRING([--enable-leading-mingw64-underscores],
158 [Enable leading underscores on 64 bit mingw targets]),
160 AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ],
161 [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1,
162 [Define if we should use leading underscore on 64 bit mingw targets])])
164 DEBUGDIR=${libdir}/debug
165 AC_ARG_WITH(separate-debug-dir,
166 AS_HELP_STRING([--with-separate-debug-dir=DIR],
167 [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]),
168 [DEBUGDIR="${withval}"])
171 ACX_PKGVERSION([GNU Binutils])
172 ACX_BUGURL([https://sourceware.org/bugzilla/])
176 AC_CONFIG_HEADERS(config.h:config.in)
179 AH_VERBATIM([00_CONFIG_H_CHECK],
180 [/* Check that config.h is #included before system headers
181 (this works only for glibc, but that should be enough). */
182 #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
183 # error config.h must be #included before system headers
185 #define __CONFIG_H__ 1])
187 if test -z "$target" ; then
188 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
192 AM_CONDITIONAL(GENINSRC_NEVER, false)
198 bfd_default_target_size=32
202 ALL_LINGUAS="da es fi fr hr id ja ro ru rw sr sv tr uk vi zh_CN pt"
203 ZW_GNU_GETTEXT_SISTER_DIR
206 # Permit host specific settings.
207 . ${srcdir}/configure.host
212 AC_CHECK_SIZEOF(long long)
213 AC_CHECK_SIZEOF(void *)
214 AC_CHECK_SIZEOF(long)
217 if test "x${ac_cv_sizeof_void_p}" = "x8"; then
223 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/resource.h sys/stat.h sys/types.h \
226 AC_CHECK_FUNCS(fcntl fdopen fileno fls getgid getpagesize getrlimit getuid \
229 AC_CHECK_DECLS([basename, ffs, stpcpy, asprintf, vasprintf, strnlen])
230 AC_CHECK_DECLS([___lc_codepage_func], [], [], [[#include <locale.h>]])
234 # Link in zlib/zstd if we can. This allows us to read compressed debug sections.
235 # This is used only by compress.c.
239 save_CFLAGS="$CFLAGS"
240 CFLAGS="$CFLAGS -Werror"
241 AC_CACHE_CHECK([compiler support for hidden visibility], bfd_cv_hidden,
242 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
243 const char hw[] __attribute__ ((__visibility__ ("hidden"))) = "Hello, World\n";
244 extern void print (const char *) __attribute__ ((__visibility__ ("hidden")));]],
246 [bfd_cv_hidden=yes], [bfd_cv_hidden=no])])
247 CFLAGS="$save_CFLAGS"
248 if test $bfd_cv_hidden = yes; then
249 AC_DEFINE(HAVE_HIDDEN, 1,
250 [Define if your compiler supports hidden visibility.])
253 # Check if linker supports --as-needed and --no-as-needed options
254 AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
255 [bfd_cv_ld_as_needed=no
256 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
257 bfd_cv_ld_as_needed=yes
263 # When building a shared libbfd, link against the pic version of libiberty
264 # so that apps that use libbfd won't need libiberty just to satisfy any
266 # We can't do that if a pic libiberty is unavailable since including non-pic
267 # code would insert text relocations into libbfd.
270 if test "$enable_shared" = "yes"; then
272 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
274 if test -n "$x"; then
275 SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
279 SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
281 if test "$enable_shared" = "yes"; then
283 # More hacks to build DLLs on Windows.
285 SHARED_LDFLAGS="-no-undefined"
286 SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32"
290 if test -n "$SHARED_LIBADD"; then
291 if test -n "$LIBM"; then
292 if test x"$bfd_cv_ld_as_needed" = xyes; then
293 # Link against libm only when needed. Put -lc, -lm inside -Wl
294 # to stop libtool reordering these options.
295 SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed"
297 SHARED_LIBADD="$SHARED_LIBADD $LIBM"
302 AC_SUBST(SHARED_LDFLAGS)
303 AC_SUBST(SHARED_LIBADD)
307 # Canonicalize the secondary target names.
308 if test -n "$enable_targets" ; then
309 for targ in `echo $enable_targets | sed 's/,/ /g'`
311 result=`$ac_config_sub $targ 2>/dev/null`
312 if test -n "$result" ; then
313 canon_targets="$canon_targets $result"
315 # Allow targets that config.sub doesn't recognize, like "all".
316 canon_targets="$canon_targets $targ"
327 for targ in $target $canon_targets
329 if test $targ = all; then
331 assocvecs="$assocvecs $targ_defvec $targ_selvecs"
332 elif test $targ != plugin; then
334 if test $targ = $target; then
337 selvecs="$selvecs $targ_defvec $targ_selvecs"
338 selarchs="$selarchs $targ_archs"
339 TDEFINES="$TDEFINES $targ_cflags"
344 # This processing still needs to be done if we're to decide properly whether
345 # 64-bit support needs to be compiled in. Currently, it will be included if
346 # the default or any other explicitly requested target requires it; it
347 # will not be included on a 32-bit host if no 64-bit target is requested, and
348 # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
351 # uniq the default and selected vectors in all the configured targets.
353 for i in $selvecs ; do
362 # uniq the associated vectors in all the configured targets.
364 for i in $assocvecs ; do
373 # uniq the architectures in all the configured targets.
375 for i in $selarchs ; do
383 # Target backend .o files.
386 elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo
387 elf-sframe.lo dwarf1.lo dwarf2.lo"
388 coffgen="coffgen.lo dwarf2.lo"
389 coff="cofflink.lo $coffgen"
390 ecoff="ecofflink.lo $coffgen"
391 xcoff="xcofflink.lo $coffgen"
393 elfxx_x86="elfxx-x86.lo elf-ifunc.lo elf-vxworks.lo"
398 # This list is alphabetized to make it easy to compare
399 # with the two vector lists in targets.c. For the same reason,
400 # use one entry per line, even though this leads to long lines.
401 aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
402 aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
403 aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
404 aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
405 aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
406 aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
407 aarch64_mach_o_vec) tb="$tb mach-o-aarch64.lo"; target_size=64 ;;
408 aarch64_pei_le_vec) tb="$tb pei-aarch64.lo pe-aarch64igen.lo $coff"; target_size=64 ;;
409 aarch64_pe_le_vec) tb="$tb pe-aarch64.lo pe-aarch64igen.lo $coff"; target_size=64 ;;
410 alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
411 alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
412 alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
413 alpha_vms_vec) tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;;
414 alpha_vms_lib_txt_vec) tb="$tb vms-lib.lo vms-misc.lo" ;;
415 am33_elf32_linux_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
416 amdgcn_elf64_le_vec) tb="$tb elf64-amdgcn.lo elf64.lo $elf"; target_size=64 ;;
417 aout0_be_vec) tb="$tb aout0.lo aout32.lo" ;;
418 aout64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
419 aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
420 arc_elf32_be_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
421 arc_elf32_le_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
422 arm_elf32_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
423 arm_elf32_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
424 arm_elf32_fdpic_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
425 arm_elf32_fdpic_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
426 arm_elf32_nacl_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
427 arm_elf32_nacl_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
428 arm_elf32_vxworks_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
429 arm_elf32_vxworks_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
430 arm_pe_be_vec) tb="$tb pe-arm.lo peigen.lo $coff" ;;
431 arm_pe_le_vec) tb="$tb pe-arm.lo peigen.lo $coff" ;;
432 arm_pe_wince_be_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
433 arm_pe_wince_le_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
434 arm_pei_be_vec) tb="$tb pei-arm.lo peigen.lo $coff" ;;
435 arm_pei_le_vec) tb="$tb pei-arm.lo peigen.lo $coff" ;;
436 arm_pei_wince_be_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
437 arm_pei_wince_le_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
438 arm_mach_o_vec) tb="$tb mach-o-arm.lo" ;;
439 avr_elf32_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
440 bfin_elf32_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
441 bfin_elf32_fdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
442 cr16_elf32_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
443 cris_aout_vec) tb="$tb aout-cris.lo" ;;
444 cris_elf32_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
445 cris_elf32_us_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
446 crx_elf32_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
447 csky_elf32_be_vec) tb="$tb elf32-csky.lo elf32.lo $elf" ;;
448 csky_elf32_le_vec) tb="$tb elf32-csky.lo elf32.lo $elf" ;;
449 d10v_elf32_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
450 d30v_elf32_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
451 dlx_elf32_be_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
452 elf32_be_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
453 elf32_le_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
454 elf64_be_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
455 elf64_le_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
456 bpf_elf64_le_vec) tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64;;
457 bpf_elf64_be_vec) tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64 ;;
458 epiphany_elf32_vec) tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
459 fr30_elf32_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
460 frv_elf32_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
461 frv_elf32_fdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
462 h8300_elf32_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
463 h8300_elf32_linux_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
464 hppa_elf32_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
465 hppa_elf32_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
466 hppa_elf32_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
467 hppa_elf64_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
468 hppa_elf64_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
469 hppa_som_vec) tb="$tb som.lo" ;;
470 i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
471 i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
472 i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
473 i386_coff_vec) tb="$tb coff-i386.lo $coff" ;;
474 i386_coff_go32_vec) tb="$tb coff-go32.lo $coff" ;;
475 i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo $coff" ;;
476 i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;;
477 i386_elf32_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
478 i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
479 i386_elf32_sol2_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
480 i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
481 i386_mach_o_vec) tb="$tb mach-o-i386.lo" ;;
482 i386_msdos_vec) tb="$tb i386msdos.lo" ;;
483 i386_pe_vec) tb="$tb pe-i386.lo peigen.lo $coff" ;;
484 i386_pe_big_vec) tb="$tb pe-i386.lo peigen.lo $coff" ;;
485 i386_pei_vec) tb="$tb pei-i386.lo peigen.lo $coff" ;;
486 iamcu_elf32_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
487 ia64_elf32_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
488 ia64_elf32_hpux_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
489 ia64_elf64_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
490 ia64_elf64_le_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
491 ia64_elf64_hpux_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
492 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 ;;
493 ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;;
494 ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
495 iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
496 lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
497 lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
498 loongarch_elf32_vec) tb="$tb elf32-loongarch.lo elfxx-loongarch.lo elf32.lo elf-ifunc.lo $elf" ;;
499 loongarch_elf64_vec) tb="$tb elf64-loongarch.lo elf64.lo elfxx-loongarch.lo elf32.lo elf-ifunc.lo $elf"; target_size=64 ;;
500 loongarch64_pei_vec) tb="$tb pei-loongarch64.lo pe-loongarch64igen.lo $coff"; target_size=64 ;;
501 m32c_elf32_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
502 m32r_elf32_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
503 m32r_elf32_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
504 m32r_elf32_linux_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
505 m32r_elf32_linux_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
506 m68hc11_elf32_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
507 m68hc12_elf32_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
508 m68k_elf32_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
509 s12z_elf32_vec) tb="$tb elf32-s12z.lo elf32.lo $elf" ;;
510 mach_o_be_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
511 mach_o_le_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
512 mach_o_fat_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
513 mcore_elf32_be_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
514 mcore_elf32_le_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
515 mcore_pe_be_vec) tb="$tb pe-mcore.lo peigen.lo $coff" ;;
516 mcore_pe_le_vec) tb="$tb pe-mcore.lo peigen.lo $coff" ;;
517 mcore_pei_be_vec) tb="$tb pei-mcore.lo peigen.lo $coff" ;;
518 mcore_pei_le_vec) tb="$tb pei-mcore.lo peigen.lo $coff" ;;
519 mep_elf32_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
520 mep_elf32_le_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
521 metag_elf32_vec) tb="$tb elf32-metag.lo elf32.lo $elf" ;;
522 microblaze_elf32_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
523 microblaze_elf32_le_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
524 mips_ecoff_be_vec) tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
525 mips_ecoff_le_vec) tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
526 mips_ecoff_bele_vec) tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
527 mips_elf32_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
528 mips_elf32_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
529 mips_elf32_n_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
530 mips_elf32_n_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
531 mips_elf32_ntrad_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
532 mips_elf32_ntrad_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
533 mips_elf32_ntradfbsd_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
534 mips_elf32_ntradfbsd_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
535 mips_elf32_trad_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
536 mips_elf32_trad_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
537 mips_elf32_tradfbsd_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
538 mips_elf32_tradfbsd_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
539 mips_elf32_vxworks_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
540 mips_elf32_vxworks_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
541 mips_elf64_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
542 mips_elf64_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
543 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 ;;
544 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 ;;
545 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 ;;
546 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 ;;
547 mmix_elf64_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
548 mmix_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
549 mn10200_elf32_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
550 mn10300_elf32_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
551 moxie_elf32_be_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
552 moxie_elf32_le_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
553 msp430_elf32_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
554 msp430_elf32_ti_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
555 mt_elf32_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
556 nds32_elf32_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
557 nds32_elf32_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
558 nds32_elf32_linux_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
559 nds32_elf32_linux_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
560 nfp_elf64_vec) tb="$tb elf64-nfp.lo elf64.lo $elf" ;;
561 nios2_elf32_be_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
562 nios2_elf32_le_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
563 ns32k_aout_pc532mach_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
564 ns32k_aout_pc532nbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
565 or1k_elf32_vec) tb="$tb elf32-or1k.lo elf32.lo $elf" ;;
566 pdb_vec) tb="$tb pdb.lo" ;;
567 pdp11_aout_vec) tb="$tb pdp11.lo" ;;
568 pef_vec) tb="$tb pef.lo" ;;
569 pef_xlib_vec) tb="$tb pef.lo" ;;
570 pj_elf32_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;;
571 pj_elf32_le_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;;
572 powerpc_boot_vec) tb="$tb ppcboot.lo" ;;
573 powerpc_elf32_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
574 powerpc_elf32_le_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
575 powerpc_elf32_fbsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
576 powerpc_elf32_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
577 powerpc_elf64_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
578 powerpc_elf64_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
579 powerpc_elf64_fbsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
580 powerpc_elf64_fbsd_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
581 powerpc_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
582 pru_elf32_vec) tb="$tb elf32-pru.lo elf32.lo $elf" ;;
583 riscv_elf32_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf" ;;
584 riscv_elf64_vec) tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
585 riscv_elf32_be_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf" ;;
586 riscv_elf64_be_vec) tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
587 rl78_elf32_vec) tb="$tb elf32-rl78.lo elf32.lo $elf" ;;
588 rs6000_xcoff64_vec) tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
589 rs6000_xcoff64_aix_vec) tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
590 rs6000_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
591 rx_elf32_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
592 rx_elf32_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
593 rx_elf32_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
594 rx_elf32_linux_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
595 s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
596 s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
597 score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;;
598 score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;;
599 sh_coff_vec) tb="$tb coff-sh.lo $coff" ;;
600 sh_coff_le_vec) tb="$tb coff-sh.lo $coff" ;;
601 sh_coff_small_vec) tb="$tb coff-sh.lo $coff" ;;
602 sh_coff_small_le_vec) tb="$tb coff-sh.lo $coff" ;;
603 sh_elf32_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
604 sh_elf32_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
605 sh_elf32_fdpic_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
606 sh_elf32_fdpic_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
607 sh_elf32_linux_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
608 sh_elf32_linux_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
609 sh_elf32_nbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
610 sh_elf32_nbsd_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
611 sh_elf32_vxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
612 sh_elf32_vxworks_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
613 sh_pe_le_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo $coff" ;;
614 sh_pei_le_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo $coff" ;;
615 sparc_elf32_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
616 sparc_elf32_sol2_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
617 sparc_elf32_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
618 sparc_elf64_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
619 sparc_elf64_fbsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
620 sparc_elf64_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
621 spu_elf32_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
622 sym_vec) tb="$tb xsym.lo" ;;
623 tic30_coff_vec) tb="$tb coff-tic30.lo $coffgen" ;;
624 tic4x_coff0_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
625 tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
626 tic4x_coff1_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
627 tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
628 tic4x_coff2_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
629 tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
630 tic54x_coff0_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
631 tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
632 tic54x_coff1_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
633 tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
634 tic54x_coff2_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
635 tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
636 tic6x_elf32_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
637 tic6x_elf32_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
638 tic6x_elf32_c6000_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
639 tic6x_elf32_c6000_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
640 tic6x_elf32_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
641 tic6x_elf32_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
642 tilegx_elf32_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
643 tilegx_elf32_le_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
644 tilegx_elf64_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
645 tilegx_elf64_le_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
646 tilepro_elf32_vec) tb="$tb elf32-tilepro.lo elf32.lo $elf" ;;
647 v800_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
648 v850_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
649 vax_aout_1knbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
650 vax_aout_nbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
651 vax_elf32_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
652 ft32_elf32_vec) tb="$tb elf32-ft32.lo elf32.lo $elf" ;;
653 visium_elf32_vec) tb="$tb elf32-visium.lo elf32.lo $elf" ;;
654 wasm_vec) tb="$tb wasm-module.lo" ;;
655 wasm32_elf32_vec) tb="$tb elf32-wasm32.lo elf32.lo $elf" ;;
656 x86_64_coff_vec) tb="$tb coff-x86_64.lo $coff"; target_size=64 ;;
657 x86_64_elf32_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo elf32.lo $elf"; target_size=64 ;;
658 x86_64_elf64_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
659 x86_64_elf64_cloudabi_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
660 x86_64_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
661 x86_64_elf64_sol2_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
662 x86_64_mach_o_vec) tb="$tb mach-o-x86-64.lo" ;;
663 x86_64_pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
664 x86_64_pe_big_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
665 x86_64_pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
666 xgate_elf32_vec) tb="$tb elf32-xgate.lo elf32.lo $elf" ;;
667 xstormy16_elf32_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
668 xtensa_elf32_be_vec) tb="$tb xtensa-dynconfig.lo xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
669 xtensa_elf32_le_vec) tb="$tb xtensa-dynconfig.lo xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
670 z80_coff_vec) tb="$tb coff-z80.lo reloc16.lo $coffgen" ;;
671 z80_elf32_vec) tb="$tb elf32-z80.lo elf32.lo $elf" ;;
672 z8k_coff_vec) tb="$tb coff-z8k.lo reloc16.lo $coff" ;;
674 # These appear out of order in targets.c
675 srec_vec) tb="$tb srec.lo" ;;
676 symbolsrec_vec) tb="$tb srec.lo" ;;
677 tekhex_vec) tb="$tb tekhex.lo" ;;
678 core_cisco_be_vec) tb="$tb cisco-core.lo" ;;
679 core_cisco_le_vec) tb="$tb cisco-core.lo" ;;
682 *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
685 if test ${target_size} = 64; then
688 if test x"${vec}" = x"${defvec}"; then
689 bfd_default_target_size=${target_size}
693 if test "$plugins" = "yes"; then
697 # Target architecture .o files.
698 # A couple of CPUs use shorter file names to avoid problems on DOS
700 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
702 # Weed out duplicate .o files.
724 if test x${all_targets} = xtrue ; then
725 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
726 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
728 havevecs=-DHAVE_all_vecs
730 test -n "$assocvecs" &&
731 assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
732 else # all_targets is true
733 # Only set these if they will be nonempty, for the clever echo.
736 test -n "$selvecs" &&
737 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
738 test -n "$selvecs" &&
739 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
740 test -n "$selarchs" &&
741 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
742 fi # all_targets is true
744 # 64-bit archives need a 64-bit bfd_vma.
745 if test "x$want_64_bit_archive" = xtrue; then
747 AC_DEFINE(USE_64_BIT_ARCHIVE, 1,
748 [Define if 64-bit archives should always be used.])
751 case ${host64}-${target64}-${want64} in
754 bfd64_libs='$(BFD64_LIBS)'
755 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
756 if test -n "$GCC" ; then
758 AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
759 # Add more tests for gcc versions with non-working 64-bit support here.
760 AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
762 AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
764 if test $bad_64bit_gcc = yes ; then
765 AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
771 all_backends='$(BFD32_BACKENDS)'
776 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
777 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
778 test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
779 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
783 AC_SUBST(all_backends)
784 AC_SUBST(bfd_backends)
785 AC_SUBST(bfd_machines)
786 AC_SUBST(bfd_default_target_size)
790 # If we are configured native, pick a core file support file.
795 if test "${target}" = "${host}"; then
797 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
801 COREFILE=trad-core.lo
802 TRAD_HEADER='"hosts/alphalinux.h"'
804 alpha*-*-netbsd* | alpha*-*-openbsd*)
805 COREFILE=netbsd-core.lo
810 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
812 arm*-*-netbsd* | arm-*-openbsd*)
813 COREFILE=netbsd-core.lo
815 arm-*-riscix) COREFILE=trad-core.lo ;;
816 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
817 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
818 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
819 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
820 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
821 hppa*-*-netbsd* | hppa*-*-openbsd*)
822 COREFILE=netbsd-core.lo
826 i[3-7]86-sequent-bsd*)
828 COREFILE=trad-core.lo
829 TRAD_HEADER='"hosts/symmetry.h"'
832 i[3-7]86-sequent-sysv4*) ;;
833 i[3-7]86-sequent-sysv*)
835 COREFILE=trad-core.lo
836 TRAD_HEADER='"hosts/symmetry.h"'
844 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*)
846 COREFILE=trad-core.lo
847 TRAD_HEADER='"hosts/i386bsd.h"'
850 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
853 TRAD_HEADER='"hosts/i386bsd.h"'
856 i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
858 COREFILE=netbsd-core.lo
861 i[3-7]86-esix-sysv3*)
863 COREFILE=trad-core.lo
864 TRAD_HEADER='"hosts/esix.h"'
867 i[3-7]86-*-sco3.2v5*)
869 COREFILE=sco5-core.lo
872 i[3-7]86-*-sco* | i[3-7]86-*-isc*)
874 COREFILE=trad-core.lo
875 TRAD_HEADER='"hosts/i386sco.h"'
880 COREFILE=trad-core.lo
881 TRAD_HEADER='"hosts/i386mach3.h"'
886 COREFILE=trad-core.lo
887 TRAD_HEADER='"hosts/i386linux.h"'
888 case "$enable_targets"-"$want64" in
889 *x86_64-*linux*|*-true)
890 CORE_HEADER='"hosts/x86-64linux.h"'
894 i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
895 i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;;
897 mips*-*-netbsd* | mips*-*-openbsd*)
898 COREFILE=netbsd-core.lo
900 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
901 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
902 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
904 COREFILE=trad-core.lo
905 TRAD_HEADER='"hosts/m68klinux.h"'
908 COREFILE=netbsd-core.lo
911 COREFILE=trad-core.lo
912 TRAD_HEADER='"hosts/pc532mach.h"'
914 ns32k-*-netbsd* | ns32k-*-openbsd*)
915 COREFILE=netbsd-core.lo
918 COREFILE=lynx-core.lo
921 rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].* | powerpc64-*-aix[5-9].*)
923 COREFILE=rs6000-core.lo
924 COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
927 rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
929 COREFILE=rs6000-core.lo
930 COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
931 # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
932 # have c_impl as a member of struct core_dumpx
933 AC_MSG_CHECKING([for c_impl in struct core_dumpx])
934 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
935 [Define if struct core_dumpx has member c_impl])
936 AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
938 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
939 rs6000-*-*) COREFILE=rs6000-core.lo ;;
940 powerpc64-*-aix*) COREFILE=rs6000-core.lo ;;
941 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
942 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
944 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
946 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
947 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
948 s390*-*-*) COREFILE=trad-core.lo ;;
949 sh*-*-netbsd* | sh*-*-openbsd*)
950 COREFILE=netbsd-core.lo
952 sparc-*-netbsd* | sparc*-*-openbsd*)
953 COREFILE=netbsd-core.lo
955 vax-*-netbsd* | vax-*-openbsd*)
956 COREFILE=netbsd-core.lo
959 COREFILE=trad-core.lo
960 TRAD_HEADER='"hosts/vaxult2.h"'
963 COREFILE=trad-core.lo
964 TRAD_HEADER='"hosts/vaxult2.h"'
967 COREFILE=trad-core.lo
968 TRAD_HEADER='"hosts/vaxlinux.h"'
971 COREFILE=trad-core.lo
972 TRAD_HEADER='"hosts/vaxbsd.h"'
975 CORE_HEADER='"hosts/x86-64linux.h"'
977 x86_64-*-netbsd* | x86_64-*-openbsd*)
978 COREFILE=netbsd-core.lo
983 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
984 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
985 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
986 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
987 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
988 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
989 osf-core.lo) COREFLAG=-DOSF_CORE ;;
990 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
991 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
992 sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
993 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
996 # ELF corefile support has several flavors, but all of
997 # them use something called <sys/procfs.h>
999 if test "$ac_cv_header_sys_procfs_h" = yes; then
1000 BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
1001 BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
1002 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
1003 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
1004 BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
1005 BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
1006 BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
1007 BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
1008 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
1009 BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
1010 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
1011 BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
1012 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
1013 BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
1014 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
1015 BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
1016 BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
1017 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
1018 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
1019 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg)
1020 BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
1025 if test -n "$CORE_HEADER"; then
1026 AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
1027 [Name of host specific core header file to include in elf.c.])
1029 if test -n "$TRAD_HEADER"; then
1030 AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
1031 [Name of host specific header file to include in trad-core.c.])
1034 if test "$plugins" = "yes"; then
1039 AC_SUBST(supports_plugins)
1040 AC_SUBST(lt_cv_dlopen_libs)
1042 # Determine the host dependent file_ptr a.k.a. off_t type. In order
1043 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
1044 # fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
1045 # Hopefully a reasonable assumption since fseeko et.al. should be
1046 # upward compatible.
1047 AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
1048 AC_CHECK_DECLS([ftello, ftello64, fseeko, fseeko64, fopen64])
1049 if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
1050 AC_CHECK_SIZEOF(off_t)
1052 AC_MSG_CHECKING([file_ptr type])
1054 bfd_ufile_ptr="unsigned long"
1055 if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
1056 -o x"${ac_cv_sizeof_off_t}" = x8; then
1057 bfd_file_ptr=int64_t
1058 bfd_ufile_ptr=uint64_t
1060 AC_MSG_RESULT($bfd_file_ptr)
1061 AC_SUBST(bfd_file_ptr)
1062 AC_SUBST(bfd_ufile_ptr)
1065 AC_CHECK_FUNCS(madvise mprotect)
1066 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
1067 true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
1070 AC_CONFIG_FILES([Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
1072 dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
1073 dnl our two separate POTFILES. Yuck.
1074 AC_CONFIG_COMMANDS([default],
1078 *) srcdirpre='$(srcdir)/' ;;
1082 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
1083 if test $lang != dummy; then
1084 POFILES="$POFILES $srcdirpre$lang.po"
1085 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1088 sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
1089 -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
1090 -e "s,@POFILES@,$POFILES," \
1091 -e "s,@GMOFILES@,$GMOFILES," \
1092 po/Makefile.in > po/Makefile]],[[]])
1094 dnl Required by html, pdf, install-pdf and install-html
1095 AC_SUBST(datarootdir)