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