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