diff -up -r --new-file binutils-2.9.5.0.22/ChangeLog binutils-2.9.5.0.24/ChangeLog --- binutils-2.9.5.0.22/ChangeLog Mon Sep 6 10:14:08 1999 +++ binutils-2.9.5.0.24/ChangeLog Thu Jan 13 11:35:35 2000 @@ -1,3 +1,8 @@ +2000-01-06 Geoff Keating + + * configure.in: Use mt-aix43 to handle *_TARGET defs, + not mh-aix43. + 1999-09-04 Steve Chamberlain * config.sub: Add support for configuring for pj. diff -up -r --new-file binutils-2.9.5.0.22/ChangeLog.linux binutils-2.9.5.0.24/ChangeLog.linux --- binutils-2.9.5.0.22/ChangeLog.linux Sun Oct 10 12:21:17 1999 +++ binutils-2.9.5.0.24/ChangeLog.linux Thu Jan 13 13:42:07 2000 @@ -1,3 +1,11 @@ +Thu Jan 13 13:42:01 2000 H.J. Lu + + * binutils.spec.in: Change the tarfile from .bz2 to .gz. + +Thu Jan 13 13:28:11 2000 H.J. Lu + + * binutils.spec.in: New. + Sun Oct 10 10:36:31 1999 H.J. Lu * ltconfig: Undo the change on Sat Jun 5 17:56:55 1999. diff -up -r --new-file binutils-2.9.5.0.22/bfd/ChangeLog binutils-2.9.5.0.24/bfd/ChangeLog --- binutils-2.9.5.0.22/bfd/ChangeLog Thu Dec 2 08:43:50 1999 +++ binutils-2.9.5.0.24/bfd/ChangeLog Thu Jan 13 11:35:36 2000 @@ -1,3 +1,162 @@ +2000-01-10 Philip Blundell + + * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu. + (arm*-*-conix*): New target. + +2000-01-10 Egor Duda + + * config.bfd: Include elf32_i386 vector to target list for cygwin + and mingw. + + * config.in: Undefine HAVE_WIN32_PSTATUS_T. + * configure.in: Test for structure win32_pstatus_t in + + * configure: Regenerate. + + * elf.c (elfcore_grok_win32pstatus): New function: process + win32_pstatus_t notes in elf core file. + (elfcore_grok_note): Detect win32_pstatus notes. + +2000-01-03 Martin v. Loewis + + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol + visibility. + * elflink.h (elf_link_add_object_symbols): Combine visibilities. + * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility. + +1999-12-29 Richard Henderson + + * elflink.h (bfd_elf,size_dynamic_sections): Don't export all + if no dynamic sections created. + +1999-12-27 Nick Clifton + + * peicode.h (pe_bfd_object_p): Only define for PE format + targets. + +1999-12-17 Nick Clifton + + * coff-i386.c (i3coff_object_p): Delete. + (i386coff_vec): Replace reference to i3coff_object_p with a + reference to coff_object_p. + + * coff-mcore.c (pe_object_p): Delete. + + * peicode.h (pe_bfd_object_p): New function: Detect the + presence of a PE format COFF object file. Also detect and + warn about the presence of LINK6 format Image Library Format + object files. + +1999-12-16 Nick Clifton + + * coff-arm.c (NUM_ELEM): New macro. + (NUM_RELOCS): New macro: The number of known ARM relocs. + (RTYPE2HOWTO): Return NULL if the reloc type is out of range. + (coff_arm_rtype_to_howto): Return NULL if the reloc type is out + of range. + (bfd_arm_process_before_allocation): Produce a warning message if + an out of range symbol index is encountered. + +1999-12-14 Nick Clifton + + * elflink.h (is_global_symbol_definition): New Function: Return + true iff the symbol is being given a global definition in this + bfd. + (elf_link_is_defined_archive_symbol): Do not bother processing + symbols for an archive element that has already been included + in the link. + Use is_global_symbol_definition(). + +1999-12-09 Andrew Cagney + + * config.bfd: Add support for sparc-*-netbsdelf* and + sparc-*-netbsdaout*. + +1999-12-13 Nick Clifton + + * elflink.h (elf_link_is_defined_archive_symbol): Check to see + if the symbol is in the common section. + +1999-12-10 Nick Clifton + + * elflink.h (elf_link_is_defined_archive_symbol): New + function: Decide if a symbol, in an archive map is there + because it is defined in the archive element, or because it is + just another common declaration of it. + (elf_link_add_archive_symbols): Use + elf_link_is_defined_archive_symbol to decide if an archive + element contain a reference to a common symbol should be + linked in or not. + +1999-12-10 Nick Clifton + + * elflink.h: Revert previous patch. + * targets.c: Revert previous patch. + * libbfd-in2.h: Revert previous patch. + * libbfd.h: Revert previous patch. + * elfxx-target.h: Revert previous patch. + * archive.c: Revert previous patch. + * aout-target.h: Revert previous patch. + * aout-tic30.h: Revert previous patch. + * bfd.c: Revert previous patch. + * coff-alpha.c: Revert previous patch. + * coff-rs6000.c: Revert previous patch. + * elf64-mips.c: Revert previous patch. + * ieee.c: Revert previous patch. + * libecoff.h: Revert previous patch. + * oasys.c: Revert previous patch. + * som.c: Revert previous patch. + * vms.c: Revert previous patch. + +1999-12-09 Nick Clifton + + * elflink.h (elf_link_add_archive_symbols): Add an archive + element even if contains a symbol which is currently only + considered to be a common. + + * targets.c (struct bfd_target): Add new field + _bfd_allow_commons_in_armap. + * bfd-in2.h:Regenerate. + + * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap): + Define. + (_bfd_archive_bsd_allow_commons_in_armap): Define. + * libbfd.h: Regenerate. + + * elfxx-target.h: If using COFF archive map, override + definition of allow_commons_in_armap and replace with + bfd_false. + + * archive.c (bfd_compute_and_write_armap): Do not place common + symbols into the archive map unless _bfd_allow_commons_in_armap + returns true. + + * aout-target.h (MY_allow_commons_in_armap): Define. + * aout-tic30.h (MY_allow_commons_in_armap): Define. + * bfd.c (bfd_allow_commons_in_armap): Define. + * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define. + * coff-rs6000.h (xcoff_allow_commons_in_armap): Define. + * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define. + * ieee.c (ieee_ecoff_allow_commons_in_armap): Define. + * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define. + * oasys.c (oasys_allow_commons_in_armap): Define. + * som.c (som_allow_commons_in_armap): Define. + * vms.c (vms_allow_commons_in_armap): Define. + +1999-12-07 Jim Blandy + + Add support for SSE registers in ELF core files. + * elf.c (elfcore_make_note_pseudosection): New function. + (elfcore_grok_prfpreg): Use it. + (elfcore_grok_prxfpreg): New function. + (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes. + +1999-12-03 Ian Lance Taylor + + * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16 + value by 4 before storing it back in the field. From + Koundinya. K . + Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com) * archures.c (bfd_mach_am33): Define. diff -up -r --new-file binutils-2.9.5.0.22/bfd/ChangeLog.linux binutils-2.9.5.0.24/bfd/ChangeLog.linux --- binutils-2.9.5.0.22/bfd/ChangeLog.linux Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.24/bfd/ChangeLog.linux Thu Jan 13 13:30:19 2000 @@ -1,3 +1,19 @@ +Thu Jan 13 13:29:40 2000 H.J. Lu + + * configure.in (AC_OUTPUT): Add ../binutils.spec. + * configure: Regenerated. + +Thu Jan 13 12:40:59 2000 H.J. Lu + + * elflink.h (elf_link_add_object_symbols): Back out the change + below. Don't add a second ELF_VER_CHR if sym.st_shndx is + SHN_UNDEF. + +Thu Jan 13 11:03:29 2000 H.J. Lu + + * elflink.h (elf_link_add_object_symbols): Bound the external + references to the default version to the hidden version. + Mon Nov 29 17:07:38 1999 H.J. Lu * config.bfd (targmatch.h): Enable som_vec only. diff -up -r --new-file binutils-2.9.5.0.22/bfd/coff-arm.c binutils-2.9.5.0.24/bfd/coff-arm.c --- binutils-2.9.5.0.22/bfd/coff-arm.c Thu Dec 2 08:43:54 1999 +++ binutils-2.9.5.0.24/bfd/coff-arm.c Thu Jan 13 11:35:37 2000 @@ -47,6 +47,10 @@ Foundation, Inc., 59 Temple Place - Suit #define SET_INTERWORK_FLAG( abfd, flg ) (coff_data (abfd)->flags = \ (coff_data (abfd)->flags & ~ F_INTERWORK) \ | (flg | F_INTERWORK_SET)) + +#ifndef NUM_ELEM +#define NUM_ELEM(a) ((sizeof (a)) / sizeof ((a)[0])) +#endif typedef enum {bunknown, b9, b12, b23} thumb_pcrel_branchtype; /* some typedefs for holding instructions */ @@ -402,6 +406,8 @@ static reloc_howto_type aoutarm_std_relo PCRELOFFSET), }; +#define NUM_RELOCS NUM_ELEM (aoutarm_std_reloc_howto) + #ifdef COFF_WITH_PE /* Return true if this relocation should appear in the output .reloc section. */ @@ -415,9 +421,11 @@ in_reloc_p (abfd, howto) } #endif - -#define RTYPE2HOWTO(cache_ptr, dst) \ - (cache_ptr)->howto = aoutarm_std_reloc_howto + (dst)->r_type; +#define RTYPE2HOWTO(cache_ptr, dst) \ + (cache_ptr)->howto = \ + (dst)->r_type < NUM_RELOCS \ + ? aoutarm_std_reloc_howto + (dst)->r_type \ + : NULL #define coff_rtype_to_howto coff_arm_rtype_to_howto @@ -430,17 +438,17 @@ coff_arm_rtype_to_howto (abfd, sec, rel, struct internal_syment *sym ATTRIBUTE_UNUSED; bfd_vma *addendp; { - reloc_howto_type *howto; + reloc_howto_type * howto; + if (rel->r_type >= NUM_RELOCS) + return NULL; + howto = aoutarm_std_reloc_howto + rel->r_type; if (rel->r_type == ARM_RVA32) - { - *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase; - } + *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase; return howto; - } /* Used by the assembler. */ @@ -698,7 +706,8 @@ coff_arm_reloc_type_lookup (abfd, code) bfd * abfd; bfd_reloc_code_real_type code; { -#define ASTD(i,j) case i: return &aoutarm_std_reloc_howto[j] +#define ASTD(i,j) case i: return aoutarm_std_reloc_howto + j + if (code == BFD_RELOC_CTOR) switch (bfd_get_arch_info (abfd)->bits_per_address) { @@ -1900,7 +1909,7 @@ bfd_arm_process_before_allocation (abfd, for (rel = i; rel < i + sec->reloc_count; ++rel) { unsigned short r_type = rel->r_type; - long symndx; + unsigned long symndx; struct coff_link_hash_entry * h; symndx = rel->r_symndx; @@ -1909,6 +1918,13 @@ bfd_arm_process_before_allocation (abfd, if (symndx == -1) continue; + if (symndx >= obj_conv_table_size (abfd)) + { + _bfd_error_handler (_("%s: illegal symbol index in reloc: %d"), + bfd_get_filename (abfd), symndx); + continue; + } + h = obj_coff_sym_hashes (abfd)[symndx]; /* If the relocation is against a static symbol it must be within diff -up -r --new-file binutils-2.9.5.0.22/bfd/coff-i386.c binutils-2.9.5.0.24/bfd/coff-i386.c --- binutils-2.9.5.0.22/bfd/coff-i386.c Wed Sep 22 14:50:05 1999 +++ binutils-2.9.5.0.24/bfd/coff-i386.c Thu Jan 13 11:35:37 2000 @@ -535,69 +535,6 @@ coff_i386_is_local_label_name (abfd, nam #include "coffcode.h" -static const bfd_target * -i3coff_object_p (abfd) - bfd *abfd; -{ -#ifdef COFF_IMAGE_WITH_PE - /* We need to hack badly to handle a PE image correctly. In PE - images created by the GNU linker, the offset to the COFF header - is always the size. However, this is not the case in images - generated by other PE linkers. The PE format stores a four byte - offset to the PE signature just before the COFF header at - location 0x3c of the file. We pick up that offset, verify that - the PE signature is there, and then set ourselves up to read in - the COFF header. */ - { - bfd_byte ext_offset[4]; - file_ptr offset; - bfd_byte ext_signature[4]; - unsigned long signature; - - if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0 - || bfd_read (ext_offset, 1, 4, abfd) != 4) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - offset = bfd_h_get_32 (abfd, ext_offset); - if (bfd_seek (abfd, offset, SEEK_SET) != 0 - || bfd_read (ext_signature, 1, 4, abfd) != 4) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - signature = bfd_h_get_32 (abfd, ext_signature); - - if (signature != 0x4550) - { - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - - /* Here is the hack. coff_object_p wants to read filhsz bytes to - pick up the COFF header. We adjust so that that will work. 20 - is the size of the i386 COFF filehdr. */ - - if (bfd_seek (abfd, - (bfd_tell (abfd) - - bfd_coff_filhsz (abfd) - + 20), - SEEK_SET) - != 0) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - } -#endif - - return coff_object_p (abfd); -} - const bfd_target #ifdef TARGET_SYM TARGET_SYM = @@ -640,8 +577,8 @@ const bfd_target bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */ /* Note that we allow an object file to be treated as a core file as well. */ - {_bfd_dummy_target, i3coff_object_p, /* bfd_check_format */ - bfd_generic_archive_p, i3coff_object_p}, + {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ + bfd_generic_archive_p, coff_object_p}, {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ bfd_false}, {bfd_false, coff_write_object_contents, /* bfd_write_contents */ diff -up -r --new-file binutils-2.9.5.0.22/bfd/coff-mcore.c binutils-2.9.5.0.24/bfd/coff-mcore.c --- binutils-2.9.5.0.22/bfd/coff-mcore.c Mon Nov 22 09:12:40 1999 +++ binutils-2.9.5.0.24/bfd/coff-mcore.c Thu Jan 13 11:35:37 2000 @@ -582,69 +582,6 @@ coff_mcore_relocate_section (output_bfd, #include "coffcode.h" -static const bfd_target * -pe_object_p (abfd) - bfd * abfd; -{ -#ifdef COFF_IMAGE_WITH_PE - /* We need to hack badly to handle a PE image correctly. In PE - images created by the GNU linker, the offset to the COFF header - is always the size. However, this is not the case in images - generated by other PE linkers. The PE format stores a four byte - offset to the PE signature just before the COFF header at - location 0x3c of the file. We pick up that offset, verify that - the PE signature is there, and then set ourselves up to read in - the COFF header. */ - { - bfd_byte ext_offset[4]; - file_ptr offset; - bfd_byte ext_signature[4]; - unsigned long signature; - - if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0 - || bfd_read (ext_offset, 1, 4, abfd) != 4) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - - offset = bfd_h_get_32 (abfd, ext_offset); - - if (bfd_seek (abfd, offset, SEEK_SET) != 0 - || bfd_read (ext_signature, 1, 4, abfd) != 4) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - - return NULL; - } - - signature = bfd_h_get_32 (abfd, ext_signature); - - if (signature != 0x4550) - { - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - - /* Here is the hack. coff_object_p wants to read filhsz bytes to - pick up the COFF header. We adjust so that that will work. 20 - is the size of the mips COFF filehdr. */ - if (bfd_seek (abfd, (bfd_tell (abfd) - bfd_coff_filhsz (abfd) + 20), - SEEK_SET) != 0) - { - if (bfd_get_error () != bfd_error_system_call) - bfd_set_error (bfd_error_wrong_format); - - return NULL; - } - } -#endif - - return coff_object_p (abfd); -} - /* Forward declaration to initialise alterbative_target field. */ extern const bfd_target TARGET_LITTLE_SYM; diff -up -r --new-file binutils-2.9.5.0.22/bfd/config.bfd binutils-2.9.5.0.24/bfd/config.bfd --- binutils-2.9.5.0.22/bfd/config.bfd Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.24/bfd/config.bfd Thu Jan 13 11:43:43 2000 @@ -116,7 +116,7 @@ case "${targ}" in targ_selvecs=armcoff_big_vec targ_underscore=yes ;; - arm-*-elf | arm*-*-linux-gnu) + arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix*) targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; @@ -321,7 +321,7 @@ case "${targ}" in ;; i[3456]86-*-mingw32* | i[3456]86-*-cygwin* | i[3456]86-*-winnt | i[3456]86-*-pe) targ_defvec=i386pe_vec - targ_selvecs="i386pe_vec i386pei_vec" + targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec" ;; i[3456]86-none-*) targ_defvec=i386coff_vec @@ -648,7 +648,16 @@ case "${targ}" in targ_defvec=sparclynx_coff_vec targ_selvecs=sparclynx_aout_vec ;; - sparc-*-netbsd* | sparc-*-openbsd*) + sparc-*-netbsdelf*) + targ_defvec=bfd_elf32_sparc_vec + targ_selvecs=sparcnetbsd_vec + ;; + sparc-*-netbsdaout* | sparc-*-netbsd*) + targ_defvec=sparcnetbsd_vec + targ_selvecs=bfd_elf32_sparc_vec + targ_underscore=yes + ;; + sparc-*-openbsd*) targ_defvec=sparcnetbsd_vec targ_underscore=yes ;; diff -up -r --new-file binutils-2.9.5.0.22/bfd/config.in binutils-2.9.5.0.24/bfd/config.in --- binutils-2.9.5.0.22/bfd/config.in Thu Jun 3 11:01:53 1999 +++ binutils-2.9.5.0.24/bfd/config.in Thu Jan 13 11:35:38 2000 @@ -232,6 +232,9 @@ /* Define if has lwpstatus_t.pr_reg. */ #undef HAVE_LWPSTATUS_T_PR_REG +/* Define if has win32_pstatus_t. */ +#undef HAVE_WIN32_PSTATUS_T + /* Name of host specific header file to include in trad-core.c. */ #undef TRAD_HEADER diff -up -r --new-file binutils-2.9.5.0.22/bfd/configure binutils-2.9.5.0.24/bfd/configure --- binutils-2.9.5.0.22/bfd/configure Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.24/bfd/configure Thu Jan 13 13:30:19 2000 @@ -1,40 +1,45 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated automatically using Autoconf version 2.14.1 +# Copyright (C) 1992, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: -ac_help= +ac_arg_with_help= +ac_arg_enable_help= +ac_arg_var_help= ac_default_prefix=/usr/local # Any additions from configure.in: -ac_help="$ac_help +ac_arg_var_help="$ac_arg_var_help + CFLAGS Extra flags for the C compiler" +ac_arg_enable_help="$ac_arg_enable_help --enable-shared[=PKGS] build shared libraries [default=no]" -ac_help="$ac_help +ac_arg_enable_help="$ac_arg_enable_help --enable-static[=PKGS] build static libraries [default=yes]" -ac_help="$ac_help +ac_arg_enable_help="$ac_arg_enable_help --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" -ac_help="$ac_help +ac_arg_with_help="$ac_arg_with_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" -ac_help="$ac_help +ac_arg_enable_help="$ac_arg_enable_help --disable-libtool-lock force libtool not to do file locking" -ac_help="$ac_help +ac_arg_enable_help="$ac_arg_enable_help --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" -ac_help="$ac_help +ac_arg_enable_help="$ac_arg_enable_help --enable-targets alternative target configurations" -ac_help="$ac_help +ac_arg_enable_help="$ac_arg_enable_help --enable-commonbfdlib build shared BFD/opcodes/libiberty library" -ac_help="$ac_help +ac_arg_with_help="$ac_arg_with_help --with-mmap try using mmap for BFD input files if available" -ac_help="$ac_help +ac_arg_enable_help="$ac_arg_enable_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" -ac_help="$ac_help +ac_arg_var_help="$ac_arg_var_help + CFLAGS Extra flags for the C compiler" +ac_arg_enable_help="$ac_arg_enable_help --disable-nls do not use Native Language Support" -ac_help="$ac_help +ac_arg_with_help="$ac_arg_with_help --with-included-gettext use the GNU gettext library included here" # Initialize some variables set by options. @@ -53,7 +58,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -77,7 +81,10 @@ subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +: ${ac_max_here_lines=12} +# Sed expression to map a string onto a valid sh and CPP variable names. +ac_tr_sh='sed -e y%*+%pp%;s%[^a-zA-Z0-9_]%_%g' +ac_tr_cpp='sed -e y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[^A-Z0-9_]%_%g' ac_prev= for ac_option @@ -123,23 +130,23 @@ do datadir="$ac_optarg" ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`echo "$ac_option"|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + if test -n "`echo "$ac_feature"| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + if test -n "`echo "$ac_feature"| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in - *=*) ;; + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; @@ -160,16 +167,24 @@ do -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] + cat << \EOF +`configure' configures software source code packages to adapt to many kinds +of systems. + +Usage: configure [OPTION]... [VAR=VALUE]... [HOST] + +To safely assign special values to environment variables (e.g., CC, +CFLAGS...), give to `configure' the definition as VAR=VALUE. + +Defaults for the options are specified in brackets. + Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure + Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -190,16 +205,20 @@ Directory and file names: --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] + +Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names + EOF - cat << EOF + cat << \EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] + Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] @@ -208,9 +227,12 @@ Features and packages: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi + test -n "$ac_arg_enable_help" && echo " +--enable options recognized:$ac_arg_enable_help" + test -n "$ac_arg_with_help" && echo " +--with options recognized:$ac_arg_with_help" + test -n "$ac_arg_var_help" && echo " +Some of the influent environment variables:$ac_arg_var_help" exit 0 ;; -host | --host | --hos | --ho) @@ -339,11 +361,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -365,26 +382,26 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.14.1" exit 0 ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + if test -n "`echo "$ac_package"| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in - *=*) ;; + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`echo "$ac_option"|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + if test -n "`echo "$ac_package"| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` @@ -411,8 +428,17 @@ EOF -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; + *=*) + ac_envvar=`echo $ac_option|sed -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; } + fi + eval "${ac_envvar}='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + if test -n "`echo "$ac_option"| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then @@ -425,7 +451,7 @@ EOF done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + { echo "configure: error: missing argument to --\`echo $ac_prev | sed 's/_/-/g'\`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 @@ -451,7 +477,7 @@ running configure, to aid debugging if c " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. +# Also quote any args containing shell meta-characters. ac_configure_args= for ac_arg do @@ -461,6 +487,7 @@ do -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_arg=`echo "$ac_arg"|sed "s/'/'\\\\\\\\''/g"` ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac @@ -490,7 +517,7 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + ac_confdir=`echo "$ac_prog"|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -501,24 +528,20 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "configure: error: cannot find sources in $ac_confdir or .." 1>&2; exit 1; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "configure: error: cannot find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -529,7 +552,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -568,14 +591,139 @@ for ac_dir in $srcdir $srcdir/.. $srcdir ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { echo "configure: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + +echo $ac_n "checking host system type... $ac_c" 1>&6 +echo "configure:610: checking host system type" 1>&5 +if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_host_alias=$host + case "$ac_cv_host_alias" in + NONE) + case $nonopt in + NONE) + if ac_cv_host_alias=`$ac_config_guess`; then : + else { echo "configure: error: cannot guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) ac_cv_host_alias=$nonopt ;; + esac ;; + esac + + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` + ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_host" 1>&6 + +host=$ac_cv_host +host_alias=$ac_cv_host_alias +host_cpu=$ac_cv_host_cpu +host_vendor=$ac_cv_host_vendor +host_os=$ac_cv_host_os + + + + + +echo $ac_n "checking target system type... $ac_c" 1>&6 +echo "configure:651: checking target system type" 1>&5 +if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_target_alias=$target + case "$ac_cv_target_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_target_alias=$host_alias ;; + + *) ac_cv_target_alias=$nonopt ;; + esac ;; + esac + + ac_cv_target=`$ac_config_sub $ac_cv_target_alias` + ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +echo "$ac_t""$ac_cv_target" 1>&6 + +target=$ac_cv_target +target_alias=$ac_cv_target_alias +target_cpu=$ac_cv_target_cpu +target_vendor=$ac_cv_target_vendor +target_os=$ac_cv_target_os + + + + + +echo $ac_n "checking build system type... $ac_c" 1>&6 +echo "configure:691: checking build system type" 1>&5 +if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_build_alias=$build + case "$ac_cv_build_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_build_alias=$host_alias ;; + + *) ac_cv_build_alias=$nonopt ;; + esac ;; + esac + + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` + ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_build" 1>&6 + +build=$ac_cv_build +build_alias=$ac_cv_build_alias +build_cpu=$ac_cv_build_cpu +build_vendor=$ac_cv_build_vendor +build_os=$ac_cv_build_os + + + # Do some error checking and defaulting for the host and target type. @@ -599,78 +747,21 @@ NONE---*---* | *---NONE---* | *---*---NO esac -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:609: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:630: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:648: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- -# Extract the first word of "gcc", so it can be a program name with args. +case "${CFLAGS+set} $ac_configure_args" in + *" CFLAGS="* );; + "set "*) ac_configure_args="CFLAGS='$CFLAGS' $ac_configure_args";; +esac + + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:673: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:764: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_CC+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -695,12 +786,12 @@ else echo "$ac_t""no" 1>&6 fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:703: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:794: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_CC+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -744,14 +835,14 @@ else echo "$ac_t""no" 1>&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:754: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + if test -z "$CC"; then + for ac_prog in cl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:845: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_CC+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -762,7 +853,7 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" + ac_cv_prog_CC="$ac_prog" break fi done @@ -775,14 +866,18 @@ if test -n "$CC"; then else echo "$ac_t""no" 1>&6 fi - ;; - esac + +test -n "$CC" && break +done + + fi fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:786: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ac_c" 1>&6 +echo "configure:881: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" 1>&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -793,12 +888,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 797 "configure" +#line 892 "configure" #include "confdefs.h" -main(){return(0);} +int main(){return(0);} EOF -if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -823,14 +918,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:828: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler... $ac_c" 1>&6 +echo "configure:923: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" 1>&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:833: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 +echo "configure:928: checking whether we are using GNU C" 1>&5 +if test "${ac_cv_prog_gcc+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi - echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then @@ -856,9 +950,9 @@ fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:861: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo $ac_n "checking whether ${CC-cc} accepts -g... $ac_c" 1>&6 +echo "configure:955: checking whether ${CC-cc} accepts -g" 1>&5 +if test "${ac_cv_prog_cc_g+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -870,7 +964,6 @@ fi rm -f conftest* fi - echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" @@ -888,8 +981,8 @@ else fi fi -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:893: checking for POSIXized ISC" >&5 +echo $ac_n "checking for POSIXized ISC... $ac_c" 1>&6 +echo "configure:986: checking for POSIXized ISC" 1>&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -921,10 +1014,10 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:926: checking for a BSD compatible install" >&5 +echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6 +echo "configure:1019: checking for a BSD compatible install" 1>&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if test "${ac_cv_path_install+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -942,6 +1035,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -970,12 +1067,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:979: checking whether build environment is sane" >&5 +echo $ac_n "checking whether build environment is sane... $ac_c" 1>&6 +echo "configure:1076: checking whether build environment is sane" 1>&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1023,18 +1120,18 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1036: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}... $ac_c" 1>&6 +echo "configure:1133: checking whether ${MAKE-make} sets \${MAKE}" 1>&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -1061,7 +1158,7 @@ fi PACKAGE=bfd -VERSION=2.9.5.0.22 +VERSION=2.9.5.0.24 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1077,8 +1174,8 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` -echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1082: checking for working aclocal" >&5 +echo $ac_n "checking for working aclocal... $ac_c" 1>&6 +echo "configure:1179: checking for working aclocal" 1>&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1090,8 +1187,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1095: checking for working autoconf" >&5 +echo $ac_n "checking for working autoconf... $ac_c" 1>&6 +echo "configure:1192: checking for working autoconf" 1>&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1103,8 +1200,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1108: checking for working automake" >&5 +echo $ac_n "checking for working automake... $ac_c" 1>&6 +echo "configure:1205: checking for working automake" 1>&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1116,8 +1213,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1121: checking for working autoheader" >&5 +echo $ac_n "checking for working autoheader... $ac_c" 1>&6 +echo "configure:1218: checking for working autoheader" 1>&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1129,8 +1226,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1134: checking for working makeinfo" >&5 +echo $ac_n "checking for working makeinfo... $ac_c" 1>&6 +echo "configure:1231: checking for working makeinfo" 1>&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1152,9 +1249,9 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1157: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1254: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_AR+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then @@ -1184,9 +1281,9 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1189: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1286: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1213,12 +1310,12 @@ fi if test -z "$ac_cv_prog_RANLIB"; then -if test -n "$ac_tool_prefix"; then - # Extract the first word of "ranlib", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1221: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1318: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1244,9 +1341,9 @@ else echo "$ac_t""no" 1>&6 fi -else - RANLIB=":" -fi + else + RANLIB=":" + fi fi @@ -1322,9 +1419,9 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1327: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1424: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1361,8 +1458,8 @@ fi ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1366: checking for ld used by GCC" >&5 + echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 +echo "configure:1463: checking for ld used by GCC" 1>&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1385,13 +1482,13 @@ echo "configure:1366: checking for ld us ;; esac elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1390: checking for GNU ld" >&5 + echo $ac_n "checking for GNU ld... $ac_c" 1>&6 +echo "configure:1487: checking for GNU ld" 1>&5 else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1393: checking for non-GNU ld" >&5 + echo $ac_n "checking for non-GNU ld... $ac_c" 1>&6 +echo "configure:1490: checking for non-GNU ld" 1>&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then +if test "${ac_cv_path_LD+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then @@ -1424,9 +1521,9 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } -echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1429: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 +echo "configure:1526: checking if the linker ($LD) is GNU ld" 1>&5 +if test "${ac_cv_prog_gnu_ld+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -1436,13 +1533,12 @@ else ac_cv_prog_gnu_ld=no fi fi - echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 -echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1445: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 +echo "configure:1541: checking for BSD-compatible nm" 1>&5 +if test "${ac_cv_path_NM+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then @@ -1478,9 +1574,9 @@ echo "$ac_t""$NM" 1>&6 # Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -echo "configure:1483: checking command to parse $NM output" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then +echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 +echo "configure:1579: checking command to parse $NM output" 1>&5 +if test "${ac_cv_sys_global_symbol_pipe+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else # These are sane defaults that work on at least a few old systems. @@ -1542,11 +1638,11 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func;return 0;} EOF - if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1550: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1646: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. if sort "$ac_nlist" | uniq > "$ac_nlist"T; then @@ -1598,7 +1694,7 @@ EOF ac_save_CFLAGS="$CFLAGS" LIBS="conftestm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_pipe_works=yes else echo "configure: failed program was:" >&5 @@ -1643,9 +1739,9 @@ if test -z "$ac_cv_sys_global_symbol_pip fi echo "$ac_t""$ac_result" 1>&6 -echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 -echo "configure:1648: checking for _ prefix in compiled symbols" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then +echo $ac_n "checking for _ prefix in compiled symbols... $ac_c" 1>&6 +echo "configure:1744: checking for _ prefix in compiled symbols" 1>&5 +if test "${ac_cv_sys_symbol_underscore+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_sys_symbol_underscore=no @@ -1653,10 +1749,10 @@ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1660: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1756: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes @@ -1681,9 +1777,9 @@ fi echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no} -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1686: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 +echo "configure:1782: checking whether ln -s works" 1>&5 +if test "${ac_cv_prog_LN_S+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata @@ -1718,8 +1814,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1722 "configure"' > conftest.$ac_ext - if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1818 "configure"' > conftest.$ac_ext + if { (eval echo configure:1819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1739,20 +1835,20 @@ case "$host" in # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1744: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then + echo $ac_n "checking whether the C compiler needs -belf... $ac_c" 1>&6 +echo "configure:1840: checking whether the C compiler needs -belf" 1>&5 +if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1763,7 +1859,6 @@ else fi rm -f conftest* fi - echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -1774,9 +1869,9 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 *-*-cygwin*) # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1779: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1874: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_DLLTOOL+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1803,12 +1898,12 @@ fi if test -z "$ac_cv_prog_DLLTOOL"; then -if test -n "$ac_tool_prefix"; then - # Extract the first word of "dlltool", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1811: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1906: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_DLLTOOL+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1834,16 +1929,16 @@ else echo "$ac_t""no" 1>&6 fi -else - DLLTOOL="false" -fi + else + DLLTOOL="false" + fi fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1846: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1941: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_AS+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1870,12 +1965,12 @@ fi if test -z "$ac_cv_prog_AS"; then -if test -n "$ac_tool_prefix"; then - # Extract the first word of "as", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1878: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:1973: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_AS+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1901,9 +1996,9 @@ else echo "$ac_t""no" 1>&6 fi -else - AS="false" -fi + else + AS="false" + fi fi @@ -1987,7 +2082,7 @@ $libtool_flags --no-verify $ac_aux_dir/l # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -2065,17 +2160,17 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," -echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2079: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles... $ac_c" 1>&6 +echo "configure:2174: checking whether to enable maintainer-specific portions of Makefiles" 1>&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2097,13 +2192,13 @@ fi MAINT=$MAINTAINER_MODE_TRUE -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:2102: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then +echo $ac_n "checking for Cygwin environment... $ac_c" 1>&6 +echo "configure:2197: checking for Cygwin environment" 1>&5 +if test "${ac_cv_cygwin+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2124,26 +2219,24 @@ else ac_cv_cygwin=no fi rm -f conftest* -rm -f conftest* fi - echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:2135: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then +echo $ac_n "checking for mingw32 environment... $ac_c" 1>&6 +echo "configure:2228: checking for mingw32 environment" 1>&5 +if test "${ac_cv_mingw32+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -2153,29 +2246,55 @@ else ac_cv_mingw32=no fi rm -f conftest* -rm -f conftest* fi - echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking for EMX OS/2 environment... $ac_c" 1>&6 +echo "configure:2255: checking for EMX OS/2 environment" 1>&5 +if test "${ac_cv_emxos2+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +fi +echo "$ac_t""$ac_cv_emxos2" 1>&6 +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2166: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + +echo $ac_n "checking for executable suffix... $ac_c" 1>&6 +echo "configure:2285: checking for executable suffix" 1>&5 +if test "${ac_cv_exeext+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.C | *.o | *.obj | *.xcoff) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2198,11 +2317,16 @@ target64=false # host stuff: -# Extract the first word of "gcc", so it can be a program name with args. +case "${CFLAGS+set} $ac_configure_args" in + *" CFLAGS="* );; + "set "*) ac_configure_args="CFLAGS='$CFLAGS' $ac_configure_args";; +esac + + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2205: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:2329: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_CC+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2227,12 +2351,12 @@ else echo "$ac_t""no" 1>&6 fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2235: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:2359: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_CC+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2276,14 +2400,14 @@ else echo "$ac_t""no" 1>&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2286: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + if test -z "$CC"; then + for ac_prog in cl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:2410: checking for $ac_word" 1>&5 +if test "${ac_cv_prog_CC+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2294,7 +2418,7 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" + ac_cv_prog_CC="$ac_prog" break fi done @@ -2307,14 +2431,18 @@ if test -n "$CC"; then else echo "$ac_t""no" 1>&6 fi - ;; - esac + +test -n "$CC" && break +done + + fi fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2318: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ac_c" 1>&6 +echo "configure:2446: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" 1>&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2325,12 +2453,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2329 "configure" +#line 2457 "configure" #include "confdefs.h" -main(){return(0);} +int main(){return(0);} EOF -if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2355,14 +2483,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2360: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler... $ac_c" 1>&6 +echo "configure:2488: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" 1>&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2365: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 +echo "configure:2493: checking whether we are using GNU C" 1>&5 +if test "${ac_cv_prog_gcc+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi - echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then @@ -2388,9 +2515,9 @@ fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2393: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo $ac_n "checking whether ${CC-cc} accepts -g... $ac_c" 1>&6 +echo "configure:2520: checking whether ${CC-cc} accepts -g" 1>&5 +if test "${ac_cv_prog_cc_g+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -2402,7 +2529,6 @@ fi rm -f conftest* fi - echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" @@ -2422,14 +2548,14 @@ fi ALL_LINGUAS= -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2427: checking how to run the C preprocessor" >&5 +echo $ac_n "checking how to run the C preprocessor... $ac_c" 1>&6 +echo "configure:2553: checking how to run the C preprocessor" 1>&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if test "${ac_cv_prog_CPP+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2438,13 +2564,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2455,13 +2581,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2472,13 +2598,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2502,13 +2628,13 @@ else fi echo "$ac_t""$CPP" 1>&6 -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2507: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo $ac_n "checking for ANSI C header files... $ac_c" 1>&6 +echo "configure:2633: checking for ANSI C header files" 1>&5 +if test "${ac_cv_header_stdc+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2516,7 +2642,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2533,7 +2659,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2551,7 +2677,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2572,18 +2698,25 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < +#if ((' ' & 0x0FF) == 0x020) #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +#define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +#define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2597,7 +2730,6 @@ fi fi fi - echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF @@ -2606,19 +2738,19 @@ EOF fi -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2611: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo $ac_n "checking for working const... $ac_c" 1>&6 +echo "configure:2743: checking for working const" 1>&5 +if test "${ac_cv_c_const+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2672,7 +2804,6 @@ else fi rm -f conftest* fi - echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF @@ -2681,22 +2812,22 @@ EOF fi -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2686: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +echo $ac_n "checking for inline... $ac_c" 1>&6 +echo "configure:2817: checking for inline" 1>&5 +if test "${ac_cv_c_inline+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2707,7 +2838,6 @@ rm -f conftest* done fi - echo "$ac_t""$ac_cv_c_inline" 1>&6 case "$ac_cv_c_inline" in inline | yes) ;; @@ -2721,19 +2851,21 @@ EOF ;; esac -echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2726: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then +echo $ac_n "checking for off_t... $ac_c" 1>&6 +echo "configure:2856: checking for off_t" 1>&5 +if test "${ac_cv_type_off_t+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #if STDC_HEADERS -#include -#include +# include +# include #endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then @@ -2747,26 +2879,30 @@ rm -f conftest* fi echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +if test $ac_cv_type_off_t = yes; then + : +else + cat >> confdefs.h <&6 -echo "configure:2759: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo $ac_n "checking for size_t... $ac_c" 1>&6 +echo "configure:2893: checking for size_t" 1>&5 +if test "${ac_cv_type_size_t+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #if STDC_HEADERS -#include -#include +# include +# include #endif + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then @@ -2780,8 +2916,10 @@ rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if test $ac_cv_type_size_t = yes; then + : +else + cat >> confdefs.h <&6 -echo "configure:2794: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +echo $ac_n "checking for working alloca.h... $ac_c" 1>&6 +echo "configure:2932: checking for working alloca.h" 1>&5 +if test "${ac_cv_working_alloca_h+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_header_alloca_h=yes + ac_cv_working_alloca_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_header_alloca_h=no + ac_cv_working_alloca_h=no fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then +echo "$ac_t""$ac_cv_working_alloca_h" 1>&6 +if test $ac_cv_working_alloca_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA_H 1 EOF fi -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2827: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +echo $ac_n "checking for alloca... $ac_c" 1>&6 +echo "configure:2964: checking for alloca" 1>&5 +if test "${ac_cv_func_alloca_works+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2867,7 +3004,6 @@ else fi rm -f conftest* fi - echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 if test $ac_cv_func_alloca_works = yes; then cat >> confdefs.h <<\EOF @@ -2887,13 +3023,13 @@ if test $ac_cv_func_alloca_works = no; t EOF -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2892: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +echo $ac_n "checking whether alloca needs Cray hooks... $ac_c" 1>&6 +echo "configure:3028: checking whether alloca needs Cray hooks" 1>&5 +if test "${ac_cv_os_cray+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2922: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:3058: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done fi -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2977: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +echo $ac_n "checking stack direction for C alloca... $ac_c" 1>&6 +echo "configure:3111: checking stack direction for C alloca" 1>&5 +if test "${ac_cv_c_stack_direction+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3013,7 +3147,6 @@ rm -fr conftest* fi fi - echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&6 -echo "configure:3029: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo $ac_n "checking for $ac_header... $ac_c" 1>&6 +echo "configure:3162: checking for $ac_header" 1>&5 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_header> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "$ac_ac_Header=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then cat >> confdefs.h <&6 fi done for ac_func in getpagesize do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3068: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:3199: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3121: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo $ac_n "checking for working mmap... $ac_c" 1>&6 +echo "configure:3249: checking for working mmap" 1>&5 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3278,7 +3406,6 @@ rm -fr conftest* fi fi - echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF @@ -3288,57 +3415,55 @@ EOF fi - for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ + for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h sys/param.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3297: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo $ac_n "checking for $ac_header... $ac_c" 1>&6 +echo "configure:3424: checking for $ac_header" 1>&5 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_header> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "$ac_ac_Header=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then cat >> confdefs.h <&6 fi done for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ __argz_count __argz_stringify __argz_next do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3337: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:3462: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done @@ -3389,13 +3511,14 @@ done if test "${ac_cv_func_stpcpy+set}" != "set"; then for ac_func in stpcpy do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3394: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:3517: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done @@ -3451,20 +3571,20 @@ EOF fi if test $ac_cv_header_locale_h = yes; then - echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3456: checking for LC_MESSAGES" >&5 -if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then + echo $ac_n "checking for LC_MESSAGES... $ac_c" 1>&6 +echo "configure:3576: checking for LC_MESSAGES" 1>&5 +if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3475,7 +3595,6 @@ else fi rm -f conftest* fi - echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >> confdefs.h <<\EOF @@ -3484,8 +3603,8 @@ EOF fi fi - echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3489: checking whether NLS is requested" >&5 + echo $ac_n "checking whether NLS is requested... $ac_c" 1>&6 +echo "configure:3608: checking whether NLS is requested" 1>&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3504,8 +3623,8 @@ fi #define ENABLE_NLS 1 EOF - echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3509: checking whether included gettext is requested" >&5 + echo $ac_n "checking whether included gettext is requested... $ac_c" 1>&6 +echo "configure:3628: checking whether included gettext is requested" 1>&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3522,48 +3641,47 @@ fi nls_cv_header_libgt= CATOBJEXT=NONE - ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3528: checking for libintl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "checking for libintl.h... $ac_c" 1>&6 +echo "configure:3646: checking for libintl.h" 1>&5 +if test "${ac_cv_header_libintl_h+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + ac_cv_header_libintl_h=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_header_libintl_h=no fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3555: checking for gettext in libc" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then +echo "$ac_t""$ac_cv_header_libintl_h" 1>&6 +if test $ac_cv_header_libintl_h = yes; then + echo $ac_n "checking for gettext in libc... $ac_c" 1>&6 +echo "configure:3673: checking for gettext in libc" 1>&5 +if test "${gt_cv_func_gettext_libc+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3574,20 +3692,18 @@ else fi rm -f conftest* fi - echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then - echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3583: checking for bindtextdomain in -lintl" >&5 -ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for bindtextdomain in -lintl... $ac_c" 1>&6 +echo "configure:3700: checking for bindtextdomain in -lintl" 1>&5 +if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ac_cv_lib_intl_bindtextdomain=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_lib_intl_bindtextdomain=no fi rm -f conftest* LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3618: checking for gettext in libintl" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then +echo "$ac_t""$ac_cv_lib_intl_bindtextdomain" 1>&6 +if test $ac_cv_lib_intl_bindtextdomain = yes; then + echo $ac_n "checking for gettext in libintl... $ac_c" 1>&6 +echo "configure:3733: checking for gettext in libintl" 1>&5 +if test "${gt_cv_func_gettext_libintl+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3637,10 +3752,7 @@ else fi rm -f conftest* fi - echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 -else - echo "$ac_t""no" 1>&6 fi fi @@ -3653,9 +3765,9 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3658: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:3770: checking for $ac_word" 1>&5 +if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3687,13 +3799,14 @@ fi if test "$MSGFMT" != "no"; then for ac_func in dcgettext do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3692: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:3805: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3747: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:3857: checking for $ac_word" 1>&5 +if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in - /*) + /* | ?:/*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. - ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" - for ac_dir in $ac_dummy; do + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then + if test -f "$ac_dir/$ac_word"; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi @@ -3778,9 +3885,9 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3783: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:3890: checking for $ac_word" 1>&5 +if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3811,7 +3918,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3835,8 +3942,6 @@ rm -f conftest* fi fi -else - echo "$ac_t""no" 1>&6 fi @@ -3850,9 +3955,9 @@ fi INTLOBJS="\$(GETTOBJS)" # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3855: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:3960: checking for $ac_word" 1>&5 +if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3884,24 +3989,21 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3889: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:3994: checking for $ac_word" 1>&5 +if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in - /*) + /* | ?:/*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. - ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" - for ac_dir in $ac_dummy; do + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then + if test -f "$ac_dir/$ac_word"; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi @@ -3920,9 +4022,9 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3925: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo $ac_n "checking for $ac_word... $ac_c" 1>&6 +echo "configure:4027: checking for $ac_word" 1>&5 +if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -4010,8 +4112,8 @@ fi if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else - echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4015: checking for catalogs to be installed" >&5 + echo $ac_n "checking for catalogs to be installed... $ac_c" 1>&6 +echo "configure:4117: checking for catalogs to be installed" 1>&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4037,38 +4139,36 @@ echo "configure:4015: checking for catal if test -f $srcdir/po2tbl.sed.in; then if test "$CATOBJEXT" = ".cat"; then - ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4043: checking for linux/version.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "checking for linux/version.h... $ac_c" 1>&6 +echo "configure:4144: checking for linux/version.h" 1>&5 +if test "${ac_cv_header_linux_version_h+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + ac_cv_header_linux_version_h=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_header_linux_version_h=no fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$ac_t""$ac_cv_header_linux_version_h" 1>&6 +if test $ac_cv_header_linux_version_h = yes; then msgformat=linux else - echo "$ac_t""no" 1>&6 -msgformat=xopen + msgformat=xopen fi @@ -4126,10 +4226,10 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4131: checking for a BSD compatible install" >&5 +echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6 +echo "configure:4231: checking for a BSD compatible install" 1>&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if test "${ac_cv_path_install+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -4147,6 +4247,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -4175,7 +4279,7 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -4209,9 +4313,9 @@ fi if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else - echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4214: checking for build system executable suffix" >&5 -if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then + echo $ac_n "checking for build system executable suffix... $ac_c" 1>&6 +echo "configure:4318: checking for build system executable suffix" 1>&5 +if test "${bfd_cv_build_exeext+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* @@ -4227,100 +4331,93 @@ else rm -f conftest* test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no fi - echo "$ac_t""$bfd_cv_build_exeext" 1>&6 EXEEXT_FOR_BUILD="" test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} fi -for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h +for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4242: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo $ac_n "checking for $ac_header... $ac_c" 1>&6 +echo "configure:4345: checking for $ac_header" 1>&5 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_header> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "$ac_ac_Header=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then cat >> confdefs.h <&6 fi done -for ac_hdr in fcntl.h sys/file.h sys/time.h +for ac_header in fcntl.h sys/file.h sys/time.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4282: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo $ac_n "checking for $ac_header... $ac_c" 1>&6 +echo "configure:4382: checking for $ac_header" 1>&5 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_header> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "$ac_ac_Header=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then cat >> confdefs.h <&6 fi done -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4319: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then +echo $ac_n "checking whether time.h and sys/time.h may both be included... $ac_c" 1>&6 +echo "configure:4416: checking whether time.h and sys/time.h may both be included" 1>&5 +if test "${ac_cv_header_time+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4329,7 +4426,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4340,7 +4437,6 @@ else fi rm -f conftest* fi - echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF @@ -4353,13 +4449,13 @@ ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4358: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking for $ac_hdr that defines DIR... $ac_c" 1>&6 +echo "configure:4454: checking for $ac_hdr that defines DIR" 1>&5 +if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4367,7 +4463,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4391,16 +4487,15 @@ fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4396: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for opendir in -ldir... $ac_c" 1>&6 +echo "configure:4492: checking for opendir in -ldir" 1>&5 +if test "${ac_cv_lib_dir_opendir+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ac_cv_lib_dir_opendir=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_lib_dir_opendir=no fi rm -f conftest* LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$ac_t""$ac_cv_lib_dir_opendir" 1>&6 +if test $ac_cv_lib_dir_opendir = yes; then LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 fi else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4437: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "checking for opendir in -lx... $ac_c" 1>&6 +echo "configure:4529: checking for opendir in -lx" 1>&5 +if test "${ac_cv_lib_x_opendir+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ac_cv_lib_x_opendir=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_lib_x_opendir=no fi rm -f conftest* LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$ac_t""$ac_cv_lib_x_opendir" 1>&6 +if test $ac_cv_lib_x_opendir = yes; then LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 fi fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4481: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:4570: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done @@ -4539,13 +4625,13 @@ EOF ;; esac -echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4544: checking whether strstr must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then +echo $ac_n "checking whether strstr must be declared... $ac_c" 1>&6 +echo "configure:4630: checking whether strstr must be declared" 1>&5 +if test "${bfd_cv_decl_needed_strstr+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4566,7 +4652,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4586,13 +4672,13 @@ EOF fi -echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4591: checking whether malloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then +echo $ac_n "checking whether malloc must be declared... $ac_c" 1>&6 +echo "configure:4677: checking whether malloc must be declared" 1>&5 +if test "${bfd_cv_decl_needed_malloc+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4613,7 +4699,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4633,13 +4719,13 @@ EOF fi -echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4638: checking whether realloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then +echo $ac_n "checking whether realloc must be declared... $ac_c" 1>&6 +echo "configure:4724: checking whether realloc must be declared" 1>&5 +if test "${bfd_cv_decl_needed_realloc+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4660,7 +4746,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4680,13 +4766,13 @@ EOF fi -echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4685: checking whether free must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then +echo $ac_n "checking whether free must be declared... $ac_c" 1>&6 +echo "configure:4771: checking whether free must be declared" 1>&5 +if test "${bfd_cv_decl_needed_free+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4707,7 +4793,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4727,13 +4813,13 @@ EOF fi -echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4732: checking whether getenv must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then +echo $ac_n "checking whether getenv must be declared... $ac_c" 1>&6 +echo "configure:4818: checking whether getenv must be declared" 1>&5 +if test "${bfd_cv_decl_needed_getenv+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4754,7 +4840,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4959,61 +5045,58 @@ EOF # ELF corefile support has several flavors, but all of # them use something called - for ac_hdr in sys/procfs.h + for ac_header in sys/procfs.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4967: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo $ac_n "checking for $ac_header... $ac_c" 1>&6 +echo "configure:5053: checking for $ac_header" 1>&5 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_header> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "$ac_ac_Header=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then cat >> confdefs.h <&6 fi done if test "$ac_cv_header_sys_procfs_h" = yes; then - echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5005: checking for prstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then + echo $ac_n "checking for prstatus_t in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5088: checking for prstatus_t in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { prstatus_t avar ; return 0; } EOF -if { (eval echo configure:5017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5034,20 +5117,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 - echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5039: checking for prstatus_t.pr_who in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then + echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5122: checking for prstatus_t.pr_who in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { prstatus_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5068,20 +5151,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 - echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5073: checking for pstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then + echo $ac_n "checking for pstatus_t in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5156: checking for pstatus_t in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5102,20 +5185,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 - echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5107: checking for prpsinfo_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then + echo $ac_n "checking for prpsinfo_t in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5190: checking for prpsinfo_t in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { prpsinfo_t avar ; return 0; } EOF -if { (eval echo configure:5119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5136,20 +5219,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 - echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5141: checking for psinfo_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then + echo $ac_n "checking for psinfo_t in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5224: checking for psinfo_t in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { psinfo_t avar ; return 0; } EOF -if { (eval echo configure:5153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5170,20 +5253,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 - echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5175: checking for lwpstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then + echo $ac_n "checking for lwpstatus_t in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5258: checking for lwpstatus_t in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { lwpstatus_t avar ; return 0; } EOF -if { (eval echo configure:5187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5204,20 +5287,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 - echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5209: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then + echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5292: checking for lwpstatus_t.pr_context in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_context ; return 0; } EOF -if { (eval echo configure:5221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5238,20 +5321,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 - echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5243: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then + echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5326: checking for lwpstatus_t.pr_reg in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_reg ; return 0; } EOF -if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5272,6 +5355,40 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 + echo $ac_n "checking for win32_pstatus_t in sys/procfs.h... $ac_c" 1>&6 +echo "configure:5360: checking for win32_pstatus_t in sys/procfs.h" 1>&5 + if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +win32_pstatus_t avar +; return 0; } +EOF +if { (eval echo configure:5372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_win32_pstatus_t=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_WIN32_PSTATUS_T 1 +EOF + + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6 + fi fi @@ -5580,7 +5697,7 @@ case ${host64}-${target64}-${want64} in wordsize=64 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then - echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2 + echo "configure: warning: You have requested a 64 bit BFD configuration" 1>&2 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2 fi ;; @@ -5602,55 +5719,53 @@ test -n "${selarchs}" && tdefaults="${td test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" -for ac_hdr in unistd.h +for ac_header in unistd.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5610: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo $ac_n "checking for $ac_header... $ac_c" 1>&6 +echo "configure:5727: checking for $ac_header" 1>&5 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_header> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "$ac_ac_Header=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$ac_ac_Header=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then cat >> confdefs.h <&6 fi done for ac_func in getpagesize do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5649: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:5764: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:5702: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo $ac_n "checking for working mmap... $ac_c" 1>&6 +echo "configure:5814: checking for working mmap" 1>&5 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -5859,7 +5971,6 @@ rm -fr conftest* fi fi - echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF @@ -5870,13 +5981,14 @@ fi for ac_func in madvise mprotect do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5875: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` +echo $ac_n "checking for $ac_func... $ac_c" 1>&6 +echo "configure:5987: checking for $ac_func" 1>&5 +if eval "test \"\${$ac_ac_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "$ac_ac_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "$ac_ac_var=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 +if test `eval echo '${'$ac_ac_var'}'` = yes; then cat >> confdefs.h <&6 fi done @@ -6013,179 +6122,259 @@ cat > $CONFIG_STATUS <> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@PACKAGE@%$PACKAGE%g -s%@VERSION@%$VERSION%g -s%@ACLOCAL@%$ACLOCAL%g -s%@AUTOCONF@%$AUTOCONF%g -s%@AUTOMAKE@%$AUTOMAKE%g -s%@AUTOHEADER@%$AUTOHEADER%g -s%@MAKEINFO@%$MAKEINFO%g -s%@SET_MAKE@%$SET_MAKE%g -s%@AR@%$AR%g -s%@RANLIB@%$RANLIB%g -s%@LD@%$LD%g -s%@NM@%$NM%g -s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g -s%@LN_S@%$LN_S%g -s%@DLLTOOL@%$DLLTOOL%g -s%@AS@%$AS%g -s%@LIBTOOL@%$LIBTOOL%g -s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g -s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g -s%@MAINT@%$MAINT%g -s%@EXEEXT@%$EXEEXT%g -s%@CPP@%$CPP%g -s%@ALLOCA@%$ALLOCA%g -s%@USE_NLS@%$USE_NLS%g -s%@MSGFMT@%$MSGFMT%g -s%@GMSGFMT@%$GMSGFMT%g -s%@XGETTEXT@%$XGETTEXT%g -s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g -s%@CATALOGS@%$CATALOGS%g -s%@CATOBJEXT@%$CATOBJEXT%g -s%@DATADIRNAME@%$DATADIRNAME%g -s%@GMOFILES@%$GMOFILES%g -s%@INSTOBJEXT@%$INSTOBJEXT%g -s%@INTLDEPS@%$INTLDEPS%g -s%@INTLLIBS@%$INTLLIBS%g -s%@INTLOBJS@%$INTLOBJS%g -s%@POFILES@%$POFILES%g -s%@POSUB@%$POSUB%g -s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g -s%@GT_NO@%$GT_NO%g -s%@GT_YES@%$GT_YES%g -s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g -s%@l@%$l%g -s%@HDEFINES@%$HDEFINES%g -s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g -s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g -s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g -s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g -s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g -s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g -s%@COREFILE@%$COREFILE%g -s%@COREFLAG@%$COREFLAG%g -s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g -s%@WIN32LIBADD@%$WIN32LIBADD%g -s%@TDEFINES@%$TDEFINES%g -s%@wordsize@%$wordsize%g -s%@all_backends@%$all_backends%g -s%@bfd_backends@%$bfd_backends%g -s%@bfd_machines@%$bfd_machines%g -s%@tdefaults@%$tdefaults%g +# Remove all the CONFIG_FILES, and trap to remove the temp files. +rm -fr \`echo "\$CONFIG_FILES" | sed "s/:[^ ]*//g"\` +trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15 +EOF + + +cat >>$CONFIG_STATUS < \$ac_cs_root.subs <<\\CEOF +s%@SHELL@%$SHELL%;t t +s%@CFLAGS@%$CFLAGS%;t t +s%@CPPFLAGS@%$CPPFLAGS%;t t +s%@CXXFLAGS@%$CXXFLAGS%;t t +s%@FFLAGS@%$FFLAGS%;t t +s%@DEFS@%$DEFS%;t t +s%@LDFLAGS@%$LDFLAGS%;t t +s%@LIBS@%$LIBS%;t t +s%@exec_prefix@%$exec_prefix%;t t +s%@prefix@%$prefix%;t t +s%@program_transform_name@%$program_transform_name%;t t +s%@bindir@%$bindir%;t t +s%@sbindir@%$sbindir%;t t +s%@libexecdir@%$libexecdir%;t t +s%@datadir@%$datadir%;t t +s%@sysconfdir@%$sysconfdir%;t t +s%@sharedstatedir@%$sharedstatedir%;t t +s%@localstatedir@%$localstatedir%;t t +s%@libdir@%$libdir%;t t +s%@includedir@%$includedir%;t t +s%@oldincludedir@%$oldincludedir%;t t +s%@infodir@%$infodir%;t t +s%@mandir@%$mandir%;t t +s%@host@%$host%;t t +s%@host_alias@%$host_alias%;t t +s%@host_cpu@%$host_cpu%;t t +s%@host_vendor@%$host_vendor%;t t +s%@host_os@%$host_os%;t t +s%@target@%$target%;t t +s%@target_alias@%$target_alias%;t t +s%@target_cpu@%$target_cpu%;t t +s%@target_vendor@%$target_vendor%;t t +s%@target_os@%$target_os%;t t +s%@build@%$build%;t t +s%@build_alias@%$build_alias%;t t +s%@build_cpu@%$build_cpu%;t t +s%@build_vendor@%$build_vendor%;t t +s%@build_os@%$build_os%;t t +s%@CC@%$CC%;t t +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%;t t +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%;t t +s%@INSTALL_DATA@%$INSTALL_DATA%;t t +s%@PACKAGE@%$PACKAGE%;t t +s%@VERSION@%$VERSION%;t t +s%@ACLOCAL@%$ACLOCAL%;t t +s%@AUTOCONF@%$AUTOCONF%;t t +s%@AUTOMAKE@%$AUTOMAKE%;t t +s%@AUTOHEADER@%$AUTOHEADER%;t t +s%@MAKEINFO@%$MAKEINFO%;t t +s%@SET_MAKE@%$SET_MAKE%;t t +s%@AR@%$AR%;t t +s%@RANLIB@%$RANLIB%;t t +s%@LD@%$LD%;t t +s%@NM@%$NM%;t t +s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%;t t +s%@LN_S@%$LN_S%;t t +s%@DLLTOOL@%$DLLTOOL%;t t +s%@AS@%$AS%;t t +s%@LIBTOOL@%$LIBTOOL%;t t +s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%;t t +s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%;t t +s%@MAINT@%$MAINT%;t t +s%@EXEEXT@%$EXEEXT%;t t +s%@CPP@%$CPP%;t t +s%@ALLOCA@%$ALLOCA%;t t +s%@USE_NLS@%$USE_NLS%;t t +s%@MSGFMT@%$MSGFMT%;t t +s%@GMSGFMT@%$GMSGFMT%;t t +s%@XGETTEXT@%$XGETTEXT%;t t +s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%;t t +s%@CATALOGS@%$CATALOGS%;t t +s%@CATOBJEXT@%$CATOBJEXT%;t t +s%@DATADIRNAME@%$DATADIRNAME%;t t +s%@GMOFILES@%$GMOFILES%;t t +s%@INSTOBJEXT@%$INSTOBJEXT%;t t +s%@INTLDEPS@%$INTLDEPS%;t t +s%@INTLLIBS@%$INTLLIBS%;t t +s%@INTLOBJS@%$INTLOBJS%;t t +s%@POFILES@%$POFILES%;t t +s%@POSUB@%$POSUB%;t t +s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%;t t +s%@GT_NO@%$GT_NO%;t t +s%@GT_YES@%$GT_YES%;t t +s%@MKINSTALLDIRS@%$MKINSTALLDIRS%;t t +s%@l@%$l%;t t +s%@HDEFINES@%$HDEFINES%;t t +s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%;t t +s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%;t t +s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%;t t +s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%;t t +s%@CC_FOR_BUILD@%$CC_FOR_BUILD%;t t +s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%;t t +s%@COREFILE@%$COREFILE%;t t +s%@COREFLAG@%$COREFLAG%;t t +s%@WIN32LDFLAGS@%$WIN32LDFLAGS%;t t +s%@WIN32LIBADD@%$WIN32LIBADD%;t t +s%@TDEFINES@%$TDEFINES%;t t +s%@wordsize@%$wordsize%;t t +s%@all_backends@%$all_backends%;t t +s%@bfd_backends@%$bfd_backends%;t t +s%@bfd_machines@%$bfd_machines%;t t +s%@tdefaults@%$tdefaults%;t t CEOF + EOF cat >> $CONFIG_STATUS <<\EOF - # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. +ac_max_sed_lines=48 +ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + sed "${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag fi - if test ! -s conftest.s$ac_file; then + if test ! -s $ac_cs_root.sfrag; then ac_more_lines=false - rm -f conftest.s$ac_file + rm -f $ac_cs_root.sfrag else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $ac_cs_root.sfrag) > $ac_cs_root.s$ac_sed_frag if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" + ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag" else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag" fi - ac_file=`expr $ac_file + 1` + ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". @@ -6228,21 +6417,33 @@ for ac_file in .. $CONFIG_FILES; do if t rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in - *Makefile*) ac_comsub="1i\\ + *[Mm]akefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` +# Don't redirect the output to AC_FILE directly: use `mv' so that updating +# is atomic, and doesn't need trapping. + ac_file_inputs=`echo $ac_file_in | sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` +EOF +cat >>$CONFIG_STATUS < $ac_file +$ac_vpsub +$extrasub +EOF +cat >>$CONFIG_STATUS <<\EOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s%@configure_input@%$configure_input%;t t +s%@srcdir@%$srcdir%;t t +s%@top_srcdir@%$top_srcdir%;t t +s%@INSTALL@%$INSTALL%;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_cs_root.out + mv $ac_cs_root.out $ac_file fi; done -rm -f conftest.s* - +rm -f $ac_cs_root.s* +EOF +cat >>$CONFIG_STATUS <<\EOF # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # @@ -6262,13 +6463,6 @@ ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in @@ -6279,9 +6473,9 @@ for ac_file in .. $CONFIG_HEADERS; do if echo creating $ac_file - rm -f conftest.frag conftest.in conftest.out + rm -f $ac_cs_root.frag $ac_cs_root.in $ac_cs_root.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + cat $ac_file_inputs > $ac_cs_root.in EOF @@ -6290,15 +6484,23 @@ EOF # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals -cat > conftest.hdr <<\EOF +cat > $ac_cs_root.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +t clear +: clear +s%^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp +t cleanup +s%^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +: cleanup s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC_DEFINE to be honored. +uniq confdefs.h | sed -n -f $ac_cs_root.hdr > conftest.vals +rm -f $ac_cs_root.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required @@ -6307,22 +6509,22 @@ cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - +# Break up conftest.vals because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS + # Write a limited-size here document to $ac_cs_root.frag. + echo ' cat > $ac_cs_root.frag <> $CONFIG_STATUS + echo '/^#[ ]*u*n*d*e*f*/!b' >> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in + sed -f $ac_cs_root.frag $ac_cs_root.in > $ac_cs_root.out + rm -f $ac_cs_root.in + mv $ac_cs_root.out $ac_cs_root.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals @@ -6331,13 +6533,13 @@ done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then + rm -f $ac_cs_root.frag $ac_cs_root.h + echo "/* $ac_file. Generated automatically by configure. */" > $ac_cs_root.h + cat $ac_cs_root.in >> $ac_cs_root.h + rm -f $ac_cs_root.in + if cmp -s $ac_file $ac_cs_root.h 2>/dev/null; then echo "$ac_file is unchanged" - rm -f conftest.h + rm -f $ac_cs_root.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -6346,11 +6548,51 @@ cat >> $CONFIG_STATUS <<\EOF test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file - mv conftest.h $ac_file + mv $ac_cs_root.h $ac_file fi fi; done +EOF +cat >> $CONFIG_STATUS <<\EOF +srcdir=$ac_given_srcdir + +for ac_file in : $CONFIG_LINKS; do if test "x$ac_file" != x:; then + ac_dest=`echo "$ac_file"|sed 's%:.*%%'` + ac_source=`echo "$ac_file"|sed 's%[^:]*:%%'` + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dest_dir_suffix= ac_dots= + fi + case "$srcdir" in + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + { echo "configure: error: cannot link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + fi +fi; done EOF + cat >> $CONFIG_STATUS < po/Makefile]) diff -up -r --new-file binutils-2.9.5.0.22/bfd/elf-bfd.h binutils-2.9.5.0.24/bfd/elf-bfd.h --- binutils-2.9.5.0.22/bfd/elf-bfd.h Thu Dec 2 08:44:00 1999 +++ binutils-2.9.5.0.24/bfd/elf-bfd.h Thu Jan 13 11:35:39 2000 @@ -157,7 +157,7 @@ struct elf_link_hash_entry /* Symbol type (STT_NOTYPE, STT_OBJECT, etc.). */ char type; - /* Symbol st_other value. */ + /* Symbol st_other value, symbol visibility. */ unsigned char other; /* Hash value of the name computed using the ELF hash function. */ diff -up -r --new-file binutils-2.9.5.0.22/bfd/elf.c binutils-2.9.5.0.24/bfd/elf.c --- binutils-2.9.5.0.22/bfd/elf.c Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.24/bfd/elf.c Thu Jan 13 11:43:43 2000 @@ -761,6 +761,7 @@ bfd_elf_print_symbol (abfd, filep, symbo CONST char *section_name; CONST char *name = NULL; struct elf_backend_data *bed; + unsigned char st_other; section_name = symbol->section ? symbol->section->name : "(*none*)"; @@ -836,10 +837,19 @@ bfd_elf_print_symbol (abfd, filep, symbo } /* If the st_other field is not zero, print it. */ - if (((elf_symbol_type *) symbol)->internal_elf_sym.st_other != 0) - fprintf (file, " 0x%02x", - ((unsigned int) - ((elf_symbol_type *) symbol)->internal_elf_sym.st_other)); + st_other = ((elf_symbol_type *) symbol)->internal_elf_sym.st_other; + + switch (st_other) + { + case 0: break; + case STV_INTERNAL: fprintf (file, " .internal"); break; + case STV_HIDDEN: fprintf (file, " .hidden"); break; + case STV_PROTECTED: fprintf (file, " .protected"); break; + default: + /* Some other non-defined flags are also present, so print + everything hex. */ + fprintf (file, " 0x%02x", (unsigned int) st_other); + } fprintf (file, " %s", name); } @@ -5040,28 +5050,33 @@ elfcore_grok_prstatus (abfd, note) #endif /* defined (HAVE_PRSTATUS_T) */ -/* There isn't a consistent prfpregset_t across platforms, - but it doesn't matter, because we don't have to pick this - data structure apart. */ +/* Create a pseudosection containing the exact contents of NOTE. This + actually creates up to two pseudosections: + - For the single-threaded case, a section named NAME, unless + such a section already exists. + - For the multi-threaded case, a section named "NAME/PID", where + PID is elfcore_make_pid (abfd). + Both pseudosections have identical contents: the contents of NOTE. */ static boolean -elfcore_grok_prfpreg (abfd, note) +elfcore_make_note_pseudosection (abfd, name, note) bfd* abfd; + char *name; Elf_Internal_Note* note; { char buf[100]; - char* name; + char *threaded_name; asection* sect; - /* Make a ".reg2/999" section. */ + /* Build the section name. */ - sprintf (buf, ".reg2/%d", elfcore_make_pid (abfd)); - name = bfd_alloc (abfd, strlen (buf) + 1); - if (name == NULL) + sprintf (buf, "%s/%d", name, elfcore_make_pid (abfd)); + threaded_name = bfd_alloc (abfd, strlen (buf) + 1); + if (threaded_name == NULL) return false; - strcpy (name, buf); + strcpy (threaded_name, buf); - sect = bfd_make_section (abfd, name); + sect = bfd_make_section (abfd, threaded_name); if (sect == NULL) return false; sect->_raw_size = note->descsz; @@ -5069,12 +5084,37 @@ elfcore_grok_prfpreg (abfd, note) sect->flags = SEC_HAS_CONTENTS; sect->alignment_power = 2; - if (! elfcore_maybe_make_sect (abfd, ".reg2", sect)) + if (! elfcore_maybe_make_sect (abfd, name, sect)) return false; return true; } + +/* There isn't a consistent prfpregset_t across platforms, + but it doesn't matter, because we don't have to pick this + data structure apart. */ +static boolean +elfcore_grok_prfpreg (abfd, note) + bfd* abfd; + Elf_Internal_Note* note; +{ + return elfcore_make_note_pseudosection (abfd, ".reg2", note); +} + + +/* Linux dumps the Intel SSE regs in a note named "LINUX" with a note + type of 5 (NT_PRXFPREG). Just include the whole note's contents + literally. */ +static boolean +elfcore_grok_prxfpreg (abfd, note) + bfd* abfd; + Elf_Internal_Note* note; +{ + return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note); +} + + #if defined (HAVE_PRPSINFO_T) # define elfcore_psinfo_t prpsinfo_t #endif @@ -5255,7 +5295,83 @@ elfcore_grok_lwpstatus (abfd, note) } #endif /* defined (HAVE_LWPSTATUS_T) */ +#if defined (HAVE_WIN32_PSTATUS_T) +static boolean +elfcore_grok_win32pstatus (abfd, note) + bfd * abfd; + Elf_Internal_Note * note; +{ + char buf[30]; + char * name; + asection * sect; + win32_pstatus_t pstatus; + + if (note->descsz < sizeof (pstatus)) + return true; + + memcpy (& pstatus, note->descdata, note->descsz); + + switch (pstatus.data_type) + { + case NOTE_INFO_PROCESS: + /* FIXME: need to add ->core_command. */ + elf_tdata (abfd)->core_signal = pstatus.data.process_info.signal; + elf_tdata (abfd)->core_pid = pstatus.data.process_info.pid; + break ; + + case NOTE_INFO_THREAD: + /* Make a ".reg/999" section. */ + sprintf (buf, ".reg/%d", pstatus.data.thread_info.tid); + + name = bfd_alloc (abfd, strlen (buf) + 1); + if (name == NULL) + return false; + + strcpy (name, buf); + + sect = bfd_make_section (abfd, name); + if (sect == NULL) + return false; + + sect->_raw_size = sizeof (pstatus.data.thread_info.thread_context); + sect->filepos = note->descpos + offsetof (struct win32_pstatus, + data.thread_info.thread_context); + sect->flags = SEC_HAS_CONTENTS; + sect->alignment_power = 2; + if (pstatus.data.thread_info.is_active_thread) + if (! elfcore_maybe_make_sect (abfd, ".reg", sect)) + return false; + break; + + case NOTE_INFO_MODULE: + /* Make a ".module/xxxxxxxx" section. */ + sprintf (buf, ".module/%08x" , pstatus.data.module_info.base_address); + + name = bfd_alloc (abfd, strlen (buf) + 1); + if (name == NULL) + return false; + + strcpy (name, buf); + + sect = bfd_make_section (abfd, name); + + if (sect == NULL) + return false; + + sect->_raw_size = note->descsz; + sect->filepos = note->descpos; + sect->flags = SEC_HAS_CONTENTS; + sect->alignment_power = 2; + break; + + default: + return true; + } + + return true; +} +#endif /* HAVE_WIN32_PSTATUS_T */ static boolean elfcore_grok_note (abfd, note) @@ -5284,6 +5400,18 @@ elfcore_grok_note (abfd, note) case NT_FPREGSET: /* FIXME: rename to NT_PRFPREG */ return elfcore_grok_prfpreg (abfd, note); + +#if defined (HAVE_WIN32_PSTATUS_T) + case NT_WIN32PSTATUS: + return elfcore_grok_win32pstatus (abfd, note); +#endif + + case NT_PRXFPREG: /* Linux SSE extension */ + if (note->namesz == 5 + && ! strcmp (note->namedata, "LINUX")) + return elfcore_grok_prxfpreg (abfd, note); + else + return true; #if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) case NT_PRPSINFO: diff -up -r --new-file binutils-2.9.5.0.22/bfd/elf32-mips.c binutils-2.9.5.0.24/bfd/elf32-mips.c --- binutils-2.9.5.0.22/bfd/elf32-mips.c Fri Nov 19 09:42:46 1999 +++ binutils-2.9.5.0.24/bfd/elf32-mips.c Thu Jan 13 11:35:40 2000 @@ -6103,6 +6103,7 @@ mips_elf_calculate_relocation (abfd, case R_MIPS_PC16: value = mips_elf_sign_extend (addend, 16) + symbol - p; + value = (bfd_vma) ((bfd_signed_vma) value / 4); overflowed_p = mips_elf_overflow_p (value, 16); break; diff -up -r --new-file binutils-2.9.5.0.22/bfd/elflink.c binutils-2.9.5.0.24/bfd/elflink.c --- binutils-2.9.5.0.22/bfd/elflink.c Sat Jul 17 13:52:28 1999 +++ binutils-2.9.5.0.24/bfd/elflink.c Thu Jan 13 11:35:41 2000 @@ -218,6 +218,32 @@ _bfd_elf_link_record_dynamic_symbol (inf boolean copy; bfd_size_type indx; + /* XXX: The ABI draft says the linker must turn hidden and + internal symbols into STB_LOCAL symbols when producing the + DSO. However, if ld.so honors st_other in the dynamic table, + this would not be necessary. */ + switch (ELF_ST_VISIBILITY (h->other)) + { + case STV_INTERNAL: + case STV_HIDDEN: + /* This symbol must be defined in the shared object or + executable. */ + if (h->root.type == bfd_link_hash_undefined) + { + bfd * abfd = h->root.u.undef.abfd; + char * name = h->root.root.string; + + (*info->callbacks->undefined_symbol) + (info, name, abfd, bfd_und_section_ptr, 0); + } + + h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; + break; + + default: + break; + } + h->dynindx = elf_hash_table (info)->dynsymcount; ++elf_hash_table (info)->dynsymcount; diff -up -r --new-file binutils-2.9.5.0.22/bfd/elflink.h binutils-2.9.5.0.24/bfd/elflink.h --- binutils-2.9.5.0.22/bfd/elflink.h Mon Nov 1 14:47:51 1999 +++ binutils-2.9.5.0.24/bfd/elflink.h Thu Jan 13 12:52:34 2000 @@ -80,6 +80,138 @@ elf_bfd_link_add_symbols (abfd, info) } } +/* Return true iff this is a non-common definition of a symbol. */ +static boolean +is_global_symbol_definition (abfd, sym) + bfd * abfd; + Elf_Internal_Sym * sym; +{ + /* Local symbols do not count, but target specific ones might. */ + if (ELF_ST_BIND (sym->st_info) != STB_GLOBAL + && ELF_ST_BIND (sym->st_info) < STB_LOOS) + return false; + + /* If the section is undefined, then so is the symbol. */ + if (sym->st_shndx == SHN_UNDEF) + return false; + + /* If the symbol is defined in the common section, then + it is a common definition and so does not count. */ + if (sym->st_shndx == SHN_COMMON) + return false; + + /* If the symbol is in a target specific section then we + must rely upon the backend to tell us what it is. */ + if (sym->st_shndx >= SHN_LORESERVE && sym->st_shndx < SHN_ABS) + /* FIXME - this function is not coded yet: + + return _bfd_is_global_symbol_definition (abfd, sym); + + Instead for now assume that the definition is not global, + Even if this is wrong, at least the linker will behave + in the same way that it used to do. */ + return false; + + return true; +} + + +/* Search the symbol table of the archive element of the archive ABFD + whoes archove map contains a mention of SYMDEF, and determine if + the symbol is defined in this element. */ +static boolean +elf_link_is_defined_archive_symbol (abfd, symdef) + bfd * abfd; + carsym * symdef; +{ + Elf_Internal_Shdr * hdr; + Elf_External_Sym * esym; + Elf_External_Sym * esymend; + Elf_External_Sym * buf = NULL; + size_t symcount; + size_t extsymcount; + size_t extsymoff; + boolean result = false; + + abfd = _bfd_get_elt_at_filepos (abfd, symdef->file_offset); + if (abfd == (bfd *) NULL) + return false; + + if (! bfd_check_format (abfd, bfd_object)) + return false; + + /* If we have already included the element containing this symbol in the + link then we do not need to include it again. Just claim that any symbol + it contains is not a definition, so that our caller will not decide to + (re)include this element. */ + if (abfd->archive_pass) + return false; + + /* Select the appropriate symbol table. */ + if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0) + hdr = &elf_tdata (abfd)->symtab_hdr; + else + hdr = &elf_tdata (abfd)->dynsymtab_hdr; + + symcount = hdr->sh_size / sizeof (Elf_External_Sym); + + /* The sh_info field of the symtab header tells us where the + external symbols start. We don't care about the local symbols. */ + if (elf_bad_symtab (abfd)) + { + extsymcount = symcount; + extsymoff = 0; + } + else + { + extsymcount = symcount - hdr->sh_info; + extsymoff = hdr->sh_info; + } + + buf = ((Elf_External_Sym *) + bfd_malloc (extsymcount * sizeof (Elf_External_Sym))); + if (buf == NULL && extsymcount != 0) + return false; + + /* Read in the symbol table. + FIXME: This ought to be cached somewhere. */ + if (bfd_seek (abfd, + hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym), + SEEK_SET) != 0 + || (bfd_read ((PTR) buf, sizeof (Elf_External_Sym), extsymcount, abfd) + != extsymcount * sizeof (Elf_External_Sym))) + { + free (buf); + return false; + } + + /* Scan the symbol table looking for SYMDEF. */ + esymend = buf + extsymcount; + for (esym = buf; + esym < esymend; + esym++) + { + Elf_Internal_Sym sym; + const char * name; + + elf_swap_symbol_in (abfd, esym, & sym); + + name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name); + if (name == (const char *) NULL) + break; + + if (strcmp (name, symdef->name) == 0) + { + result = is_global_symbol_definition (abfd, & sym); + break; + } + } + + free (buf); + + return result; +} + /* Add symbols from an ELF archive file to the linker hash table. We don't use _bfd_generic_link_add_archive_symbols because of a @@ -200,7 +332,24 @@ elf_link_add_archive_symbols (abfd, info if (h == NULL) continue; - if (h->root.type != bfd_link_hash_undefined) + if (h->root.type == bfd_link_hash_common) + { + /* We currently have a common symbol. The archive map contains + a reference to this symbol, so we may want to include it. We + only want to include it however, if this archive element + contains a definition of the symbol, not just another common + declaration of it. + + Unfortunately some archivers (including GNU ar) will put + declarations of common symbols into their archive maps, as + well as real definitions, so we cannot just go by the archive + map alone. Instead we must read in the element's symbol + table and check that to see what kind of symbol definition + this is. */ + if (! elf_link_is_defined_archive_symbol (abfd, symdef)) + continue; + } + else if (h->root.type != bfd_link_hash_undefined) { if (h->root.type != bfd_link_hash_undefweak) defined[i] = true; @@ -1293,7 +1442,13 @@ elf_link_add_object_symbols (abfd, info) strcpy (newname, name); p = newname + namelen; *p++ = ELF_VER_CHR; - if ((iver.vs_vers & VERSYM_HIDDEN) == 0) + /* For the undefined versioned symbol, we always + reference the hidden version. The default version + will resolve the reference to the hidden one. It + solves the problem where a version changes from + default to hidden. */ + if ((iver.vs_vers & VERSYM_HIDDEN) == 0 + && sym.st_shndx != SHN_UNDEF) *p++ = ELF_VER_CHR; strcpy (p, verstr); @@ -1417,9 +1572,24 @@ elf_link_add_object_symbols (abfd, info) h->type = ELF_ST_TYPE (sym.st_info); } - if (sym.st_other != 0 - && (definition || h->other == 0)) - h->other = sym.st_other; + /* If st_other has a processor-specific meaning, specific code + might be needed here. */ + if (sym.st_other != 0) + { + /* Combine visibilities, using the most constraining one. */ + unsigned char hvis = ELF_ST_VISIBILITY (h->other); + unsigned char symvis = ELF_ST_VISIBILITY (sym.st_other); + + if (symvis && (hvis > symvis || hvis == 0)) + h->other = sym.st_other; + + /* If neither has visibility, use the st_other of the + definition. This is an arbitrary choice, since the + other bits have no general meaning. */ + if (!symvis && !hvis + && (definition || h->other == 0)) + h->other = sym.st_other; + } /* Set a flag in the hash table entry indicating the type of reference or definition we just found. Keep a count of @@ -2654,20 +2824,6 @@ NAME(bfd_elf,size_dynamic_sections) (out if (dynobj == NULL) return true; - /* If we are supposed to export all symbols into the dynamic symbol - table (this is not the normal case), then do so. */ - if (export_dynamic) - { - struct elf_info_failed eif; - - eif.failed = false; - eif.info = info; - elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol, - (PTR) &eif); - if (eif.failed) - return false; - } - if (elf_hash_table (info)->dynamic_sections_created) { struct elf_info_failed eif; @@ -2728,6 +2884,20 @@ NAME(bfd_elf,size_dynamic_sections) (out || ! elf_add_dynamic_entry (info, DT_AUXILIARY, indx)) return false; } + } + + /* If we are supposed to export all symbols into the dynamic symbol + table (this is not the normal case), then do so. */ + if (export_dynamic) + { + struct elf_info_failed eif; + + eif.failed = false; + eif.info = info; + elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol, + (PTR) &eif); + if (eif.failed) + return false; } /* Attach all the symbols to their version information. */ diff -up -r --new-file binutils-2.9.5.0.22/bfd/peicode.h binutils-2.9.5.0.24/bfd/peicode.h --- binutils-2.9.5.0.22/bfd/peicode.h Mon Sep 13 09:36:54 1999 +++ binutils-2.9.5.0.24/bfd/peicode.h Thu Jan 13 11:35:44 2000 @@ -361,3 +361,87 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd _bfd_pe_bfd_copy_private_section_data #define coff_get_symbol_info _bfd_pe_get_symbol_info + +#ifdef COFF_IMAGE_WITH_PE +static const bfd_target * +pe_bfd_object_p (abfd) + bfd * abfd; +{ + /* We need to handle a PE image correctly. In PE images created by + the GNU linker, the offset to the COFF header is always the size. + However, this is not the case in images generated by other PE + linkers. The PE format stores a four byte offset to the PE + signature just before the COFF header at location 0x3c of the file. + We pick up that offset, verify that the PE signature is there, and + then set ourselves up to read in the COFF header. */ + bfd_byte buffer[4]; + file_ptr offset; + unsigned long signature; + + /* Detect if this a Microsoft Import Library Format element. */ + if (bfd_seek (abfd, 0x00, SEEK_SET) != 0 + || bfd_read (buffer, 1, 4, abfd) != 4) + { + if (bfd_get_error () != bfd_error_system_call) + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + + signature = bfd_h_get_32 (abfd, buffer); + + if (signature == 0xffff0000) + { + _bfd_error_handler ( +_("%s: Import Library Format archives are not currently supported"), + bfd_get_filename (abfd)); + bfd_set_error (bfd_error_wrong_format); + + return NULL; + } + + if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0 + || bfd_read (buffer, 1, 4, abfd) != 4) + { + if (bfd_get_error () != bfd_error_system_call) + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + + offset = bfd_h_get_32 (abfd, buffer); + + if (bfd_seek (abfd, offset, SEEK_SET) != 0 + || bfd_read (buffer, 1, 4, abfd) != 4) + { + if (bfd_get_error () != bfd_error_system_call) + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + + signature = bfd_h_get_32 (abfd, buffer); + + if (signature != 0x4550) + { + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + + /* Here is the hack. coff_object_p wants to read filhsz bytes to + pick up the COFF header. We adjust so that that will work. 20 + is the size of the i386 COFF filehdr. */ + if (bfd_seek (abfd, + (bfd_tell (abfd) + - bfd_coff_filhsz (abfd) + + 20), + SEEK_SET) + != 0) + { + if (bfd_get_error () != bfd_error_system_call) + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + + return coff_object_p (abfd); +} + +#define coff_object_p pe_bfd_object_p +#endif diff -up -r --new-file binutils-2.9.5.0.22/binutils/ChangeLog binutils-2.9.5.0.24/binutils/ChangeLog --- binutils-2.9.5.0.22/binutils/ChangeLog Thu Dec 2 08:44:17 1999 +++ binutils-2.9.5.0.24/binutils/ChangeLog Thu Jan 13 11:35:45 2000 @@ -1,3 +1,120 @@ +2000-01-11 Nick Clifton + + * readelf.c (get_dynamic_type): Remove DT_ENCODING. + +2000-01-10 Nick Clifton + + * readelf.c (get_note_type): Display NT_WIN32PSTATUS notes. + +2000-01-07 Mumit Khan + + * windres.c (long_options): Add --use-temp-file and + --no-use-temp-file options. + (usage): Document. + (main): Handle. + + * windres.h: Update read_rc_file prototype. + + * resrc.c (cpp_temp_file): New static variable. + (istream_type): New static variable. + (close_pipe): Delete function. + (run_cmd): New static function. + (open_input_stream): New static function. + (close_input_stream): New static function. + (look_for_default): Handle DOS directory separator. Use + open_input_stream instead of popen. + (read_rc_file): Likewise. + + * binutils.texi: Document --use-temp-file, --no-use-temp-file + options. + +2000-01-04 Mumit Khan + + * dlltool.c (create_compat_implib): New variable. + (gen_exp_file): Use. + (make_one_lib_file): Use. + (long_options): Add --compat-implib option. + (usage): Handle. + (main): Handle. + + * dllwrap.c (enum target_type): Rename MINGW32_TARGET to MINGW_TARGET. + (main): Use. Don't look for "32" in cygwin and mingw target names. + +2000-01-03 Nick Clifton + + * binutils.texi: Document new, ARM specific disassembler + command line switch "-M force-thumb". + +1999-12-28 Nick Clifton + + * readelf.c: Update with new constants added by Oct 4, 1999 + ELF ABI draft. + (guess_is_rela): Add new machine codes, but leave + rel type undetermined. + (get_machine_name): Add new machine codes. + (get_section_type_name): Add new section types. + (get_elf_section_flags): New funciton: Decode section flags. + (process_section_headers): Call get_elf_section_flags() in + order to decode flags in section header. + (get_dynamic_flags): New function: Decode dynamic section + flags. + (process_dynamic_section): Display flags (if present). + (get_symbol_type): Add STT_COMMON. + (get_symbol_visibility): New function: Decode a symbol's + visibility. + (process_symbol_table): Call get_symbol_visibility(). + (get_note_type): Add NT_PRXFPREGS. + +1999-12-26 Ian Lance Taylor + + * strings.c (main): Correct handling of numeric argument. + +1999-12-23 Andrew Haley + + * dlltool.c (mtable): mcore how_jtab_roff is 4 bytes into the + jtab; was 8. + +1999-12-17 Nick Clifton + + * dlltool.c (mtable): Stop compile time warnings about missing + initialisers. + (yyerror): Stop compile time warnings about unused paramater. + (INIT_SEC_DATA): New macro: initialise an entry in the secdata + array. + (secdata): Stop ccompile time warnings about uninitialised + fields. + (dtab): Stop compile time warnings about unused parameter. + (long_options): Stop compile time warning about missing + initialiser. + +1999-12-10 Nick Clifton + + * readelf.c (print_vma): Support native 64bit ELF systems. + +1999-12-09 Nick Clifton + + * dlltool.c (mtable): Add epoc-arm specific entry. + Make default arm entry pass -mpacs-26 to assembler. + (flush_page): Do not mangle null entries. + +1999-12-07 H . J . Lu hjl@valinux.com + + * readelf.c: Fix compile time warnings. Support more than 999 + symbols. + +1999-12-03 Nick Clifton + + * readelf.c (enum print_mode): New type. + (print_vma): New function. + (dump_relocations): Use print_vma to display bfd_vma values. + (process_file_header): Use print_vma to display bfd_vma values. + (process_program_headers): Use print_vma to display bfd_vma values. + (process_section_headers): Use print_vma to display bfd_vma values. + (dynamic_segment_parisc_val): Use print_vma to display bfd_vma values. + (process_dynamic_segment): Use print_vma to display bfd_vma values. + (process_symbol_table): Use print_vma to display bfd_vma values. + (process_mips_specific): Use print_vma to display bfd_vma values. + 1999-11-25 Fred Fish * readelf.c (process_note): Change arg from Elf_External_Note diff -up -r --new-file binutils-2.9.5.0.22/binutils/binutils.texi binutils-2.9.5.0.24/binutils/binutils.texi --- binutils-2.9.5.0.22/binutils/binutils.texi Mon Nov 22 09:13:05 1999 +++ binutils-2.9.5.0.24/binutils/binutils.texi Thu Jan 13 11:35:46 2000 @@ -26,7 +26,7 @@ END-INFO-DIR-ENTRY @end ifinfo @ifinfo -Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -54,7 +54,7 @@ into another language, under the above c @c This file documents the GNU binary utilities "ar", "ld", "objcopy", @c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib". @c -@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. @c @c This text may be freely distributed under the terms of the GNU @c General Public License. @@ -1354,6 +1354,12 @@ select the name set used by the ARM Proc specifying @samp{--disassembler-options=reg-names-raw} will just use @samp{r} followed by the register number. +This option can also be used for ARM architectures to force the +disassembler to interpret all instructions as THUMB instructions by +using the switch @samp{--disassembler-options=force-thumb}. This can be +useful when attempting to disassemble thumb code produced by other +compilers. + @item -p @itemx --private-headers Print information that is specific to the object file format. The exact @@ -2133,6 +2139,17 @@ didn't specify one. Specify the default language to use when reading an @code{rc} file. @var{val} should be a hexadecimal language code. The low eight bits are the language, and the high eight bits are the sublanguage. + +@item --use-temp-file +Use a temporary file to instead of using popen to read the output of +the preprocessor. Use this option if the popen implementation is buggy +on the host (eg., certain non-English language versions of Windows 95 and +Windows 98 are known to have buggy popen where the output will instead +go the console). + +@item --no-use-temp-file +Use popen, not a temporary file, to read the output of the preprocessor. +This is the default behaviour. @item --help Prints a usage summary. diff -up -r --new-file binutils-2.9.5.0.22/binutils/dlltool.c binutils-2.9.5.0.24/binutils/dlltool.c --- binutils-2.9.5.0.22/binutils/dlltool.c Thu Nov 4 09:49:08 1999 +++ binutils-2.9.5.0.24/binutils/dlltool.c Thu Jan 13 11:35:46 2000 @@ -1,5 +1,5 @@ /* dlltool.c -- tool to generate stuff for PE style DLLs - Copyright (C) 1995, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -367,6 +367,10 @@ static boolean do_default_excludes; /* Default symbols to exclude when exporting all the symbols. */ static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr"; +/* True if we should add __imp_ to import libraries for backward + compatibility to old Cygwin releases. */ +static boolean create_compat_implib; + static char *def_file; extern char * program_name; @@ -512,7 +516,7 @@ mtable[] = #define MARM 0 "arm", ".byte", ".short", ".long", ".asciz", "@", "ldr\tip,[pc]\n\tldr\tpc,[ip]\n\t.long", - ".global", ".space", ".align\t2",".align\t4", "", + ".global", ".space", ".align\t2",".align\t4", "-mapcs-32", "pe-arm-little", bfd_arch_arm, arm_jtab, sizeof (arm_jtab), 8 } @@ -537,7 +541,7 @@ mtable[] = #define MTHUMB 3 "thumb", ".byte", ".short", ".long", ".asciz", "@", "push\t{r6}\n\tldr\tr6, [pc, #8]\n\tldr\tr6, [r6]\n\tmov\tip, r6\n\tpop\t{r6}\n\tbx\tip", - ".global", ".space", ".align\t2",".align\t4", "=mthumb-interwork", + ".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork", "pe-arm-little", bfd_arch_arm, thumb_jtab, sizeof (thumb_jtab), 12 } @@ -557,7 +561,7 @@ mtable[] = "jmpi\t1\n\tnop\n\t.long", ".global", ".space", ".align\t2",".align\t4", "", "pe-mcore-big", bfd_arch_mcore, - mcore_be_jtab, sizeof (mcore_be_jtab), 8 + mcore_be_jtab, sizeof (mcore_be_jtab), 4 } , { @@ -566,7 +570,7 @@ mtable[] = "jmpi\t1\n\tnop\n\t.long", ".global", ".space", ".align\t2",".align\t4", "-EL", "pe-mcore-little", bfd_arch_mcore, - mcore_le_jtab, sizeof (mcore_le_jtab), 8 + mcore_le_jtab, sizeof (mcore_le_jtab), 4 } , { @@ -575,7 +579,7 @@ mtable[] = "jmpi\t1\n\tnop\n\t.long", ".global", ".space", ".align\t2",".align\t4", "", "elf32-mcore-big", bfd_arch_mcore, - mcore_be_jtab, sizeof (mcore_be_jtab), 8 + mcore_be_jtab, sizeof (mcore_be_jtab), 4 } , { @@ -584,10 +588,19 @@ mtable[] = "jmpi\t1\n\tnop\n\t.long", ".global", ".space", ".align\t2",".align\t4", "-EL", "elf32-mcore-little", bfd_arch_mcore, - mcore_le_jtab, sizeof (mcore_le_jtab), 8 + mcore_le_jtab, sizeof (mcore_le_jtab), 4 + } + , + { +#define MARM_EPOC 9 + "arm", ".byte", ".short", ".long", ".asciz", "@", + "ldr\tip,[pc]\n\tldr\tpc,[ip]\n\t.long", + ".global", ".space", ".align\t2",".align\t4", "", + "epoc-pe-arm-little", bfd_arch_arm, + arm_jtab, sizeof (arm_jtab), 8 } , - { 0 } + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; typedef struct dlist @@ -859,7 +872,7 @@ static int d_is_exe; int yyerror (err) - const char *err; + const char * err ATTRIBUTE_UNUSED; { /* xgettext:c-format */ warn (_("Syntax error in def file %s:%d\n"), def_file, linenumber); @@ -1220,7 +1233,7 @@ scan_drectve_symbols (abfd) /* Search for -export: strings. The exported symbols can optionally have type tags (eg., -export:foo,data), so handle those as well. - Currently only data tag is supported. */ + Currently only data tag is supported. */ p = buf; e = buf + size; while (p < e) @@ -1248,7 +1261,6 @@ scan_drectve_symbols (abfd) flags &= ~BSF_FUNCTION; } - /* FIXME: The 5th arg is for the `constant' field. What should it be? Not that it matters since it's not currently useful. */ @@ -1259,7 +1271,7 @@ scan_drectve_symbols (abfd) char *exported_name = xstrdup (c); char *atsym = strchr (exported_name, '@'); *atsym = '\0'; - /* Note: stdcall alias symbols can never be data. */ + /* Note: stdcall alias symbols can never be data. */ def_exports (exported_name, xstrdup (c), -1, 0, 0, 0); } } @@ -1302,7 +1314,7 @@ scan_filtered_symbols (abfd, minisyms, s ++symbol_name; def_exports (xstrdup (symbol_name) , 0, -1, 0, 0, - ! (sym->flags & BSF_FUNCTION)); + ! (sym->flags & BSF_FUNCTION)); if (add_stdcall_alias && strchr (symbol_name, '@')) { @@ -1574,9 +1586,15 @@ flush_page (f, need, page_addr, on_page) ASM_C); for (i = 0; i < on_page; i++) - fprintf (f, "\t%s\t0x%lx\n", ASM_SHORT, - ((need[i] - page_addr) | 0x3000) & 0xffff); - + { + long needed = need[i]; + + if (needed) + needed = ((needed - page_addr) | 0x3000) & 0xffff; + + fprintf (f, "\t%s\t0x%lx\n", ASM_SHORT, needed); + } + /* And padding */ if (on_page & 1) fprintf (f, "\t%s\t0x%x\n", ASM_SHORT, 0 | 0x0000); @@ -1865,9 +1883,9 @@ gen_exp_file () { char *p; int l; - /* We dont output as ascii 'cause there can - be quote characters in the string */ - + + /* We don't output as ascii because there can + be quote characters in the string. */ l = 0; for (p = dl->text; *p; p++) { @@ -1893,7 +1911,7 @@ gen_exp_file () /* Add to the output file a way of getting to the exported names - without using the import library. */ + without using the import library. */ if (add_indirect) { fprintf (f, "\t.section\t.rdata\n"); @@ -1903,9 +1921,11 @@ gen_exp_file () /* We use a single underscore for MS compatibility, and a double underscore for backward compatibility with old cygwin releases. */ - fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name); + if (create_compat_implib) + fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name); fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name); - fprintf (f, "__imp_%s:\n", exp->name); + if (create_compat_implib) + fprintf (f, "__imp_%s:\n", exp->name); fprintf (f, "_imp__%s:\n", exp->name); fprintf (f, "\t%s\t%s\n", ASM_LONG, exp->name); } @@ -2052,15 +2072,16 @@ typedef struct #define NSECS 7 +#define INIT_SEC_DATA(id, name, flags, align) { id, name, flags, align, NULL, NULL, NULL, 0, NULL } static sinfo secdata[NSECS] = { - { TEXT, ".text", SEC_CODE | SEC_HAS_CONTENTS, 2}, - { DATA, ".data", SEC_DATA, 2}, - { BSS, ".bss", 0, 2}, - { IDATA7, ".idata$7", SEC_HAS_CONTENTS, 2}, - { IDATA5, ".idata$5", SEC_HAS_CONTENTS, 2}, - { IDATA4, ".idata$4", SEC_HAS_CONTENTS, 2}, - { IDATA6, ".idata$6", SEC_HAS_CONTENTS, 1} + INIT_SEC_DATA (TEXT, ".text", SEC_CODE | SEC_HAS_CONTENTS, 2), + INIT_SEC_DATA (DATA, ".data", SEC_DATA, 2), + INIT_SEC_DATA (BSS, ".bss", 0, 2), + INIT_SEC_DATA (IDATA7, ".idata$7", SEC_HAS_CONTENTS, 2), + INIT_SEC_DATA (IDATA5, ".idata$5", SEC_HAS_CONTENTS, 2), + INIT_SEC_DATA (IDATA4, ".idata$4", SEC_HAS_CONTENTS, 2), + INIT_SEC_DATA (IDATA6, ".idata$6", SEC_HAS_CONTENTS, 1) }; #else @@ -2163,10 +2184,12 @@ make_one_lib_file (exp, i) f = fopen (name, FOPEN_WT); fprintf (f, "\t.text\n"); fprintf (f, "\t%s\t%s%s\n", ASM_GLOBAL, ASM_PREFIX, exp->name); - fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name); + if (create_compat_implib) + fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name); fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name); - fprintf (f, "%s%s:\n\t%s\t__imp_%s\n", ASM_PREFIX, - exp->name, ASM_JUMP, exp->name); + if (create_compat_implib) + fprintf (f, "%s%s:\n\t%s\t__imp_%s\n", ASM_PREFIX, + exp->name, ASM_JUMP, exp->name); fprintf (f, "\t.section\t.idata$7\t%s To force loading of head\n", ASM_C); fprintf (f, "\t%s\t%s\n", ASM_LONG, head_label); @@ -2175,7 +2198,8 @@ make_one_lib_file (exp, i) fprintf (f,"%s Import Address Table\n", ASM_C); fprintf (f, "\t.section .idata$5\n"); - fprintf (f, "__imp_%s:\n", exp->name); + if (create_compat_implib) + fprintf (f, "__imp_%s:\n", exp->name); fprintf (f, "_imp__%s:\n", exp->name); dump_iat (f, exp); @@ -2296,13 +2320,16 @@ make_one_lib_file (exp, i) /* Generate imp symbols with one underscore for Microsoft compatibility, and with two underscores for backward compatibility with old versions of cygwin. */ - iname = bfd_make_empty_symbol(abfd); - iname->name = make_label ("__imp_", exp->name); - iname->section = secdata[IDATA5].sec; - iname->flags = BSF_GLOBAL; - iname->value = 0; + if (create_compat_implib) + { + iname = bfd_make_empty_symbol (abfd); + iname->name = make_label ("__imp_", exp->name); + iname->section = secdata[IDATA5].sec; + iname->flags = BSF_GLOBAL; + iname->value = 0; + } - iname2 = bfd_make_empty_symbol(abfd); + iname2 = bfd_make_empty_symbol (abfd); iname2->name = make_label ("_imp__", exp->name); iname2->section = secdata[IDATA5].sec; iname2->flags = BSF_GLOBAL; @@ -2317,7 +2344,8 @@ make_one_lib_file (exp, i) iname_pp = ptrs + oidx; - ptrs[oidx++] = iname; + if (create_compat_implib) + ptrs[oidx++] = iname; ptrs[oidx++] = iname2; iname_lab_pp = ptrs + oidx; @@ -2862,7 +2890,11 @@ remove_null_names (ptr) static void dtab (ptr) - export_type **ptr; + export_type ** ptr +#ifndef SACDEBUG +ATTRIBUTE_UNUSED +#endif + ; { #ifdef SACDEBUG int i; @@ -3112,6 +3144,7 @@ usage (file, status) fprintf (file, _(" -A --add-stdcall-alias Add aliases without @.\n")); fprintf (file, _(" -S --as Use for assembler.\n")); fprintf (file, _(" -f --as-flags Pass to the assembler.\n")); + fprintf (file, _(" -C --compat-implib Create backward compatible import library.\n")); fprintf (file, _(" -n --no-delete Keep temp files (repeat for extra preservation).\n")); fprintf (file, _(" -v --verbose Be verbose.\n")); fprintf (file, _(" -V --version Display the program version.\n")); @@ -3156,7 +3189,8 @@ static const struct option long_options[ {"as", required_argument, NULL, 'S'}, {"as-flags", required_argument, NULL, 'f'}, {"mcore-elf", required_argument, NULL, 'M'}, - {0} + {"compat-implib", no_argument, NULL, 'C'}, + {NULL,0,NULL,0} }; int @@ -3178,9 +3212,9 @@ main (ac, av) while ((c = getopt_long (ac, av, #ifdef DLLTOOL_MCORE_ELF - "m:e:l:aD:d:z:b:xcuUkAS:f:nvVhM:L:F:", + "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVhM:L:F:", #else - "m:e:l:aD:d:z:b:xcuUkAS:f:nvVh", + "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVh", #endif long_options, 0)) != EOF) @@ -3276,6 +3310,9 @@ main (ac, av) mcore_elf_linker_flags = optarg; break; #endif + case 'C': + create_compat_implib = 1; + break; default: usage (stderr, 1); break; diff -up -r --new-file binutils-2.9.5.0.22/binutils/dllwrap.c binutils-2.9.5.0.24/binutils/dllwrap.c --- binutils-2.9.5.0.22/binutils/dllwrap.c Sat Jun 26 18:02:31 1999 +++ binutils-2.9.5.0.24/binutils/dllwrap.c Thu Jan 13 11:35:46 2000 @@ -1,5 +1,5 @@ /* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Mumit Khan (khan@xraylith.wisc.edu). This file is part of GNU Binutils. @@ -94,7 +94,7 @@ static char *target = TARGET; typedef enum { UNKNOWN_TARGET, CYGWIN_TARGET, - MINGW32_TARGET + MINGW_TARGET } target_type; @@ -830,10 +830,10 @@ main (argc, argv) } /* set the target platform. */ - if (strstr (target, "cygwin32")) + if (strstr (target, "cygwin")) which_target = CYGWIN_TARGET; - else if (strstr (target, "mingw32")) - which_target = MINGW32_TARGET; + else if (strstr (target, "mingw")) + which_target = MINGW_TARGET; else which_target = UNKNOWN_TARGET; @@ -869,7 +869,7 @@ main (argc, argv) driver_flags = cygwin_driver_flags; break; - case MINGW32_TARGET: + case MINGW_TARGET: driver_flags = mingw32_driver_flags; break; @@ -890,7 +890,7 @@ main (argc, argv) entry_point = "__cygwin_dll_entry@12"; break; - case MINGW32_TARGET: + case MINGW_TARGET: entry_point = "_DllMainCRTStartup@12"; break; diff -up -r --new-file binutils-2.9.5.0.22/binutils/readelf.c binutils-2.9.5.0.24/binutils/readelf.c --- binutils-2.9.5.0.22/binutils/readelf.c Thu Dec 2 09:14:51 1999 +++ binutils-2.9.5.0.24/binutils/readelf.c Thu Jan 13 11:43:43 2000 @@ -126,7 +126,21 @@ unsigned int num_dump_sects = 0; #define DISASS_DUMP (1 << 1) #define DEBUG_DUMP (1 << 2) +/* How to rpint a vma value. */ +typedef enum print_mode +{ + HEX, + DEC, + DEC_5, + UNSIGNED, + PREFIX_HEX, + FULL_HEX, + LONG_HEX +} +print_mode; + /* Forward declarations for dumb compilers. */ +static void print_vma PARAMS ((bfd_vma, print_mode)); static bfd_vma (* byte_get) PARAMS ((unsigned char *, int)); static bfd_vma byte_get_little_endian PARAMS ((unsigned char *, int)); static bfd_vma byte_get_big_endian PARAMS ((unsigned char *, int)); @@ -144,8 +158,11 @@ static const char * get_segment_ty static const char * get_mips_section_type_name PARAMS ((unsigned int)); static const char * get_parisc_section_type_name PARAMS ((unsigned int)); static const char * get_section_type_name PARAMS ((unsigned int)); -static char * get_symbol_binding PARAMS ((unsigned int)); -static char * get_symbol_type PARAMS ((unsigned int)); +static const char * get_symbol_binding PARAMS ((unsigned int)); +static const char * get_symbol_type PARAMS ((unsigned int)); +static const char * get_symbol_visibility PARAMS ((unsigned int)); +static const char * get_symbol_index_type PARAMS ((unsigned int)); +static const char * get_dynamic_flags PARAMS ((bfd_vma)); static void usage PARAMS ((void)); static void parse_args PARAMS ((int, char **)); static int process_file_header PARAMS ((void)); @@ -160,7 +177,6 @@ static void process_file static int process_relocs PARAMS ((FILE *)); static int process_version_sections PARAMS ((FILE *)); static char * get_ver_flags PARAMS ((unsigned int)); -static char * get_symbol_index_type PARAMS ((unsigned int)); static int get_32bit_section_headers PARAMS ((FILE *)); static int get_64bit_section_headers PARAMS ((FILE *)); static int get_32bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *)); @@ -201,7 +217,7 @@ static const char * get_osabi_name static int guess_is_rela PARAMS ((unsigned long)); static char * get_note_type PARAMS ((unsigned int)); static int process_note PARAMS ((Elf32_Internal_Note *)); -static int process_corefile_note_segment PARAMS ((FILE *, unsigned long, unsigned long)); +static int process_corefile_note_segment PARAMS ((FILE *, bfd_vma, bfd_vma)); static int process_corefile_note_segments PARAMS ((FILE *)); static int process_corefile_contents PARAMS ((FILE *)); @@ -378,6 +394,95 @@ byte_get_little_endian (field, size) } } +/* Print a VMA value. */ +static void +print_vma (vma, mode) + bfd_vma vma; + print_mode mode; +{ +#ifdef BFD64 + if (is_32bit_elf) +#endif + { + switch (mode) + { + case FULL_HEX: printf ("0x"); /* drop through */ + case LONG_HEX: printf ("%8.8lx", (unsigned long) vma); break; + case PREFIX_HEX: printf ("0x"); /* drop through */ + case HEX: printf ("%lx", (unsigned long) vma); break; + case DEC: printf ("%ld", (unsigned long) vma); break; + case DEC_5: printf ("%5ld", (long) vma); break; + case UNSIGNED: printf ("%lu", (unsigned long) vma); break; + } + } +#ifdef BFD64 + else + { + switch (mode) + { + case FULL_HEX: + printf ("0x"); + /* drop through */ + + case LONG_HEX: + printf_vma (vma); + break; + + case PREFIX_HEX: + printf ("0x"); + /* drop through */ + + case HEX: +#if BFD_HOST_64BIT_LONG + printf ("%lx", vma); +#else + if (_bfd_int64_high (vma)) + printf ("%lx%lx", _bfd_int64_high (vma), _bfd_int64_low (vma)); + else + printf ("%lx", _bfd_int64_low (vma)); +#endif + break; + + case DEC: +#if BFD_HOST_64BIT_LONG + printf ("%ld", vma); +#else + if (_bfd_int64_high (vma)) + /* ugg */ + printf ("++%ld", _bfd_int64_low (vma)); + else + printf ("%ld", _bfd_int64_low (vma)); +#endif + break; + + case DEC_5: +#if BFD_HOST_64BIT_LONG + printf ("%5ld", vma); +#else + if (_bfd_int64_high (vma)) + /* ugg */ + printf ("++%ld", _bfd_int64_low (vma)); + else + printf ("%5ld", _bfd_int64_low (vma)); +#endif + break; + + case UNSIGNED: +#if BFD_HOST_64BIT_LONG + printf ("%lu", vma); +#else + if (_bfd_int64_high (vma)) + /* ugg */ + printf ("++%lu", _bfd_int64_low (vma)); + else + printf ("%lu", _bfd_int64_low (vma)); +#endif + break; + } + } +#endif +} + static bfd_vma byte_get_big_endian (field, size) unsigned char * field; @@ -462,6 +567,24 @@ guess_is_rela (e_machine) case EM_MCORE: return TRUE; + case EM_MMA: + case EM_PCP: + case EM_NCPU: + case EM_NDR1: + case EM_STARCORE: + case EM_ME16: + case EM_ST100: + case EM_TINYJ: + case EM_FX66: + case EM_ST9PLUS: + case EM_ST7: + case EM_68HC16: + case EM_68HC11: + case EM_68HC08: + case EM_68HC05: + case EM_SVX: + case EM_ST19: + case EM_VAX: default: warn (_("Don't know about relocations on this machine architecture\n")); return FALSE; @@ -772,7 +895,9 @@ dump_relocations (file, rel_offset, rel_ psym = symtab + symtab_index; - printf (" %08lx ", (unsigned long) psym->st_value); + printf (" "); + print_vma (psym->st_value, LONG_HEX); + printf (" "); if (psym->st_name == 0) printf ("%-25.25s", @@ -788,7 +913,10 @@ dump_relocations (file, rel_offset, rel_ } } else if (is_rela) - printf ("%34c%lx", ' ', (unsigned long) relas[i].r_addend); + { + printf ("%*c", is_32bit_elf ? 34 : 26, ' '); + print_vma (relas[i].r_addend, LONG_HEX); + } if (elf_header.e_machine == EM_SPARCV9 && !strcmp (rtype, "R_SPARC_OLO10")) @@ -929,6 +1057,11 @@ get_dynamic_type (type) case DT_FINI_ARRAY: return "FINI_ARRAY"; case DT_INIT_ARRAYSZ: return "INIT_ARRAYSZ"; case DT_FINI_ARRAYSZ: return "FINI_ARRAYSZ"; + case DT_RUNPATH: return "RUNPATH"; + case DT_FLAGS: return "FLAGS"; + + case DT_PREINIT_ARRAY: return "PREINIT_ARRAY"; + case DT_PREINIT_ARRAYSZ: return "PREINIT_ARRAYSZ"; case DT_PLTPADSZ: return "PLTPADSZ"; case DT_MOVEENT: return "MOVEENT"; @@ -1034,7 +1167,7 @@ static char * get_machine_name (e_machine) unsigned e_machine; { - static char buff [32]; + static char buff [64]; /* XXX */ switch (e_machine) { @@ -1046,7 +1179,7 @@ get_machine_name (e_machine) case EM_88K: return "MC88000"; case EM_486: return "Intel 80486"; case EM_860: return "Intel 80860"; - case EM_MIPS: return "MIPS R3000 big-endian"; + case EM_MIPS: return "MIPS R3000"; case EM_S370: return "IBM System/370"; case EM_MIPS_RS4_BE: return "MIPS R4000 big-endian"; case EM_OLD_SPARCV9: return "Sparc v9 (old)"; @@ -1069,7 +1202,7 @@ get_machine_name (e_machine) case EM_H8_300H: return "Hitachi H8/300H"; case EM_H8S: return "Hitachi H8S"; case EM_H8_500: return "Hitachi H8/500"; - case EM_IA_64: return "Intel Merced"; + case EM_IA_64: return "Intel IA-64"; case EM_MIPS_X: return "Stanford MIPS-X"; case EM_COLDFIRE: return "Motorola Coldfire"; case EM_68HC12: return "Motorola M68HC12"; @@ -1083,6 +1216,24 @@ get_machine_name (e_machine) case EM_CYGNUS_MN10200: return "mn10200"; case EM_CYGNUS_FR30: return "Fujitsu FR30"; case EM_PJ: return "picoJava"; + case EM_MMA: return "Fujitsu Multimedia Accelerator"; + case EM_PCP: return "Siemens PCP"; + case EM_NCPU: return "Sony nCPU embedded RISC processor"; + case EM_NDR1: return "Denso NDR1 microprocesspr"; + case EM_STARCORE: return "Motorola Star*Core processor"; + case EM_ME16: return "Toyota ME16 processor"; + case EM_ST100: return "STMicroelectronics ST100 processor"; + case EM_TINYJ: return "Advanced Logic Corp. TinyJ embedded processor"; + case EM_FX66: return "Siemens FX66 microcontroller"; + case EM_ST9PLUS: return "STMicroelectronics ST9+ 8/16 bit microcontroller"; + case EM_ST7: return "STMicroelectronics ST7 8-bit microcontroller"; + case EM_68HC16: return "Motorola MC68HC16 Microcontroller"; + case EM_68HC11: return "Motorola MC68HC11 Microcontroller"; + case EM_68HC08: return "Motorola MC68HC08 Microcontroller"; + case EM_68HC05: return "Motorola MC68HC05 Microcontroller"; + case EM_SVX: return "Silicon Graphics SVx"; + case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller"; + case EM_VAX: return "Digital VAX"; default: sprintf (buff, _(": %x"), e_machine); return buff; @@ -1097,6 +1248,7 @@ get_machine_flags (e_flags, e_machine) static char buf [1024]; buf[0] = '\0'; + if (e_flags) { switch (e_machine) @@ -1224,7 +1376,8 @@ get_machine_flags (e_flags, e_machine) strcat (buf, ", no kabp"); if (e_flags & EF_PARISC_LAZYSWAP) strcat (buf, ", lazyswap"); - + break; + case EM_PJ: if ((e_flags & EF_PICOJAVA_NEWCALLS) == EF_PICOJAVA_NEWCALLS) strcat (buf, ", new calling convention"); @@ -1436,6 +1589,9 @@ get_section_type_name (sh_type) case SHT_REL: return "REL"; case SHT_SHLIB: return "SHLIB"; case SHT_DYNSYM: return "DYNSYM"; + case SHT_INIT_ARRAY: return "INIT_ARRAY"; + case SHT_FINI_ARRAY: return "FINI_ARRAY"; + case SHT_PREINIT_ARRAY: return "PREINIT_ARRAY"; case SHT_GNU_verdef: return "VERDEF"; case SHT_GNU_verneed: return "VERNEED"; case SHT_GNU_versym: return "VERSYM"; @@ -1831,12 +1987,15 @@ process_file_header () get_machine_name (elf_header.e_machine)); printf (_(" Version: 0x%lx\n"), (unsigned long) elf_header.e_version); - printf (_(" Entry point address: 0x%lx\n"), - (unsigned long) elf_header.e_entry); - printf (_(" Start of program headers: %ld (bytes into file)\n"), - (long) elf_header.e_phoff); - printf (_(" Start of section headers: %ld (bytes into file)\n"), - (long) elf_header.e_shoff); + + printf (_(" Entry point address: ")); + print_vma ((bfd_vma) elf_header.e_entry, PREFIX_HEX); + printf (_("\n Start of program headers: ")); + print_vma ((bfd_vma) elf_header.e_phoff, DEC); + printf (_(" (bytes into file)\n Start of section headers: ")); + print_vma ((bfd_vma) elf_header.e_shoff, DEC); + printf (_(" (bytes into file)\n")); + printf (_(" Flags: 0x%lx%s\n"), (unsigned long) elf_header.e_flags, get_machine_flags (elf_header.e_flags, elf_header.e_machine)); @@ -1941,10 +2100,13 @@ process_program_headers (file) if (do_segments && !do_header) { - printf (_("\nElf file is %s\n"), get_file_type (elf_header.e_type)); - printf (_("Entry point 0x%lx\n"), (unsigned long) elf_header.e_entry); - printf (_("There are %d program headers, starting at offset %lx:\n"), - elf_header.e_phnum, (unsigned long) elf_header.e_phoff); + printf (_("\nElf file type is %s\n"), get_file_type (elf_header.e_type)); + printf (_("Entry point ")); + print_vma ((bfd_vma) elf_header.e_entry, PREFIX_HEX); + printf (_("\nThere are %d program headers, starting at offset "), + elf_header.e_phnum); + print_vma ((bfd_vma) elf_header.e_phoff, DEC); + printf ("\n"); } program_headers = (Elf_Internal_Phdr *) malloc @@ -1971,8 +2133,17 @@ process_program_headers (file) { printf (_("\nProgram Header%s:\n"), elf_header.e_phnum > 1 ? "s" : ""); - printf - (_(" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n")); + + if (is_32bit_elf) + printf + (_(" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n")); + else + { + printf + (_(" Type Offset VirtAddr PhysAddr\n")); + printf + (_(" FileSiz MemSiz Flags Align\n")); + } } loadaddr = -1; @@ -1986,16 +2157,37 @@ process_program_headers (file) if (do_segments) { printf (" %-14.14s ", get_segment_type (segment->p_type)); - printf ("0x%6.6lx ", (unsigned long) segment->p_offset); - printf ("0x%8.8lx ", (unsigned long) segment->p_vaddr); - printf ("0x%8.8lx ", (unsigned long) segment->p_paddr); - printf ("0x%5.5lx ", (unsigned long) segment->p_filesz); - printf ("0x%5.5lx ", (unsigned long) segment->p_memsz); - printf ("%c%c%c ", - (segment->p_flags & PF_R ? 'R' : ' '), - (segment->p_flags & PF_W ? 'W' : ' '), - (segment->p_flags & PF_X ? 'E' : ' ')); - printf ("%#lx", (unsigned long) segment->p_align); + + if (is_32bit_elf) + { + printf ("0x%6.6lx ", (unsigned long) segment->p_offset); + printf ("0x%8.8lx ", (unsigned long) segment->p_vaddr); + printf ("0x%8.8lx ", (unsigned long) segment->p_paddr); + printf ("0x%5.5lx ", (unsigned long) segment->p_filesz); + printf ("0x%5.5lx ", (unsigned long) segment->p_memsz); + printf ("%c%c%c ", + (segment->p_flags & PF_R ? 'R' : ' '), + (segment->p_flags & PF_W ? 'W' : ' '), + (segment->p_flags & PF_X ? 'E' : ' ')); + printf ("%#lx", (unsigned long) segment->p_align); + } + else + { + print_vma (segment->p_offset, FULL_HEX); + putchar (' '); + print_vma (segment->p_vaddr, FULL_HEX); + putchar (' '); + print_vma (segment->p_paddr, FULL_HEX); + printf ("\n "); + print_vma (segment->p_filesz, FULL_HEX); + putchar (' '); + print_vma (segment->p_memsz, FULL_HEX); + printf (" %c%c%c ", + (segment->p_flags & PF_R ? 'R' : ' '), + (segment->p_flags & PF_W ? 'W' : ' '), + (segment->p_flags & PF_X ? 'E' : ' ')); + print_vma (segment->p_align, HEX); + } } switch (segment->p_type) @@ -2015,7 +2207,7 @@ process_program_headers (file) break; case PT_INTERP: - if (fseek (file, segment->p_offset, SEEK_SET)) + if (fseek (file, (long) segment->p_offset, SEEK_SET)) error (_("Unable to find program interpreter name\n")); else { @@ -2247,6 +2439,52 @@ get_64bit_elf_symbols (file, offset, num return isyms; } +static const char * +get_elf_section_flags (sh_flags) + bfd_vma sh_flags; +{ + static char buff [32]; + + * buff = 0; + + while (sh_flags) + { + bfd_vma flag; + + flag = sh_flags & - sh_flags; + sh_flags &= ~ flag; + + switch (flag) + { + case SHF_WRITE: strcat (buff, "W"); break; + case SHF_ALLOC: strcat (buff, "A"); break; + case SHF_EXECINSTR: strcat (buff, "X"); break; + case SHF_MERGE: strcat (buff, "M"); break; + case SHF_STRINGS: strcat (buff, "S"); break; + case SHF_INFO_LINK: strcat (buff, "I"); break; + case SHF_LINK_ORDER: strcat (buff, "L"); break; + case SHF_OS_NONCONFORMING: strcat (buff, "O"); break; + + default: + if (flag & SHF_MASKOS) + { + strcat (buff, "o"); + sh_flags &= ~ SHF_MASKOS; + } + else if (flag & SHF_MASKPROC) + { + strcat (buff, "p"); + sh_flags &= ~ SHF_MASKPROC; + } + else + strcat (buff, "x"); + break; + } + } + + return buff; +} + static int process_section_headers (file) FILE * file; @@ -2346,8 +2584,15 @@ process_section_headers (file) return 1; printf (_("\nSection Header%s:\n"), elf_header.e_shnum > 1 ? "s" : ""); - printf - (_(" [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n")); + + if (is_32bit_elf) + printf + (_(" [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n")); + else + { + printf (_(" [Nr] Name Type Address Offset\n")); + printf (_(" Size EntSize Flags Link Info Align\n")); + } for (i = 0, section = section_headers; i < elf_header.e_shnum; @@ -2358,21 +2603,45 @@ process_section_headers (file) SECTION_NAME (section), get_section_type_name (section->sh_type)); - printf ( "%8.8lx %6.6lx %6.6lx %2.2lx", - (unsigned long) section->sh_addr, - (unsigned long) section->sh_offset, - (unsigned long) section->sh_size, - (unsigned long) section->sh_entsize); - - printf (" %c%c%c %2ld %3lx %ld\n", - (section->sh_flags & SHF_WRITE ? 'W' : ' '), - (section->sh_flags & SHF_ALLOC ? 'A' : ' '), - (section->sh_flags & SHF_EXECINSTR ? 'X' : ' '), - (unsigned long) section->sh_link, - (unsigned long) section->sh_info, - (unsigned long) section->sh_addralign); + if (is_32bit_elf) + { + print_vma (section->sh_addr, LONG_HEX); + + printf ( " %6.6lx %6.6lx %2.2lx", + (unsigned long) section->sh_offset, + (unsigned long) section->sh_size, + (unsigned long) section->sh_entsize); + + printf (" %3s ", get_elf_section_flags (section->sh_flags)); + + printf (" %2ld %3lx %ld\n", + (unsigned long) section->sh_link, + (unsigned long) section->sh_info, + (unsigned long) section->sh_addralign); + } + else + { + putchar (' '); + print_vma (section->sh_addr, LONG_HEX); + printf (" %8.8lx", section->sh_offset); + printf ("\n "); + print_vma (section->sh_size, LONG_HEX); + printf (" "); + print_vma (section->sh_entsize, LONG_HEX); + + printf (" %3s ", get_elf_section_flags (section->sh_flags)); + + printf (" %2ld %3lx %ld\n", + (unsigned long) section->sh_link, + (unsigned long) section->sh_info, + (unsigned long) section->sh_addralign); + } } + printf (_("Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings)\n")); + printf (_(" I (info), L (link order), O (extra OS processing required)\n")); + printf (_(" o (os specific), p (processor specific) x (unknown)\n")); + return 1; } @@ -2587,42 +2856,48 @@ dynamic_segment_parisc_val (entry) static struct { long int bit; - const char *str; - } flags[] = - { - { DT_HP_DEBUG_PRIVATE, "HP_DEBUG_PRIVATE" }, - { DT_HP_DEBUG_CALLBACK, "HP_DEBUG_CALLBACK" }, - { DT_HP_DEBUG_CALLBACK_BOR, "HP_DEBUG_CALLBACK_BOR" }, - { DT_HP_NO_ENVVAR, "HP_NO_ENVVAR" }, - { DT_HP_BIND_NOW, "HP_BIND_NOW" }, - { DT_HP_BIND_NONFATAL, "HP_BIND_NONFATAL" }, - { DT_HP_BIND_VERBOSE, "HP_BIND_VERBOSE" }, - { DT_HP_BIND_RESTRICTED, "HP_BIND_RESTRICTED" }, - { DT_HP_BIND_SYMBOLIC, "HP_BIND_SYMBOLIC" }, - { DT_HP_RPATH_FIRST, "HP_RPATH_FIRST" }, - { DT_HP_BIND_DEPTH_FIRST, "HP_BIND_DEPTH_FIRST" } - }; + const char * str; + } + flags[] = + { + { DT_HP_DEBUG_PRIVATE, "HP_DEBUG_PRIVATE" }, + { DT_HP_DEBUG_CALLBACK, "HP_DEBUG_CALLBACK" }, + { DT_HP_DEBUG_CALLBACK_BOR, "HP_DEBUG_CALLBACK_BOR" }, + { DT_HP_NO_ENVVAR, "HP_NO_ENVVAR" }, + { DT_HP_BIND_NOW, "HP_BIND_NOW" }, + { DT_HP_BIND_NONFATAL, "HP_BIND_NONFATAL" }, + { DT_HP_BIND_VERBOSE, "HP_BIND_VERBOSE" }, + { DT_HP_BIND_RESTRICTED, "HP_BIND_RESTRICTED" }, + { DT_HP_BIND_SYMBOLIC, "HP_BIND_SYMBOLIC" }, + { DT_HP_RPATH_FIRST, "HP_RPATH_FIRST" }, + { DT_HP_BIND_DEPTH_FIRST, "HP_BIND_DEPTH_FIRST" } + }; int first = 1; - int cnt; - long int val = entry->d_un.d_val; + size_t cnt; + bfd_vma val = entry->d_un.d_val; for (cnt = 0; cnt < sizeof (flags) / sizeof (flags[0]); ++cnt) if (val & flags[cnt].bit) - { - if (! first) - putchar (' '); - fputs (flags[cnt].str, stdout); - first = 0; - val ^= flags[cnt].bit; - } + { + if (! first) + putchar (' '); + fputs (flags[cnt].str, stdout); + first = 0; + val ^= flags[cnt].bit; + } + if (val != 0 || first) - printf ("%s%#lx", first ? "" : " ", val); - puts (""); + { + if (! first) + putchar (' '); + print_vma (val, HEX); + } } break; - + default: - printf ("%#lx\n", (long) entry->d_un.d_ptr); + print_vma (entry->d_un.d_ptr, PREFIX_HEX); + break; } } @@ -2708,6 +2983,29 @@ get_64bit_dynamic_segment (file) return 1; } +static const char * +get_dynamic_flags (flags) + bfd_vma flags; +{ + static char buff [64]; + while (flags) + { + bfd_vma flag; + + flag = flags & - flags; + flags &= ~ flag; + + switch (flag) + { + case DF_ORIGIN: strcat (buff, "ORIGIN "); break; + case DF_SYMBOLIC: strcat (buff, "SYMBOLIC "); break; + case DF_TEXTREL: strcat (buff, "TEXTREL "); break; + case DF_BIND_NOW: strcat (buff, "BIND_NOW "); break; + default: strcat (buff, "unknown "); return; + } + } +} + /* Parse and display the contents of the dynamic segment. */ static int process_dynamic_segment (file) @@ -2869,14 +3167,22 @@ process_dynamic_segment (file) i++, entry ++) { if (do_dynamic) - printf (_(" 0x%-8.8lx (%s)%*s"), - (unsigned long) entry->d_tag, - get_dynamic_type (entry->d_tag), - 27 - strlen (get_dynamic_type (entry->d_tag)), - " "); + { + putchar (' '); + print_vma (entry->d_tag, FULL_HEX); + printf (" (%s)%*s", + get_dynamic_type (entry->d_tag), + (is_32bit_elf ? 27 : 19) - strlen (get_dynamic_type (entry->d_tag)), + " "); + } switch (entry->d_tag) { + case DT_FLAGS: + if (do_dynamic) + printf (get_dynamic_flags (entry->d_un.d_val)); + break; + case DT_AUXILIARY: case DT_FILTER: if (do_dynamic) @@ -2889,7 +3195,11 @@ process_dynamic_segment (file) if (dynamic_strings) printf (": [%s]\n", dynamic_strings + entry->d_un.d_val); else - printf (": %#lx\n", (long) entry->d_un.d_val); + { + printf (": "); + print_vma (entry->d_un.d_val, PREFIX_HEX); + putchar ('\n'); + } } break; @@ -3050,26 +3360,27 @@ process_dynamic_segment (file) case DT_NEEDED: printf (_("Shared library: [%s]"), name); - if (strcmp (name, program_interpreter)) - printf ("\n"); - else - printf (_(" program interpreter\n")); + if (strcmp (name, program_interpreter) == 0) + printf (_(" program interpreter")); break; case DT_SONAME: - printf (_("Library soname: [%s]\n"), name); + printf (_("Library soname: [%s]"), name); break; case DT_RPATH: - printf (_("Library rpath: [%s]\n"), name); + printf (_("Library rpath: [%s]"), name); break; default: - printf ("%#lx\n", (long) entry->d_un.d_val); + print_vma (entry->d_un.d_val, PREFIX_HEX); + break; } } else - printf ("%#lx\n", (long) entry->d_un.d_val); + print_vma (entry->d_un.d_val, PREFIX_HEX); + + putchar ('\n'); } break; @@ -3086,7 +3397,10 @@ process_dynamic_segment (file) case DT_INIT_ARRAYSZ: case DT_FINI_ARRAYSZ: if (do_dynamic) - printf ("%lu (bytes)\n", (unsigned long) entry->d_un.d_val); + { + print_vma (entry->d_un.d_val, UNSIGNED); + printf (" (bytes)\n"); + } break; case DT_VERDEFNUM: @@ -3094,7 +3408,10 @@ process_dynamic_segment (file) case DT_RELACOUNT: case DT_RELCOUNT: if (do_dynamic) - printf ("%lu\n", (unsigned long) entry->d_un.d_val); + { + print_vma (entry->d_un.d_val, UNSIGNED); + putchar ('\n'); + } break; case DT_SYMINSZ: @@ -3118,7 +3435,8 @@ process_dynamic_segment (file) } } - printf ("%#lx\n", (long) entry->d_un.d_val); + print_vma (entry->d_un.d_val, PREFIX_HEX); + putchar ('\n'); } break; @@ -3143,7 +3461,8 @@ process_dynamic_segment (file) dynamic_segment_parisc_val (entry); break; default: - printf ("%#lx\n", (long) entry->d_un.d_ptr); + print_vma (entry->d_un.d_val, PREFIX_HEX); + putchar ('\n'); } } break; @@ -3660,7 +3979,7 @@ process_version_sections (file) return 1; } -static char * +static const char * get_symbol_binding (binding) unsigned int binding; { @@ -3682,7 +4001,7 @@ get_symbol_binding (binding) } } -static char * +static const char * get_symbol_type (type) unsigned int type; { @@ -3695,6 +4014,7 @@ get_symbol_type (type) case STT_FUNC: return "FUNC"; case STT_SECTION: return "SECTION"; case STT_FILE: return "FILE"; + case STT_COMMON: return "COMMON"; default: if (type >= STT_LOPROC && type <= STT_HIPROC) { @@ -3727,7 +4047,21 @@ get_symbol_type (type) } } -static char * +static const char * +get_symbol_visibility (visibility) + unsigned int visibility; +{ + switch (visibility) + { + case STV_DEFAULT: return "DEFAULT"; + case STV_INTERNAL: return "INTERNAL"; + case STV_HIDDEN: return "HIDDEN"; + case STV_PROTECTED: return "PROTECTED"; + default: abort (); + } +} + +static const char * get_symbol_index_type (type) unsigned int type; { @@ -3753,7 +4087,6 @@ get_symbol_index_type (type) } } - static int * get_dynamic_data (file, number) FILE * file; @@ -3802,7 +4135,7 @@ process_symbol_table (file) char nb [4]; char nc [4]; int nbuckets = 0; - int nchains; + int nchains = 0; int * buckets = NULL; int * chains = NULL; @@ -3847,29 +4180,32 @@ process_symbol_table (file) int si; printf (_("\nSymbol table for image:\n")); - printf (_(" Num Buc: Value Size Type Bind Ot Ndx Name\n")); + if (is_32bit_elf) + printf (_(" Num Buc: Value Size Type Bind Vis Ot Ndx Name\n")); + else + printf (_(" Num Buc: Value Size Type Bind Vis Ot Ndx Name\n")); for (hn = 0; hn < nbuckets; hn++) { if (! buckets [hn]) continue; - for (si = buckets [hn]; si; si = chains [si]) + for (si = buckets [hn]; si < nchains && si > 0; si = chains [si]) { Elf_Internal_Sym * psym; psym = dynamic_symbols + si; - printf (" %3d %3d: %8lx %5ld %6s %6s %2d ", - si, hn, - (unsigned long) psym->st_value, - (unsigned long) psym->st_size, - get_symbol_type (ELF_ST_TYPE (psym->st_info)), - get_symbol_binding (ELF_ST_BIND (psym->st_info)), - psym->st_other); - - printf ("%3.3s", get_symbol_index_type (psym->st_shndx)); - + printf (" %3d %3d: ", si, hn); + print_vma (psym->st_value, LONG_HEX); + putchar (' ' ); + print_vma (psym->st_size, DEC_5); + + printf (" %6s", get_symbol_type (ELF_ST_TYPE (psym->st_info))); + printf (" %6s", get_symbol_binding (ELF_ST_BIND (psym->st_info))); + printf (" %3s", get_symbol_visibility (ELF_ST_VISIBILITY (psym->st_other))); + printf (" %2d", ELF_ST_OTHER (psym->st_other)); + printf (" %3.3s", get_symbol_index_type (psym->st_shndx)); printf (" %s\n", dynamic_strings + psym->st_name); } } @@ -3895,8 +4231,10 @@ process_symbol_table (file) printf (_("\nSymbol table '%s' contains %lu entries:\n"), SECTION_NAME (section), (unsigned long) (section->sh_size / section->sh_entsize)); - fputs (_(" Num: Value Size Type Bind Ot Ndx Name\n"), - stdout); + if (is_32bit_elf) + printf (_(" Num: Value Size Type Bind Vis Ot Ndx Name\n")); + else + printf (_(" Num: Value Size Type Bind Vis Ot Ndx Name\n")); symtab = GET_ELF_SYMBOLS (file, section->sh_offset, section->sh_size / section->sh_entsize); @@ -3919,16 +4257,15 @@ process_symbol_table (file) si < section->sh_size / section->sh_entsize; si ++, psym ++) { - printf (" %3d: %8lx %5ld %-7s %-6s %2d ", - si, - (unsigned long) psym->st_value, - (unsigned long) psym->st_size, - get_symbol_type (ELF_ST_TYPE (psym->st_info)), - get_symbol_binding (ELF_ST_BIND (psym->st_info)), - psym->st_other); - - printf ("%4s", get_symbol_index_type (psym->st_shndx)); - + printf ("%6d: ", si); + print_vma (psym->st_value, LONG_HEX); + putchar (' '); + print_vma (psym->st_size, DEC_5); + printf (" %-7s", get_symbol_type (ELF_ST_TYPE (psym->st_info))); + printf (" %-6s", get_symbol_binding (ELF_ST_BIND (psym->st_info))); + printf (" %-3s", get_symbol_visibility (ELF_ST_VISIBILITY (psym->st_other))); + printf (" %2d", ELF_ST_OTHER (psym->st_other)); + printf (" %4s", get_symbol_index_type (psym->st_shndx)); printf (" %s", strtab + psym->st_name); if (section->sh_type == SHT_DYNSYM && @@ -4093,11 +4430,11 @@ process_symbol_table (file) if (! buckets [hn]) continue; - for (si = buckets[hn]; si; si = chains[si]) + for (si = buckets[hn]; si > 0 && si < nchains; si = chains[si]) { - ++nsyms; + ++ nsyms; if (maxlength < ++lengths[hn]) - ++maxlength; + ++ maxlength; } } @@ -4109,7 +4446,7 @@ process_symbol_table (file) } for (hn = 0; hn < nbuckets; ++hn) - ++counts[lengths [hn]]; + ++ counts [lengths [hn]]; if (nbuckets > 0) { @@ -6303,17 +6640,18 @@ process_mips_specific (file) { static const struct { - const char *name; + const char * name; int bit; - } l_flags_vals[] = - { - { " EXACT_MATCH", LL_EXACT_MATCH }, - { " IGNORE_INT_VER", LL_IGNORE_INT_VER }, - { " REQUIRE_MINOR", LL_REQUIRE_MINOR }, - { " EXPORTS", LL_EXPORTS }, - { " DELAY_LOAD", LL_DELAY_LOAD }, - { " DELTA", LL_DELTA } - }; + } + l_flags_vals[] = + { + { " EXACT_MATCH", LL_EXACT_MATCH }, + { " IGNORE_INT_VER", LL_IGNORE_INT_VER }, + { " REQUIRE_MINOR", LL_REQUIRE_MINOR }, + { " EXPORTS", LL_EXPORTS }, + { " DELAY_LOAD", LL_DELAY_LOAD }, + { " DELTA", LL_DELTA } + }; int flags = liblist.l_flags; size_t fcnt; @@ -6338,7 +6676,7 @@ process_mips_specific (file) if (options_offset != 0) { Elf_External_Options * eopt; - Elf_Internal_Shdr * sect = section_headers; + Elf_Internal_Shdr * sect = section_headers; Elf_Internal_Options * iopt; Elf_Internal_Options * option; size_t offset; @@ -6346,7 +6684,7 @@ process_mips_specific (file) /* Find the section header so that we get the size. */ while (sect->sh_type != SHT_MIPS_OPTIONS) - ++sect; + ++ sect; GET_DATA_ALLOC (options_offset, sect->sh_size, eopt, Elf_External_Options *, "options"); @@ -6361,6 +6699,7 @@ process_mips_specific (file) offset = cnt = 0; option = iopt; + while (offset < sect->sh_size) { Elf_External_Options * eoption; @@ -6373,6 +6712,7 @@ process_mips_specific (file) option->info = BYTE_GET (eoption->info); offset += option->size; + ++option; ++cnt; } @@ -6381,6 +6721,7 @@ process_mips_specific (file) string_table + sect->sh_name, cnt); option = iopt; + while (cnt-- > 0) { size_t len; @@ -6573,12 +6914,11 @@ process_mips_specific (file) { Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]]; - printf ("%5u: %8lu %#10lx %s\n", - (unsigned int) cnt, iconf[cnt], (unsigned long) psym->st_value, - dynamic_strings + psym->st_name); + printf ("%5u: %8lu ", cnt, iconf[cnt]); + print_vma (psym->st_value, FULL_HEX); + printf (" %s\n", dynamic_strings + psym->st_name); } - free (iconf); } @@ -6597,11 +6937,13 @@ get_note_type (e_type) case NT_FPREGSET: return _("NT_FPREGSET (floating point registers)"); case NT_PRPSINFO: return _("NT_PRPSINFO (prpsinfo structure)"); case NT_TASKSTRUCT: return _("NT_TASKSTRUCT (task structure)"); + case NT_PRXFPREG: return _("NT_PRXFPREG (user_xfpregs structure)"); case NT_PSTATUS: return _("NT_PSTATUS (pstatus structure)"); case NT_FPREGS: return _("NT_FPREGS (floating point registers)"); case NT_PSINFO: return _("NT_PSINFO (psinfo structure)"); case NT_LWPSTATUS: return _("NT_LWPSTATUS (lwpstatus_t structure)"); case NT_LWPSINFO: return _("NT_LWPSINFO (lwpsinfo_t structure)"); + case NT_WIN32PSTATUS: return _("NT_WIN32PSTATUS (win32_pstatus strcuture)"); default: sprintf (buff, _("Unknown note type: (0x%08x)"), e_type); return buff; @@ -6627,8 +6969,8 @@ process_note (pnote) static int process_corefile_note_segment (file, offset, length) FILE * file; - unsigned long offset; - unsigned long length; + bfd_vma offset; + bfd_vma length; { Elf_External_Note * pnotes; Elf_External_Note * external; @@ -6729,8 +7071,8 @@ process_corefile_note_segments (file) { if (segment->p_type == PT_NOTE) res &= process_corefile_note_segment (file, - (unsigned long)segment->p_offset, - (unsigned long)segment->p_filesz); + (bfd_vma) segment->p_offset, + (bfd_vma) segment->p_filesz); } free (program_headers); diff -up -r --new-file binutils-2.9.5.0.22/binutils/resrc.c binutils-2.9.5.0.24/binutils/resrc.c --- binutils-2.9.5.0.22/binutils/resrc.c Wed Sep 22 14:50:29 1999 +++ binutils-2.9.5.0.24/binutils/resrc.c Thu Jan 13 11:35:51 2000 @@ -29,9 +29,50 @@ #include #include +#include #include +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_SYS_WAIT_H +#include +#else /* ! HAVE_SYS_WAIT_H */ +#if ! defined (_WIN32) || defined (__CYGWIN__) +#ifndef WIFEXITED +#define WIFEXITED(w) (((w)&0377) == 0) +#endif +#ifndef WIFSIGNALED +#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0) +#endif +#ifndef WTERMSIG +#define WTERMSIG(w) ((w) & 0177) +#endif +#ifndef WEXITSTATUS +#define WEXITSTATUS(w) (((w) >> 8) & 0377) +#endif +#else /* defined (_WIN32) && ! defined (__CYGWIN__) */ +#ifndef WIFEXITED +#define WIFEXITED(w) (((w) & 0xff) == 0) +#endif +#ifndef WIFSIGNALED +#define WIFSIGNALED(w) (((w) & 0xff) != 0 && ((w) & 0xff) != 0x7f) +#endif +#ifndef WTERMSIG +#define WTERMSIG(w) ((w) & 0x7f) +#endif +#ifndef WEXITSTATUS +#define WEXITSTATUS(w) (((w) & 0xff00) >> 8) +#endif +#endif /* defined (_WIN32) && ! defined (__CYGWIN__) */ +#endif /* ! HAVE_SYS_WAIT_H */ #if defined (_WIN32) && ! defined (__CYGWIN32__) +#ifndef STDOUT_FILENO +#define STDOUT_FILENO 1 +#endif + +#if defined (_WIN32) && ! defined (__CYGWIN__) #define popen _popen #define pclose _pclose #endif @@ -86,6 +127,15 @@ int rc_lineno; static FILE *cpp_pipe; +/* The temporary file used if we're not using popen, so we can delete it + if we exit. */ + +static char *cpp_temp_file; + +/* Input stream is either a file or a pipe. */ + +static enum {ISTREAM_PIPE, ISTREAM_FILE} istream_type; + /* As we read the rc file, we attach information to this structure. */ static struct res_directory *resources; @@ -112,9 +162,11 @@ static int icons; /* Local functions. */ +static int run_cmd PARAMS ((char *, const char *)); +static FILE *open_input_stream PARAMS ((char *)); static FILE *look_for_default PARAMS ((char *, const char *, int, const char *, const char *)); -static void close_pipe PARAMS ((void)); +static void close_input_stream PARAMS ((void)); static void unexpected_eof PARAMS ((const char *)); static int get_word PARAMS ((FILE *, const char *)); static unsigned long get_long PARAMS ((FILE *, const char *)); @@ -122,6 +174,163 @@ static void get_data PARAMS ((FILE *, unsigned char *, unsigned long, const char *)); static void define_fontdirs PARAMS ((void)); +/* Run `cmd' and redirect the output to `redir'. */ + +static int +run_cmd (cmd, redir) + char *cmd; + const char *redir; +{ + char *s; + int pid, wait_status, retcode; + int i; + const char **argv; + char *errmsg_fmt, *errmsg_arg; + char *temp_base = choose_temp_base (); + int in_quote; + char sep; + int redir_handle = -1; + int stdout_save = -1; + + /* Count the args. */ + i = 0; + + for (s = cmd; *s; s++) + if (*s == ' ') + i++; + + i++; + argv = alloca (sizeof (char *) * (i + 3)); + i = 0; + s = cmd; + + while (1) + { + while (*s == ' ' && *s != 0) + s++; + + if (*s == 0) + break; + + in_quote = (*s == '\'' || *s == '"'); + sep = (in_quote) ? *s++ : ' '; + argv[i++] = s; + + while (*s != sep && *s != 0) + s++; + + if (*s == 0) + break; + + *s++ = 0; + + if (in_quote) + s++; + } + argv[i++] = NULL; + + /* Setup the redirection. We can't use the usual fork/exec and redirect + since we may be running on non-POSIX Windows host. */ + + fflush (stdout); + fflush (stderr); + + /* Open temporary output file. */ + redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0666); + if (redir_handle == -1) + fatal (_("can't open temporary file `%s': %s"), redir, + strerror (errno)); + + /* Duplicate the stdout file handle so it can be restored later. */ + stdout_save = dup (STDOUT_FILENO); + if (stdout_save == -1) + fatal (_("can't redirect stdout: `%s': %s"), redir, strerror (errno)); + + /* Redirect stdout to our output file. */ + dup2 (redir_handle, STDOUT_FILENO); + + pid = pexecute (argv[0], (char * const *) argv, program_name, temp_base, + &errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH); + + /* Restore stdout to its previous setting. */ + dup2 (stdout_save, STDOUT_FILENO); + + /* Close reponse file. */ + close (redir_handle); + + if (pid == -1) + { + fatal (_("%s %s: %s"), errmsg_fmt, errmsg_arg, strerror (errno)); + return 1; + } + + retcode = 0; + pid = pwait (pid, &wait_status, 0); + + if (pid == -1) + { + fatal (_("wait: %s"), strerror (errno)); + retcode = 1; + } + else if (WIFSIGNALED (wait_status)) + { + fatal (_("subprocess got fatal signal %d"), WTERMSIG (wait_status)); + retcode = 1; + } + else if (WIFEXITED (wait_status)) + { + if (WEXITSTATUS (wait_status) != 0) + { + fatal (_("%s exited with status %d"), cmd, + WEXITSTATUS (wait_status)); + retcode = 1; + } + } + else + retcode = 1; + + return retcode; +} + +static FILE * +open_input_stream (cmd) + char *cmd; +{ + if (istream_type == ISTREAM_FILE) + { + char *fileprefix; + + fileprefix = choose_temp_base (); + cpp_temp_file = (char *) xmalloc (strlen (fileprefix) + 5); + sprintf (cpp_temp_file, "%s.irc", fileprefix); + free (fileprefix); + + if (run_cmd (cmd, cpp_temp_file)) + fatal (_("can't execute `%s': %s"), cmd, strerror (errno)); + + cpp_pipe = fopen (cpp_temp_file, FOPEN_RT);; + if (cpp_pipe == NULL) + fatal (_("can't open temporary file `%s': %s"), + cpp_temp_file, strerror (errno)); + + if (verbose) + fprintf (stderr, + _("Using temporary file `%s' to read preprocessor output\n"), + cpp_temp_file); + } + else + { + cpp_pipe = popen (cmd, FOPEN_RT); + if (cpp_pipe == NULL) + fatal (_("can't popen `%s': %s"), cmd, strerror (errno)); + if (verbose) + fprintf (stderr, _("Using popen to read preprocessor output\n")); + } + + xatexit (close_input_stream); + return cpp_pipe; +} + /* look for the preprocessor program */ static FILE * @@ -143,7 +352,11 @@ look_for_default (cmd, prefix, end_prefi if (space) *space = 0; - if (strchr (cmd, '/')) + if ( +#if defined (__DJGPP__) || defined (__CYGWIN__) || defined (_WIN32) + strchr (cmd, '\\') || +#endif + strchr (cmd, '/')) { found = (stat (cmd, &s) == 0 #ifdef HAVE_EXECUTABLE_SUFFIX @@ -154,7 +367,7 @@ look_for_default (cmd, prefix, end_prefi if (! found) { if (verbose) - fprintf (stderr, "Tried `%s'\n", cmd); + fprintf (stderr, _("Tried `%s'\n"), cmd); return NULL; } } @@ -165,23 +378,26 @@ look_for_default (cmd, prefix, end_prefi DEFAULT_PREPROCESSOR, preprocargs, filename); if (verbose) - fprintf (stderr, "Using `%s'\n", cmd); + fprintf (stderr, _("Using `%s'\n"), cmd); - cpp_pipe = popen (cmd, FOPEN_RT); + cpp_pipe = open_input_stream (cmd); return cpp_pipe; } /* Read an rc file. */ struct res_directory * -read_rc_file (filename, preprocessor, preprocargs, language) +read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file) const char *filename; const char *preprocessor; const char *preprocargs; int language; + int use_temp_file; { char *cmd; + istream_type = (use_temp_file) ? ISTREAM_FILE : ISTREAM_PIPE; + if (preprocargs == NULL) preprocargs = ""; if (filename == NULL) @@ -195,7 +411,7 @@ read_rc_file (filename, preprocessor, pr + 10); sprintf (cmd, "%s %s %s", preprocessor, preprocargs, filename); - cpp_pipe = popen (cmd, FOPEN_RT); + cpp_pipe = open_input_stream (cmd); } else { @@ -219,7 +435,7 @@ read_rc_file (filename, preprocessor, pr if (*cp == '-') dash = cp; if ( -#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__) +#if defined (__DJGPP__) || defined (__CYGWIN__) || defined(_WIN32) *cp == ':' || *cp == '\\' || #endif *cp == '/') @@ -257,12 +473,9 @@ read_rc_file (filename, preprocessor, pr } } - if (cpp_pipe == NULL) - fatal (_("can't popen `%s': %s"), cmd, strerror (errno)); + free (cmd); - xatexit (close_pipe); - rc_filename = xstrdup (filename); rc_lineno = 1; if (language != -1) @@ -270,10 +483,8 @@ read_rc_file (filename, preprocessor, pr yyin = cpp_pipe; yyparse (); - if (pclose (cpp_pipe) != 0) - fprintf (stderr, _("%s: warning: preprocessor failed\n"), program_name); - cpp_pipe = NULL; - + close_input_stream (); + if (fontdirs != NULL) define_fontdirs (); @@ -283,13 +494,37 @@ read_rc_file (filename, preprocessor, pr return resources; } -/* Close the pipe if it is open. This is called via xatexit. */ +/* Close the input stream if it is open. */ -void -close_pipe () +static void +close_input_stream () { if (cpp_pipe != NULL) pclose (cpp_pipe); + + if (istream_type == ISTREAM_FILE) + { + if (cpp_pipe != NULL) + fclose (cpp_pipe); + + if (cpp_temp_file != NULL) + { + int errno_save = errno; + + unlink (cpp_temp_file); + errno = errno_save; + free (cpp_temp_file); + } + } + else + { + if (cpp_pipe != NULL) + pclose (cpp_pipe); + } + + /* Since this is also run via xatexit, safeguard. */ + cpp_pipe = NULL; + cpp_temp_file = NULL; } /* Report an error while reading an rc file. */ @@ -307,7 +542,7 @@ void rcparse_warning (msg) const char *msg; { - fprintf (stderr, "%s:%d: %s\n", rc_filename, rc_lineno, msg); + fprintf (stderr, _("%s:%d: %s\n"), rc_filename, rc_lineno, msg); } /* Die if we get an unexpected end of file. */ diff -up -r --new-file binutils-2.9.5.0.22/binutils/strings.c binutils-2.9.5.0.24/binutils/strings.c --- binutils-2.9.5.0.22/binutils/strings.c Sat Jun 5 18:49:29 1999 +++ binutils-2.9.5.0.24/binutils/strings.c Thu Jan 13 11:43:43 2000 @@ -203,7 +203,7 @@ main (argc, argv) default: if (string_min < 0) - string_min = optc; + string_min = optc - '0'; else string_min = string_min * 10 + optc - '0'; break; diff -up -r --new-file binutils-2.9.5.0.22/binutils/windres.c binutils-2.9.5.0.24/binutils/windres.c --- binutils-2.9.5.0.22/binutils/windres.c Mon Jun 7 14:56:08 1999 +++ binutils-2.9.5.0.24/binutils/windres.c Thu Jan 13 11:43:43 2000 @@ -113,7 +113,9 @@ static struct include_dir *include_dirs; #define OPTION_INCLUDE_DIR (OPTION_HELP + 1) #define OPTION_LANGUAGE (OPTION_INCLUDE_DIR + 1) #define OPTION_PREPROCESSOR (OPTION_LANGUAGE + 1) -#define OPTION_VERSION (OPTION_PREPROCESSOR + 1) +#define OPTION_USE_TEMP_FILE (OPTION_PREPROCESSOR + 1) +#define OPTION_NO_USE_TEMP_FILE (OPTION_USE_TEMP_FILE + 1) +#define OPTION_VERSION (OPTION_NO_USE_TEMP_FILE + 1) #define OPTION_YYDEBUG (OPTION_VERSION + 1) static const struct option long_options[] = @@ -126,6 +128,8 @@ static const struct option long_options[ {"output-format", required_argument, 0, 'O'}, {"preprocessor", required_argument, 0, OPTION_PREPROCESSOR}, {"target", required_argument, 0, 'F'}, + {"use-temp-file", no_argument, 0, OPTION_USE_TEMP_FILE}, + {"no-use-temp-file", no_argument, 0, OPTION_NO_USE_TEMP_FILE}, {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, OPTION_VERSION}, {"yydebug", no_argument, 0, OPTION_YYDEBUG}, @@ -715,7 +719,10 @@ Options:\n\ -DSYM[=VAL], --define SYM[=VAL]\n\ Define SYM when preprocessing rc file\n\ -v Verbose - tells you what it's doing\n\ - --language VAL Set language when reading rc file\n")); + --language VAL Set language when reading rc file\n\ + --use-temp-file Use a temporary file instead of popen to read\n\ + the preprocessor output\n\ + --no-use-temp-file Use popen (default)\n")); #ifdef YYDEBUG fprintf (stream, _("\ --yydebug Turn on parser debugging\n")); @@ -779,6 +786,7 @@ main (argc, argv) const char *quotedarg; int language; struct res_directory *resources; + int use_temp_file; #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) setlocale (LC_MESSAGES, ""); @@ -802,6 +810,7 @@ main (argc, argv) preprocessor = NULL; preprocargs = NULL; language = -1; + use_temp_file = 0; while ((c = getopt_long (argc, argv, "i:o:I:O:F:D:v", long_options, (int *) 0)) != EOF) @@ -892,6 +901,14 @@ main (argc, argv) language = strtol (optarg, (char **) NULL, 16); break; + case OPTION_USE_TEMP_FILE: + use_temp_file = 1; + break; + + case OPTION_NO_USE_TEMP_FILE: + use_temp_file = 0; + break; + #ifdef YYDEBUG case OPTION_YYDEBUG: yydebug = 1; @@ -951,7 +968,7 @@ main (argc, argv) abort (); case RES_FORMAT_RC: resources = read_rc_file (input_filename, preprocessor, preprocargs, - language); + language, use_temp_file); break; case RES_FORMAT_RES: resources = read_res_file (input_filename); diff -up -r --new-file binutils-2.9.5.0.22/binutils/windres.h binutils-2.9.5.0.24/binutils/windres.h --- binutils-2.9.5.0.22/binutils/windres.h Thu Jun 3 11:01:56 1999 +++ binutils-2.9.5.0.24/binutils/windres.h Thu Jan 13 11:35:51 2000 @@ -747,7 +747,7 @@ extern int verbose; /* Function declarations. */ extern struct res_directory *read_rc_file - PARAMS ((const char *, const char *, const char *, int)); + PARAMS ((const char *, const char *, const char *, int, int)); extern struct res_directory *read_res_file PARAMS ((const char *)); extern struct res_directory *read_coff_rsrc PARAMS ((const char *, const char *)); diff -up -r --new-file binutils-2.9.5.0.22/binutils.spec binutils-2.9.5.0.24/binutils.spec --- binutils-2.9.5.0.22/binutils.spec Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.24/binutils.spec Thu Jan 13 13:48:58 2000 @@ -0,0 +1,81 @@ +Summary: GNU Binary Utility Development Utilities +Name: binutils +Version: 2.9.5.0.24 +Release: 1 +Copyright: GPL +Group: Development/Tools +Source: ftp://ftp.valinux.com/pub/support/hjl/binutils/binutils-%{version}.tar.gz +Buildroot: /var/tmp/binutils-root +Summary(de): GNU Binary Utility Development Utilities +Summary(fr): Utilitaires de développement binaire de GNU +Summary(tr): GNU geliþtirme araçlarý + +%description +Binutils is a collection of utilities necessary for compiling programs. It +includes the assembler and linker, as well as a number of other +miscellaneous programs for dealing with executable formats. + +%prep +%setup -q + +%build +NumCPUs=`grep -i BogoMIPS /proc/cpuinfo | wc -l | xargs expr` +echo "MAKE=make -j $NumCPUs" > makefile +echo "include Makefile" >> makefile +./configure --prefix=/usr --enable-shared +%ifarch ppc + sed -e "s!LIB_PATH =!export LIB_PATH = /lib:/usr/lib:/usr/local/lib!" \ + < ld/Makefile >ld/Makefile.tmp + mv -f ld/Makefile.tmp ld/Makefile +%endif +make tooldir=/usr all info + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr +make prefix=$RPM_BUILD_ROOT/usr tooldir=$RPM_BUILD_ROOT/usr/ install install-info +./binutils/strip-new $RPM_BUILD_ROOT/usr/bin/* +gzip -q9f $RPM_BUILD_ROOT/usr/info/*.info* + +## Get rid of that arch-specific directory +#rm -rf $RPM_BUILD_ROOT/usr/lib/bin + +#install -m 644 libiberty/libiberty.a $RPM_BUILD_ROOT/usr/lib +install -m 644 include/libiberty.h $RPM_BUILD_ROOT/usr/include + +chmod +x $RPM_BUILD_ROOT/usr/lib/lib*.so* + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/ldconfig +/sbin/install-info --info-dir=/usr/info /usr/info/as.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/bfd.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/binutils.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/gasp.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/gprof.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/ld.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/standards.info.gz + +%preun +if [ $1 = 0 ] ;then + /sbin/install-info --delete --info-dir=/usr/info /usr/info/as.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/bfd.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/binutils.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/gasp.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/gprof.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/ld.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/standards.info.gz +fi + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc README +/usr/bin/* +/usr/man/man1/* +/usr/include/* +/usr/lib/* +/usr/info/*info* diff -up -r --new-file binutils-2.9.5.0.22/binutils.spec.in binutils-2.9.5.0.24/binutils.spec.in --- binutils-2.9.5.0.22/binutils.spec.in Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.24/binutils.spec.in Thu Jan 13 13:45:47 2000 @@ -0,0 +1,81 @@ +Summary: GNU Binary Utility Development Utilities +Name: binutils +Version: @VERSION@ +Release: 1 +Copyright: GPL +Group: Development/Tools +Source: ftp://ftp.valinux.com/pub/support/hjl/binutils/binutils-%{version}.tar.gz +Buildroot: /var/tmp/binutils-root +Summary(de): GNU Binary Utility Development Utilities +Summary(fr): Utilitaires de développement binaire de GNU +Summary(tr): GNU geliþtirme araçlarý + +%description +Binutils is a collection of utilities necessary for compiling programs. It +includes the assembler and linker, as well as a number of other +miscellaneous programs for dealing with executable formats. + +%prep +%setup -q + +%build +NumCPUs=`grep -i BogoMIPS /proc/cpuinfo | wc -l | xargs expr` +echo "MAKE=make -j $NumCPUs" > makefile +echo "include Makefile" >> makefile +./configure --prefix=/usr --enable-shared +%ifarch ppc + sed -e "s!LIB_PATH =!export LIB_PATH = /lib:/usr/lib:/usr/local/lib!" \ + < ld/Makefile >ld/Makefile.tmp + mv -f ld/Makefile.tmp ld/Makefile +%endif +make tooldir=/usr all info + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr +make prefix=$RPM_BUILD_ROOT/usr tooldir=$RPM_BUILD_ROOT/usr/ install install-info +./binutils/strip-new $RPM_BUILD_ROOT/usr/bin/* +gzip -q9f $RPM_BUILD_ROOT/usr/info/*.info* + +## Get rid of that arch-specific directory +#rm -rf $RPM_BUILD_ROOT/usr/lib/bin + +#install -m 644 libiberty/libiberty.a $RPM_BUILD_ROOT/usr/lib +install -m 644 include/libiberty.h $RPM_BUILD_ROOT/usr/include + +chmod +x $RPM_BUILD_ROOT/usr/lib/lib*.so* + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/ldconfig +/sbin/install-info --info-dir=/usr/info /usr/info/as.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/bfd.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/binutils.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/gasp.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/gprof.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/ld.info.gz +/sbin/install-info --info-dir=/usr/info /usr/info/standards.info.gz + +%preun +if [ $1 = 0 ] ;then + /sbin/install-info --delete --info-dir=/usr/info /usr/info/as.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/bfd.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/binutils.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/gasp.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/gprof.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/ld.info.gz + /sbin/install-info --delete --info-dir=/usr/info /usr/info/standards.info.gz +fi + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc README +/usr/bin/* +/usr/man/man1/* +/usr/include/* +/usr/lib/* +/usr/info/*info* diff -up -r --new-file binutils-2.9.5.0.22/config/ChangeLog binutils-2.9.5.0.24/config/ChangeLog --- binutils-2.9.5.0.22/config/ChangeLog Thu Jun 3 11:01:56 1999 +++ binutils-2.9.5.0.24/config/ChangeLog Thu Jan 13 11:35:52 2000 @@ -1,3 +1,8 @@ +2000-01-06 Geoff Keating + + * mh-aix43: Delete, move to mt-aix43. + * mt-aix43: New file. + 1999-04-07 Michael Meissner * mt-d30v: New file, pass -g -Os -Wa,-C as default options. diff -up -r --new-file binutils-2.9.5.0.22/config/mh-aix43 binutils-2.9.5.0.24/config/mh-aix43 --- binutils-2.9.5.0.22/config/mh-aix43 Thu Jun 3 11:01:56 1999 +++ binutils-2.9.5.0.24/config/mh-aix43 Wed Dec 31 16:00:00 1969 @@ -1,4 +0,0 @@ -# AIX 4.3 and above requires -X32_64 flag to all ar and nm commands -# to handle both 32-bit and 64-bit objects. -AR_FOR_TARGET=ar -X32_64 -NM_FOR_TARGET=nm -X32_64 diff -up -r --new-file binutils-2.9.5.0.22/config/mt-aix43 binutils-2.9.5.0.24/config/mt-aix43 --- binutils-2.9.5.0.22/config/mt-aix43 Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.24/config/mt-aix43 Thu Jan 13 11:35:52 2000 @@ -0,0 +1,4 @@ +# AIX 4.3 and above requires -X32_64 flag to all ar and nm commands +# to handle both 32-bit and 64-bit objects. +AR_FOR_TARGET=ar -X32_64 +NM_FOR_TARGET=nm -X32_64 diff -up -r --new-file binutils-2.9.5.0.22/configure.in binutils-2.9.5.0.24/configure.in --- binutils-2.9.5.0.22/configure.in Fri Aug 27 12:22:53 1999 +++ binutils-2.9.5.0.24/configure.in Thu Jan 13 11:43:43 2000 @@ -14,7 +14,7 @@ ## For more information on these two systems, check out the documentation ## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi). -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992-99, 2000 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -223,9 +223,6 @@ case "${host}" in *-*-lynxos*) host_makefile_frag="${host_makefile_frag} config/mh-lynxos" ;; - *-*-aix4.[3456789]* | *-*-aix[56789].*) - host_makefile_frag="${host_makefile_frag} config/mh-aix43" - ;; *-*-sysv4*) host_makefile_frag="${host_makefile_frag} config/mh-sysv4" ;; @@ -334,6 +331,9 @@ case "${target}" in ;; *-*-linux-gnu) target_makefile_frag="${target_makefile_frag} config/mt-linux" + ;; + *-*-aix4.[3456789]* | *-*-aix[56789].*) + target_makefile_frag="${target_makefile_frag} config/mt-aix43" ;; esac diff -up -r --new-file binutils-2.9.5.0.22/gas/ChangeLog binutils-2.9.5.0.24/gas/ChangeLog --- binutils-2.9.5.0.22/gas/ChangeLog Thu Dec 2 08:44:26 1999 +++ binutils-2.9.5.0.24/gas/ChangeLog Thu Jan 13 11:35:52 2000 @@ -1,3 +1,42 @@ +2000-01-10 Philip Blundell + + * doc/c-arm.texi (ARM Options): Fix typo. + (ARM-Chars): Correct description of `#'. Mention that `;' is a + line separator for Linux. + * doc/as.texinfo (Comments): Mention the ARM. + +2000-01-10 Philip Blundell + + * configure.in (arm*-*-conix*): New target. + (arm*-*-linux-gnu*): Match instead of arm-*-linux* and + armv*-*-linux-gnu. + * configure: Regenerate. + +2000-01-03 Martin v. Loewis + + * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos. + (obj_elf_visibility): New function. + + * doc/as.texinfo (Visibility): New node: document visibility + pseudo ops. + +1999-12-27 Alan Modra + + * config/tc-i386.c (MATCH): Relax JumpAbsolute check. Emit a + warning for absolute jump/call without `*' in non-intel mode. No + need to set i.types[0] JumpAbsolute in intel mode. + +1999-12-22 Philip Blundell + + * config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate + hook function when changing sections. + (arm_s_data): Likewise. + +1999-12-14 Nick Clifton + + * config/tc-arm.c (md_parse_option): Add support for -marm720 + command line switch. + Tue Nov 30 22:59:00 1999 Jeffrey A Law (law@cygnus.com) * config/tc-mn10300.c (md_pseudo_table): Add ".am33" pseudo-op. diff -up -r --new-file binutils-2.9.5.0.22/gas/config/obj-elf.c binutils-2.9.5.0.24/gas/config/obj-elf.c --- binutils-2.9.5.0.22/gas/config/obj-elf.c Thu Nov 4 10:32:49 1999 +++ binutils-2.9.5.0.24/gas/config/obj-elf.c Thu Jan 13 11:43:43 2000 @@ -68,6 +68,7 @@ static void obj_elf_size PARAMS ((int)); static void obj_elf_type PARAMS ((int)); static void obj_elf_weak PARAMS ((int)); static void obj_elf_local PARAMS ((int)); +static void obj_elf_visibility PARAMS ((int)); static void obj_elf_symver PARAMS ((int)); static void obj_elf_vtable_inherit PARAMS ((int)); static void obj_elf_vtable_entry PARAMS ((int)); @@ -92,6 +93,11 @@ static const pseudo_typeS elf_pseudo_tab {"version", obj_elf_version, 0}, {"weak", obj_elf_weak, 0}, + /* These define symbol visibility. */ + {"internal", obj_elf_visibility, STV_INTERNAL}, + {"hidden", obj_elf_visibility, STV_HIDDEN}, + {"protected", obj_elf_visibility, STV_PROTECTED}, + /* These are used for stabs-in-elf configurations. */ {"line", obj_elf_line, 0}, @@ -476,6 +482,48 @@ obj_elf_weak (ignore) while (c == ','); demand_empty_rest_of_line (); } + +static void +obj_elf_visibility (visibility) + int visibility; +{ + char *name; + int c; + symbolS *symbolP; + asymbol *bfdsym; + elf_symbol_type *elfsym; + + do + { + name = input_line_pointer; + c = get_symbol_end (); + symbolP = symbol_find_or_make (name); + *input_line_pointer = c; + + SKIP_WHITESPACE (); + + bfdsym = symbol_get_bfdsym (symbolP); + elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym); + + assert (elfsym); + + elfsym->internal_elf_sym.st_other = visibility; + + if (c == ',') + { + input_line_pointer ++; + + SKIP_WHITESPACE (); + + if (*input_line_pointer == '\n') + c = '\n'; + } + } + while (c == ','); + + demand_empty_rest_of_line (); +} + static segT previous_section; static int previous_subsection; diff -up -r --new-file binutils-2.9.5.0.22/gas/config/tc-arm.c binutils-2.9.5.0.24/gas/config/tc-arm.c --- binutils-2.9.5.0.22/gas/config/tc-arm.c Thu Dec 2 08:44:33 1999 +++ binutils-2.9.5.0.24/gas/config/tc-arm.c Thu Jan 13 11:35:55 2000 @@ -57,7 +57,7 @@ /* Architectures are the sum of the base and extensions */ #define ARM_ARCH_V4 (ARM_7 | ARM_LONGMUL | ARM_HALFWORD) #define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_THUMB) -#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5 ) +#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5) #define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_THUMB) /* Some useful combinations: */ @@ -1383,7 +1383,11 @@ arm_s_text (ignore) if (now_seg != text_section) s_ltorg (0); +#ifdef OBJ_ELF + obj_elf_text (ignore); +#else s_text (ignore); +#endif } static void @@ -1398,7 +1402,11 @@ arm_s_data (ignore) else if (now_seg != data_section) s_ltorg (0); +#ifdef OBJ_ELF + obj_elf_data (ignore); +#else s_data (ignore); +#endif } #ifdef OBJ_ELF @@ -6115,7 +6123,7 @@ md_assemble (str) if (opcode->comp_suffix) { if (*opcode->comp_suffix != '\0') - as_bad (_("Opcode `%s' must have suffix from <%s>\n"), + as_bad (_("Opcode `%s' must have suffix from list: <%s>"), str, opcode->comp_suffix); else /* Not a conditional instruction. */ @@ -6156,7 +6164,6 @@ _("Warning: Use of the 'nv' conditional else cond_code = COND_ALWAYS; - /* Apply the conditional, or complain it's not allowed. */ if (opcode->comp_suffix && *opcode->comp_suffix == '\0') { @@ -6400,7 +6407,8 @@ md_parse_option (c, arg) } else if (streq (str, "thumb-interwork")) { - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_THUMB | ARM_ARCH_V4; + if ((cpu_variant & ARM_THUMB) == 0) + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4T; #if defined OBJ_COFF || defined OBJ_ELF support_interwork = true; #endif @@ -6522,6 +6530,7 @@ md_parse_option (c, arg) case 70: case 700: case 710: + case 720: case 7100: case 7500: break; @@ -6634,7 +6643,6 @@ md_parse_option (c, arg) default: as_bad (_("Invalid architecture variant -m%s"), arg); break; } break; - default: as_bad (_("Invalid architecture variant -m%s"), arg); @@ -6671,7 +6679,7 @@ md_show_usage (fp) _("\ ARM Specific Assembler Options:\n\ -m[arm][] select processor variant\n\ - -m[arm]v[2|2a|3|3m|4|4t|5]select architecture variant\n\ + -m[arm]v[2|2a|3|3m|4|4t|5[t][e]] select architecture variant\n\ -mthumb only allow Thumb instructions\n\ -mthumb-interwork mark the assembled code as supporting interworking\n\ -mall allow any instruction\n\ diff -up -r --new-file binutils-2.9.5.0.22/gas/config/tc-i386.c binutils-2.9.5.0.24/gas/config/tc-i386.c --- binutils-2.9.5.0.22/gas/config/tc-i386.c Fri Nov 19 09:46:55 1999 +++ binutils-2.9.5.0.24/gas/config/tc-i386.c Thu Jan 13 11:43:43 2000 @@ -1255,9 +1255,8 @@ md_assemble (line) with the template operand types. */ #define MATCH(overlap, given, template) \ - ((overlap) \ - && ((given) & BaseIndex) == ((overlap) & BaseIndex) \ - && ((given) & JumpAbsolute) == ((template) & JumpAbsolute)) + ((overlap & ~JumpAbsolute) \ + && ((given) & (BaseIndex|JumpAbsolute)) == ((overlap) & (BaseIndex|JumpAbsolute))) /* If given types r0 and r1 are registers they must be of the same type unless the expected operand type register overlap is null. @@ -1347,11 +1346,6 @@ md_assemble (line) i.types[xchg1] = temp_type; } - if (!strcmp(mnemonic,"jmp") - || !strcmp (mnemonic, "call")) - if ((i.types[0] & Reg) || i.types[0] & BaseIndex) - i.types[0] |= JumpAbsolute; - } overlap0 = 0; overlap1 = 0; @@ -1458,6 +1452,12 @@ md_assemble (line) as_bad (_("suffix or operands invalid for `%s'"), current_templates->start->name); return; + } + + if (!intel_syntax + && (i.types[0] & JumpAbsolute) != (t->operand_types[0] & JumpAbsolute)) + { + as_warn (_("Indirect %s without `*'"), t->name); } if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) == (IsPrefix|IgnoreSize)) diff -up -r --new-file binutils-2.9.5.0.22/gas/configure binutils-2.9.5.0.24/gas/configure --- binutils-2.9.5.0.22/gas/configure Wed Sep 22 15:12:58 1999 +++ binutils-2.9.5.0.24/gas/configure Thu Jan 13 11:43:43 2000 @@ -2021,8 +2021,9 @@ for this_target in $target $canon_target arm-*-aout) fmt=aout ;; arm-*-coff | thumb-*-coff) fmt=coff ;; arm-*-elf | thumb-*-elf) fmt=elf ;; + arm*-*-conix*) fmt=elf ;; arm-*-linux*aout*) fmt=aout em=linux ;; - arm-*-linux* | armv*-*-linux-gnu) fmt=elf em=linux ;; + arm*-*-linux-gnu*) fmt=elf em=linux ;; arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; arm-*-oabi | thumb-*-oabi) fmt=elf ;; arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;; diff -up -r --new-file binutils-2.9.5.0.22/gas/configure.in binutils-2.9.5.0.24/gas/configure.in --- binutils-2.9.5.0.22/gas/configure.in Wed Sep 22 15:12:58 1999 +++ binutils-2.9.5.0.24/gas/configure.in Thu Jan 13 11:43:43 2000 @@ -149,8 +149,9 @@ changequote([,])dnl arm-*-aout) fmt=aout ;; arm-*-coff | thumb-*-coff) fmt=coff ;; arm-*-elf | thumb-*-elf) fmt=elf ;; + arm*-*-conix*) fmt=elf ;; arm-*-linux*aout*) fmt=aout em=linux ;; - arm-*-linux* | armv*-*-linux-gnu) fmt=elf em=linux ;; + arm*-*-linux-gnu*) fmt=elf em=linux ;; arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; arm-*-oabi | thumb-*-oabi) fmt=elf ;; arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;; diff -up -r --new-file binutils-2.9.5.0.22/gas/doc/as.texinfo binutils-2.9.5.0.24/gas/doc/as.texinfo --- binutils-2.9.5.0.22/gas/doc/as.texinfo Tue Oct 12 09:04:49 1999 +++ binutils-2.9.5.0.24/gas/doc/as.texinfo Thu Jan 13 11:43:43 2000 @@ -1555,6 +1555,9 @@ is considered a comment and is ignored. @ifset ARC @samp{;} on the ARC; @end ifset +@ifset ARM +@samp{@@} on the ARM; +@end ifset @ifset H8/300 @samp{;} for the H8/300 family; @end ifset @@ -3195,6 +3198,9 @@ Some machine configurations provide addi * Type:: @code{.type @var{int}} * Val:: @code{.val @var{addr}} @end ifset +@ifset ELF +* Visibility:: @code{.internal @var{name}, .hidden @var{name}, .protected @var{name}} +@end ifset * Uleb128:: @code{.uleb128 @var{expressions}} * Word:: @code{.word @var{expressions}} @@ -4755,6 +4761,40 @@ configured for @code{b.out}, it accepts @var{uleb128} stands for ``unsigned little endian base 128.'' This is a compact, variable length representation of numbers used by the DWARF symbolic debugging format. @xref{Sleb128,@code{.sleb128}}. + +@ifset ELF +@node Visibility +@section @code{.internal}, @code{.hidden}, @code{.protected} +@cindex @code{internal} directive +@cindex @code{hidden} directive +@cindex @code{protected} directive +@cindex symbol visibility + +These directives can be used to set the visibility of a specified symbol. By +default a symbol's visibility is set by its binding (local, global or weak), +but these directives can be used to override that. + +A visibility of @code{protected} means that any references to the symbol from +within the component that defines the symbol must be resolved to the definition +in that component, even if a definition in another component would normally +preempt this. + +A visibility of @code{hidden} means that the symbol is not visible to other +components. Such a symbol is always considered to be protected as well. + +A visibility of @code{internal} is the same as a visibility of @code{hidden}, +except that some extra, processor specific processing must also be performed +upon the symbol. + +For ELF targets, the directives are used like this: + +@smallexample +.internal @var{name} +.hidden @var{name} +.protected @var{name} +@end smallexample + +@end ifset @node Word @section @code{.word @var{expressions}} diff -up -r --new-file binutils-2.9.5.0.22/gas/doc/c-arm.texi binutils-2.9.5.0.24/gas/doc/c-arm.texi --- binutils-2.9.5.0.22/gas/doc/c-arm.texi Thu Sep 9 16:11:23 1999 +++ binutils-2.9.5.0.24/gas/doc/c-arm.texi Thu Jan 13 11:35:57 2000 @@ -66,7 +66,7 @@ Calling Standard. @item -mapcs-float This indicates the the floating point variant of the APCS should be used. In this variant floating point arguments are passed in FP -registers ratehr than integer registers. +registers rather than integer registers. @item -mapcs-reentrant This indicates that the reentrant variant of the APCS should be used. This variant supports position independent code. @@ -102,8 +102,19 @@ the final release of the ARM-ELF specifi @cindex line comment character, ARM @cindex ARM line comment character -The presence of a @samp{#} and @samp{@@} on a line indicates the start of -a comment that extends to the end of the current line. +The presence of a @samp{@@} on a line indicates the start of a comment +that extends to the end of the current line. If a @samp{#} appears as +the first character of a line, the whole line is treated as a comment. + +@cindex line separator, ARM +@cindex statement separator, ARM +@cindex ARM line separator +On ARM systems running the GNU/Linux operating system, @samp{;} can be +used instead of a newline to separate statements. + +@cindex immediate character, ARM +@cindex ARM immediate character +Either @samp{#} or @samp{$} can be used to indicate immediate operands. @cindex identifiers, ARM @cindex ARM identifiers diff -up -r --new-file binutils-2.9.5.0.22/include/ChangeLog binutils-2.9.5.0.24/include/ChangeLog --- binutils-2.9.5.0.22/include/ChangeLog Fri Nov 19 09:43:47 1999 +++ binutils-2.9.5.0.24/include/ChangeLog Thu Jan 13 11:36:04 2000 @@ -1,3 +1,7 @@ +1999-12-15 Doug Evans + + * dis-asm.h: Enclose in extern "C" ifdef __cplusplus. + Sun Oct 24 19:11:32 1999 Andrew Cagney * sim-d10v.h (SIM_D10V_TS2_DMAP_REGNUM): Define. diff -up -r --new-file binutils-2.9.5.0.22/include/coff/ChangeLog binutils-2.9.5.0.24/include/coff/ChangeLog --- binutils-2.9.5.0.22/include/coff/ChangeLog Wed Sep 22 14:50:50 1999 +++ binutils-2.9.5.0.24/include/coff/ChangeLog Thu Jan 13 11:36:04 2000 @@ -1,3 +1,28 @@ +2000-01-05 Nick Clifton + + * pe.h: Fix formatting of comments. + (IMAGE_FILE_AGGRESSIVE_WS_TRIM): Define. + (IMAGE_FILE_LARGE_ADDRESS_AWARE): Define. + (IMAGE_FILE_16BIT_MACHINE): Define. + (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP): Define. + (IMAGE_FILE_UP_SYSTEM_ONLY): Define. + (IMAGE_FILE_MACHINE_UNKNOWN): Define. + (IMAGE_FILE_MACHINE_ALPHA): Define. + (IMAGE_FILE_MACHINE_ALPHA64): Define. + (IMAGE_FILE_MACHINE_I386): Define. + (IMAGE_FILE_MACHINE_IA64): Define. + (IMAGE_FILE_MACHINE_M68K): Define. + (IMAGE_FILE_MACHINE_MIPS16): Define. + (IMAGE_FILE_MACHINE_MIPSFPU): Define. + (IMAGE_FILE_MACHINE_MIPSFPU16): Define. + (IMAGE_FILE_MACHINE_POWERPC): Define. + (IMAGE_FILE_MACHINE_R3000): Define. + (IMAGE_FILE_MACHINE_R4000): Define. + (IMAGE_FILE_MACHINE_R10000): Define. + (IMAGE_FILE_MACHINE_SH3): Define. + (IMAGE_FILE_MACHINE_SH4): Define. + (IMAGE_FILE_MACHINE_THUMB): Define. + 1999-09-20 Alan Modra * internal.h: Delete bogus R_PCLONG, duplicate R_RELBYTE and diff -up -r --new-file binutils-2.9.5.0.22/include/coff/pe.h binutils-2.9.5.0.24/include/coff/pe.h --- binutils-2.9.5.0.22/include/coff/pe.h Thu Sep 9 16:11:49 1999 +++ binutils-2.9.5.0.24/include/coff/pe.h Thu Jan 13 11:36:04 2000 @@ -3,29 +3,32 @@ #ifndef _PE_H #define _PE_H -/* NT specific file attributes */ +/* NT specific file attributes. */ #define IMAGE_FILE_RELOCS_STRIPPED 0x0001 #define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 #define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 #define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 +#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010 +#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020 +#define IMAGE_FILE_16BIT_MACHINE 0x0040 #define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 #define IMAGE_FILE_32BIT_MACHINE 0x0100 #define IMAGE_FILE_DEBUG_STRIPPED 0x0200 +#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 #define IMAGE_FILE_SYSTEM 0x1000 #define IMAGE_FILE_DLL 0x2000 +#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 #define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 -/* additional flags to be set for section headers to allow the NT loader to +/* Additional flags to be set for section headers to allow the NT loader to read and write to the section data (to replace the addresses of data in - dlls for one thing); also to execute the section in .text's case */ + dlls for one thing); also to execute the section in .text's case. */ #define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 #define IMAGE_SCN_MEM_EXECUTE 0x20000000 #define IMAGE_SCN_MEM_READ 0x40000000 #define IMAGE_SCN_MEM_WRITE 0x80000000 -/* - * Section characteristics added for ppc-nt - */ +/* Section characteristics added for ppc-nt. */ #define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */ @@ -53,7 +56,6 @@ #define IMAGE_SCN_ALIGN_32BYTES 0x00600000 #define IMAGE_SCN_ALIGN_64BYTES 0x00700000 - #define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */ #define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */ #define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */ @@ -67,6 +69,26 @@ #define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */ #define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */ +/* Machine numbers. */ + +#define IMAGE_FILE_MACHINE_UNKNOWN 0x0 +#define IMAGE_FILE_MACHINE_ALPHA 0x184 +#define IMAGE_FILE_MACHINE_ARM 0x1c0 +#define IMAGE_FILE_MACHINE_ALPHA64 0x284 +#define IMAGE_FILE_MACHINE_I386 0x14c +#define IMAGE_FILE_MACHINE_IA64 0x200 +#define IMAGE_FILE_MACHINE_M68K 0x268 +#define IMAGE_FILE_MACHINE_MIPS16 0x266 +#define IMAGE_FILE_MACHINE_MIPSFPU 0x366 +#define IMAGE_FILE_MACHINE_MIPSFPU16 0x466 +#define IMAGE_FILE_MACHINE_POWERPC 0x1f0 +#define IMAGE_FILE_MACHINE_R3000 0x162 +#define IMAGE_FILE_MACHINE_R4000 0x166 +#define IMAGE_FILE_MACHINE_R10000 0x168 +#define IMAGE_FILE_MACHINE_SH3 0x1a2 +#define IMAGE_FILE_MACHINE_SH4 0x1a6 +#define IMAGE_FILE_MACHINE_THUMB 0x1c2 + /* Magic values that are true for all dos/nt implementations */ #define DOSMAGIC 0x5a4d #define NT_SIGNATURE 0x00004550 @@ -103,7 +125,6 @@ struct external_PEI_filehdr /* From standard header */ - char f_magic[2]; /* magic number */ char f_nscns[2]; /* number of sections */ char f_timdat[4]; /* time & date stamp */ @@ -116,11 +137,11 @@ struct external_PEI_filehdr #ifdef COFF_IMAGE_WITH_PE -/* The filehdr is only weird in images */ +/* The filehdr is only weird in images. */ -#undef FILHDR +#undef FILHDR #define FILHDR struct external_PEI_filehdr -#undef FILHSZ +#undef FILHSZ #define FILHSZ 152 #endif /* COFF_IMAGE_WITH_PE */ @@ -163,6 +184,3 @@ typedef struct #undef E_FILNMLEN #define E_FILNMLEN 18 /* # characters in a file name */ #endif - - - diff -up -r --new-file binutils-2.9.5.0.22/include/dis-asm.h binutils-2.9.5.0.24/include/dis-asm.h --- binutils-2.9.5.0.22/include/dis-asm.h Mon Sep 6 10:57:22 1999 +++ binutils-2.9.5.0.24/include/dis-asm.h Thu Jan 13 11:43:43 2000 @@ -9,6 +9,10 @@ #ifndef DIS_ASM_H #define DIS_ASM_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include "bfd.h" @@ -246,5 +250,9 @@ extern int generic_symbol_at_address (INFO).bytes_per_chunk = 0, \ (INFO).display_endian = BFD_ENDIAN_UNKNOWN, \ (INFO).insn_info_valid = 0 + +#ifdef __cplusplus +}; +#endif #endif /* ! defined (DIS_ASM_H) */ diff -up -r --new-file binutils-2.9.5.0.22/include/elf/ChangeLog binutils-2.9.5.0.24/include/elf/ChangeLog --- binutils-2.9.5.0.22/include/elf/ChangeLog Thu Dec 2 08:45:04 1999 +++ binutils-2.9.5.0.24/include/elf/ChangeLog Thu Jan 13 11:36:04 2000 @@ -1,3 +1,83 @@ +2000-01-11 Nick Clifton + + * common.h (DT_ENCODING): Fix definition of this value. + (DT_LOOS): Fix definition of this value. + (DT_HIOS): Fix definition of this value. + (OLD_DT_LOOS): Value of DT_LOOS before Oct 4, 1999 draft + of ELF spec changed it. + (OLD_DT_HIOS): Value of DT_HIOS before Oct 4, 1999 draft + of ELF spec changed it. + +2000-01-10 Egor Duda + + * common.h (NT_WIN32PSTATUS): Define. (cygwin elf core dumps). + +1999-12-28 Nick Clifton + + * mips.h (STO_*): Redefine in terms of STV_* values now in + common.h. + +1999-12-27 Nick Clifton + + * common.h: Upgrade to match Oct4, 1999 Draft ELF ABI Spec. + (EM_MIPS_RS3_LE): New machine number. + (EM_RCE): New machine number. + (EM_MMA): New machine number. + (EM_PCP): New machine number. + (EM_NCPU): New machine number. + (EM_NDR1): New machine number. + (EM_STARCORE): New machine number. + (EM_ME16): New machine number. + (EM_ST100): New machine number. + (EM_TINYJ): New machine number. + (EM_FX66): New machine number. + (EM_ST9PLUS): New machine number. + (EM_ST7): New machine number. + (EM_68HC16): New machine number. + (EM_68HC11): New machine number. + (EM_68HC08): New machine number. + (EM_68HC05): New machine number. + (EM_SVX): New machine number. + (EM_VAX): New machine number. + (PF_MASKOS): Change value. + (SHT_INIT_ARRAY): New value for sh_type field. + (SHT_FINI_ARRAY): New value for sh_type field. + (SHT_PREINIT_ARRAY): New value for sh_type field. + (SHT_HIUSER): Change value. + (SHF_MERGE): New valye for sh_flags field. + (SHF_STRINGS): New valye for sh_flags field. + (SHF_INFO_LINK): New valye for sh_flags field. + (SHF_OS_NONCONFORMING): New valye for sh_flags field. + (SHF_MASKOS): Change value. + (ELF_ST_VISIBILITY): New macro. + (ELF_ST_OTHER): New macro. + (STT_COMMON): New symbol type. + (STV_DEFAULT): Value for symbol visibility. + (STV_INTERNAL): Value for symbol visibility. + (STV_HIDDEN): Value for symbol visibility. + (STV_PROTECTED): Value for symbol visibility. + (DT_RUNPATH): New dynamic section tag. + (DT_FLAGS): New dynamic section tag. + (DT_ENCODING): New dynamic section tag. + (DT_PREINIT_ARRAY): New dynamic section tag. + (DT_PREINIT_ARRAYSZ): New dynamic section tag. + (DT_LOPROC): New dynamic section tag index. + (DT_HIPROC): New dynamic section tag index. + (DF_ORIGIN): Value for dynamic section flag. + (DF_SYMBOLIC): Value for dynamic section flag. + (DF_TEXTREL): Value for dynamic section flag. + (DF_BIND_NOW): Value for dynamic section flag. + +1999-12-09 Fred Fish + + * i960.h (reloc-macros.h): Include using relative dir elf/. + * i386.h (reloc-macros.h): Include using relative dir elf/. + * hppa.h (reloc-macros.h): Include using relative dir elf/. + +1999-12-07 Jim Blandy + + * common.h (NT_PRXFPREG): New definition. + Wed Dec 1 03:02:15 1999 Jeffrey A Law (law@cygnus.com) * mn10300.h (E_MN10300_MACH_AM33): Define. diff -up -r --new-file binutils-2.9.5.0.22/include/elf/ChangeLog.linux binutils-2.9.5.0.24/include/elf/ChangeLog.linux --- binutils-2.9.5.0.22/include/elf/ChangeLog.linux Thu Nov 4 10:35:08 1999 +++ binutils-2.9.5.0.24/include/elf/ChangeLog.linux Thu Jan 13 11:51:30 2000 @@ -1,3 +1,7 @@ +Thu Jan 13 11:47:03 2000 H.J. Lu + + * common.h (EM_IA_64): Use IA-64 instead of Merced. + Tue Nov 2 08:01:53 1999 H.J. Lu * common.h (EM_S370): Change description to IBM System/370. diff -up -r --new-file binutils-2.9.5.0.22/include/elf/common.h binutils-2.9.5.0.24/include/elf/common.h --- binutils-2.9.5.0.22/include/elf/common.h Thu Nov 4 10:36:05 1999 +++ binutils-2.9.5.0.24/include/elf/common.h Thu Jan 13 11:51:30 2000 @@ -92,9 +92,11 @@ Foundation, Inc., 59 Temple Place - Suit #define EM_860 7 /* Intel 80860 */ #define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ #define EM_S370 9 /* IBM System/370 */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ +#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ /* Depreciated */ +#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */ #define EM_PARISC 15 /* HPPA */ + #define EM_VPP550 17 /* Fujitsu VPP500 */ #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ #define EM_960 19 /* Intel 80960 */ @@ -105,6 +107,7 @@ Foundation, Inc., 59 Temple Place - Suit #define EM_FR20 37 /* Fujitsu FR20 */ #define EM_RH32 38 /* TRW RH32 */ #define EM_MCORE 39 /* Motorolla MCore */ /* May also be taken by Fujitsu MMA */ +#define EM_RCE 39 /* Old name for MCore */ #define EM_ARM 40 /* ARM */ #define EM_OLD_ALPHA 41 /* Digital Alpha */ #define EM_SH 42 /* Hitachi SH */ @@ -115,10 +118,29 @@ Foundation, Inc., 59 Temple Place - Suit #define EM_H8_300H 47 /* Hitachi H8/300H */ #define EM_H8S 48 /* Hitachi H8S */ #define EM_H8_500 49 /* Hitachi H8/500 */ -#define EM_IA_64 50 /* Intel MercedTM Processor */ +#define EM_IA_64 50 /* Intel IA-64 Processor */ #define EM_MIPS_X 51 /* Stanford MIPS-X */ #define EM_COLDFIRE 52 /* Motorola Coldfire */ #define EM_68HC12 53 /* Motorola M68HC12 */ +#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */ +#define EM_PCP 55 /* Siemens PCP */ +#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */ +#define EM_NDR1 57 /* Denso NDR1 microprocesspr */ +#define EM_STARCORE 58 /* Motorola Star*Core processor */ +#define EM_ME16 59 /* Toyota ME16 processor */ +#define EM_ST100 60 /* STMicroelectronics ST100 processor */ +#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */ + +#define EM_FX66 66 /* Siemens FX66 microcontroller */ +#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */ +#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */ +#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */ +#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */ +#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */ +#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */ +#define EM_SVX 73 /* Silicon Graphics SVx */ +#define EM_ST19 74 /* STMicroelectronics ST19 8-bit microcontroller */ +#define EM_VAX 75 /* Digital VAX */ #define EM_PJ 99 /* picoJava */ @@ -195,7 +217,8 @@ Foundation, Inc., 59 Temple Place - Suit #define PF_X (1 << 0) /* Segment is executable */ #define PF_W (1 << 1) /* Segment is writable */ #define PF_R (1 << 2) /* Segment is readable */ -#define PF_MASKOS 0x0F000000 /* OS-specific reserved bits */ +/* #define PF_MASKOS 0x0F000000 *//* OS-specific reserved bits */ +#define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */ /* Values for section header, sh_type field */ @@ -213,6 +236,10 @@ Foundation, Inc., 59 Temple Place - Suit #define SHT_SHLIB 10 /* Reserved, unspecified semantics */ #define SHT_DYNSYM 11 /* Dynamic linking symbol table */ +#define SHT_INIT_ARRAY 14 /* Array of pointers to init functions */ +#define SHT_FINI_ARRAY 15 /* Array of pointers to finish functions */ +#define SHT_PREINIT_ARRAY 16 /* Array of pointers to pre-init functions */ + #define SHT_LOOS 0x60000000 /* Operating system specific semantics, lo */ #define SHT_HIOS 0x6fffffff /* Operating system specific semantics, hi */ @@ -230,14 +257,22 @@ Foundation, Inc., 59 Temple Place - Suit #define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */ #define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */ #define SHT_LOUSER 0x80000000 /* Application-specific semantics */ -#define SHT_HIUSER 0x8FFFFFFF /* Application-specific semantics */ +/* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */ +#define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */ /* Values for section header, sh_flags field */ #define SHF_WRITE (1 << 0) /* Writable data during execution */ #define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ #define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */ -#define SHF_MASKOS 0x0F000000 /* OS-specific semantics */ +#define SHF_MERGE (1 << 4) /* Data in this section can be merged */ +#define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */ +#define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */ +#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */ +#define SHF_OS_NONCONFORMING (1 << 8) /* OS specifci processing required */ + +/* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */ +#define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ #define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */ /* Values of note segment descriptor types for core files. */ @@ -246,6 +281,8 @@ Foundation, Inc., 59 Temple Place - Suit #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ #define NT_TASKSTRUCT 4 /* Contains copy of task struct */ +#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */ + /* note name must be "LINUX". */ /* Note segments for core files on dir-style procfs systems. */ @@ -254,6 +291,7 @@ Foundation, Inc., 59 Temple Place - Suit #define NT_PSINFO 13 /* Has a struct psinfo */ #define NT_LWPSTATUS 16 /* Has a struct lwpstatus_t */ #define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */ +#define NT_WIN32PSTATUS 18 /* Has a struct win32_pstatus */ /* Values of note segment descriptor types for object files. */ /* (Only for hppa right now. Should this be moved elsewhere?) */ @@ -268,6 +306,27 @@ Foundation, Inc., 59 Temple Place - Suit #define ELF_ST_TYPE(val) ((val) & 0xF) #define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF)) +/* The 64bit and 32bit versions of these macros are identical, but + the ELF spec defines them, so here they are. */ +#define ELF32_ST_BIND ELF_ST_BIND +#define ELF32_ST_TYPE ELF_ST_TYPE +#define ELF32_ST_INFO ELF_ST_INFO +#define ELF64_ST_BIND ELF_ST_BIND +#define ELF64_ST_TYPE ELF_ST_TYPE +#define ELF64_ST_INFO ELF_ST_INFO + +/* These two macros disassemble and assemble a symbol's visibility into + the st_other field. The STV_ defines specificy the actual visibility. */ + +#define ELF_ST_VISIBILITY(v) ((v) & 0x3) +#define ELF_ST_OTHER(o) ((o) & ~0x3) + +#define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY +#define ELF32_ST_OTHER ELF_ST_OTHER +#define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY +#define ELF64_ST_OTHER ELF_ST_OTHER + + #define STN_UNDEF 0 /* undefined symbol index */ #define STB_LOCAL 0 /* Symbol not visible outside obj */ @@ -283,6 +342,7 @@ Foundation, Inc., 59 Temple Place - Suit #define STT_FUNC 2 /* Symbol is a code object */ #define STT_SECTION 3 /* Symbol associated with a section */ #define STT_FILE 4 /* Symbol gives a file name */ +#define STT_COMMON 5 /* An uninitialised common block */ #define STT_LOOS 10 /* OS-specific semantics */ #define STT_HIOS 12 /* OS-specific semantics */ #define STT_LOPROC 13 /* Application-specific semantics */ @@ -301,6 +361,15 @@ Foundation, Inc., 59 Temple Place - Suit #define SHN_COMMON 0xFFF2 /* Associated symbol is in common */ #define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */ +/* The following constants control how a symbol may be accessed once it has + become part of an executable or shared library. */ + +#define STV_DEFAULT 0 /* Visibility is specified by binding type */ +#define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */ +#define STV_HIDDEN 2 /* Can only be seen inside currect component */ +#define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */ + + /* relocation info handling macros */ #define ELF32_R_SYM(i) ((i) >> 8) @@ -342,12 +411,28 @@ Foundation, Inc., 59 Temple Place - Suit #define DT_FINI_ARRAY 26 #define DT_INIT_ARRAYSZ 27 #define DT_FINI_ARRAYSZ 28 +#define DT_RUNPATH 29 +#define DT_FLAGS 30 -#define DT_LOOS 0x60000000 -#define DT_HIOS 0x6fffffff +#define DT_ENCODING 32 +#define DT_PREINIT_ARRAY 32 +#define DT_PREINIT_ARRAYSZ 33 + +/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values + for DT_LOOS and DT_HIOS. Some implementations however, use + values outside of the new range (see below). */ +#define OLD_DT_LOOS 0x60000000 +#define DT_LOOS 0x6000000d +#define DT_HIOS 0x6fff0000 +#define OLD_DT_HIOS 0x6fffffff + +#define DT_LOPROC 0x70000000 +#define DT_HIPROC 0x7fffffff /* The next four dynamic tags are used on Solaris. We support them - everywhere. */ + everywhere. Note these values lie outside of the (new) range for + OS specific values. This is a deliberate special case and we + maintain it for backwards compatability. */ #define DT_VALRNGLO 0x6ffffd00 #define DT_PLTPADSZ 0x6ffffdf9 #define DT_MOVEENT 0x6ffffdfa @@ -402,6 +487,12 @@ Foundation, Inc., 59 Temple Place - Suit #define DF_1_DIRECT 0x00000100 #define DF_1_TRANS 0x00000200 #define DF_1_INTERPOSE 0x00000400 + +/* Flag values for the DT_FLAGS entry. */ +#define DF_ORIGIN (1 << 0) +#define DF_SYMBOLIC (1 << 1) +#define DF_TEXTREL (1 << 2) +#define DF_BIND_NOW (1 << 3) /* These constants are used for the version number of a Elf32_Verdef structure. */ diff -up -r --new-file binutils-2.9.5.0.22/include/elf/hppa.h binutils-2.9.5.0.24/include/elf/hppa.h --- binutils-2.9.5.0.22/include/elf/hppa.h Tue Oct 12 08:56:16 1999 +++ binutils-2.9.5.0.24/include/elf/hppa.h Thu Jan 13 11:36:04 2000 @@ -99,7 +99,7 @@ Foundation, Inc., 59 Temple Place - Suit /* ELF/HPPA relocation types */ /* Note: PA-ELF is defined to use only RELA relocations. */ -#include "reloc-macros.h" +#include "elf/reloc-macros.h" START_RELOC_NUMBERS (elf_hppa_reloc_type) RELOC_NUMBER (R_PARISC_NONE, 0) /* No reloc */ diff -up -r --new-file binutils-2.9.5.0.22/include/elf/i386.h binutils-2.9.5.0.24/include/elf/i386.h --- binutils-2.9.5.0.22/include/elf/i386.h Thu Jun 3 11:02:09 1999 +++ binutils-2.9.5.0.24/include/elf/i386.h Thu Jan 13 11:36:04 2000 @@ -20,7 +20,7 @@ #ifndef _ELF_I386_H #define _ELF_I386_H -#include "reloc-macros.h" +#include "elf/reloc-macros.h" START_RELOC_NUMBERS (elf_i386_reloc_type) RELOC_NUMBER (R_386_NONE, 0) /* No reloc */ diff -up -r --new-file binutils-2.9.5.0.22/include/elf/i960.h binutils-2.9.5.0.24/include/elf/i960.h --- binutils-2.9.5.0.22/include/elf/i960.h Thu Jun 3 11:02:09 1999 +++ binutils-2.9.5.0.24/include/elf/i960.h Thu Jan 13 11:36:04 2000 @@ -20,7 +20,8 @@ #ifndef _ELF_I960_H #define _ELF_I960_H -#include "reloc-macros.h" +#include "elf/reloc-macros.h" + START_RELOC_NUMBERS (elf_i960_reloc_type) RELOC_NUMBER (R_960_NONE, 0) diff -up -r --new-file binutils-2.9.5.0.22/include/elf/mips.h binutils-2.9.5.0.24/include/elf/mips.h --- binutils-2.9.5.0.22/include/elf/mips.h Sat Jun 26 18:03:08 1999 +++ binutils-2.9.5.0.24/include/elf/mips.h Thu Jan 13 11:36:04 2000 @@ -617,10 +617,10 @@ extern void bfd_mips_elf32_swap_reginfo_ /* Special values for the st_other field in the symbol table. These are used in an Irix 5 dynamic symbol table. */ -#define STO_DEFAULT 0x00 -#define STO_INTERNAL 0x01 -#define STO_HIDDEN 0x02 -#define STO_PROTECTED 0x03 +#define STO_DEFAULT STV_DEFAULT +#define STO_INTERNAL STV_INTERNAL +#define STO_HIDDEN STV_HIDDEN +#define STO_PROTECTED STV_PROTECTED /* This value is used for a mips16 .text symbol. */ #define STO_MIPS16 0xf0 diff -up -r --new-file binutils-2.9.5.0.22/include/opcode/ChangeLog binutils-2.9.5.0.24/include/opcode/ChangeLog --- binutils-2.9.5.0.22/include/opcode/ChangeLog Thu Dec 2 08:45:06 1999 +++ binutils-2.9.5.0.24/include/opcode/ChangeLog Thu Jan 13 11:36:04 2000 @@ -1,3 +1,8 @@ +1999-12-27 Alan Modra + + * i386.h: Add JumpAbsolute qualifier to all non-intel mode + indirect jumps and calls. Add FF/3 call for intel mode. + Wed Dec 1 03:05:25 1999 Jeffrey A Law (law@cygnus.com) * mn10300.h: Add new operand types. Add new instruction formats. diff -up -r --new-file binutils-2.9.5.0.22/include/opcode/i386.h binutils-2.9.5.0.24/include/opcode/i386.h --- binutils-2.9.5.0.22/include/opcode/i386.h Tue Aug 31 10:12:47 1999 +++ binutils-2.9.5.0.24/include/opcode/i386.h Thu Jan 13 11:36:05 2000 @@ -315,17 +315,20 @@ static const template i386_optab[] = { {"call", 1, 0xff, 2, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} }, /* Intel Syntax */ {"call", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} }, +/* Intel Syntax */ +{"call", 1, 0xff, 3, wl_Suf|Modrm|DefaultSize, { WordMem, 0, 0} }, {"lcall", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} }, -{"lcall", 1, 0xff, 3, wl_Suf|Modrm|DefaultSize, { WordMem, 0, 0} }, +{"lcall", 1, 0xff, 3, wl_Suf|Modrm|DefaultSize, { WordMem|JumpAbsolute, 0, 0} }, #define JUMP_PC_RELATIVE 0xeb {"jmp", 1, 0xeb, X, NoSuf|Jump, { Disp, 0, 0} }, {"jmp", 1, 0xff, 4, wl_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} }, /* Intel Syntax */ {"jmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} }, +/* Intel Syntax */ {"jmp", 1, 0xff, 5, wl_Suf|Modrm, { WordMem, 0, 0} }, {"ljmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} }, -{"ljmp", 1, 0xff, 5, wl_Suf|Modrm, { WordMem, 0, 0} }, +{"ljmp", 1, 0xff, 5, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} }, {"ret", 0, 0xc3, X, wl_Suf|DefaultSize, { 0, 0, 0} }, {"ret", 1, 0xc2, X, wl_Suf|DefaultSize, { Imm16, 0, 0} }, diff -up -r --new-file binutils-2.9.5.0.22/ld/ChangeLog binutils-2.9.5.0.24/ld/ChangeLog --- binutils-2.9.5.0.22/ld/ChangeLog Thu Dec 2 08:45:08 1999 +++ binutils-2.9.5.0.24/ld/ChangeLog Thu Jan 13 11:36:05 2000 @@ -1,3 +1,47 @@ +2000-01-10 Philip Blundell + + * configure.tgt (arm*-*-conix*): New target. + +2000-01-07 Nick Clifton + + * ld.texinfo (Options): Remind users to preceed linker command + line switches with -Wl, (or whatever is appropriate) if it is + being invoked by a comnpiler driver program. + Fix description of the behaviour of the -n command line switch. + +Wed Jan 5 08:02:12 2000 Catherine Moore + + * ld.h (wildcard_spec): Change exclude_name to exclude_name_list. + (name_list): New. + * ld.texinfo (EXCLUDE_FILE): Update documentation. + * ldgram.y (wildcard_spec): Support a list of excluded_files. + (exclude_name_list): New. + ldlang.c (walk_wild_section): Support list of excluded files. + (print_wild_statement): Likewise. + (lang_add_wild): Likewise. + * ldlang.h (lang_wild_statement_type): Likewise. + * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support. + +2000-01-04 Mumit Khan + + * pe-dll.c (pe_dll_warn_dup_exports): New variable. + (process_def_file): Use. + (pe_dll_compat_implib): New variable. + (make_one): Use. + + * pe-dll.h: Add exports of pe_dll_warn_dup_exports and + pe_dll_compat_implib. + + * emultempl/pe.em (longopts): Add warn-duplicate-exports and + compat-implib options. + (gld_${EMULATION_NAME}_list_options): List new options. + (gld_${EMULATION_NAME}_parse_args): Handle. + + * pe-dll.c (pe_dll_generate_implib): Use the correct name for output + dll. + + * deffilep.y (opt_name): Allow "." in name. + 1999-12-02 Nick Clifton * Makefile.am: Fix arm-epoc-pe dependencies. diff -up -r --new-file binutils-2.9.5.0.22/ld/ChangeLog.linux binutils-2.9.5.0.24/ld/ChangeLog.linux --- binutils-2.9.5.0.22/ld/ChangeLog.linux Tue Oct 12 09:05:49 1999 +++ binutils-2.9.5.0.24/ld/ChangeLog.linux Thu Jan 13 11:24:39 2000 @@ -1,3 +1,8 @@ +Sun Jan 9 09:50:17 2000 H.J. Lu + + * ldmain.c (undefined_symbol): Don't delete the output file + for -Bsymbolic when creating shared library. + Mon Oct 11 15:18:43 1999 H.J. Lu * configure.in: Check HAVE_WEAK_SYMBOL before checking dlopen. diff -up -r --new-file binutils-2.9.5.0.22/ld/configure.tgt binutils-2.9.5.0.24/ld/configure.tgt --- binutils-2.9.5.0.22/ld/configure.tgt Mon Sep 6 10:57:22 1999 +++ binutils-2.9.5.0.24/ld/configure.tgt Thu Jan 13 11:43:43 2000 @@ -135,6 +135,7 @@ arm-*-elf) targ_emul=armelf ;; arm-*-oabi) targ_emul=armelf_oabi ;; arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls="armelf_linux26 armelf" ;; arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; +arm*-*-conix*) targ_emul=armelf ;; thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; strongarm-*-coff) targ_emul=armcoff ;; strongarm-*-elf) targ_emul=armelf ;; diff -up -r --new-file binutils-2.9.5.0.22/ld/deffilep.y binutils-2.9.5.0.24/ld/deffilep.y --- binutils-2.9.5.0.22/ld/deffilep.y Sat Oct 9 09:14:00 1999 +++ binutils-2.9.5.0.24/ld/deffilep.y Thu Jan 13 11:36:06 2000 @@ -1,6 +1,6 @@ %{ /* deffilep.y - parser for .def files */ -/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -214,7 +214,13 @@ attr: ; opt_name: ID { $$ = $1; } - | { $$ = 0; } + | ID '.' ID + { + char * name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1); + sprintf (name, "%s.%s", $1, $3); + $$ = name; + } + | { $$ = ""; } ; opt_ordinal: diff -up -r --new-file binutils-2.9.5.0.22/ld/emultempl/pe.em binutils-2.9.5.0.24/ld/emultempl/pe.em --- binutils-2.9.5.0.22/ld/emultempl/pe.em Sat Oct 9 09:14:06 1999 +++ binutils-2.9.5.0.24/ld/emultempl/pe.em Thu Jan 13 11:36:13 2000 @@ -4,7 +4,7 @@ rm -f e${EMULATION_NAME}.c (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) cat >>e${EMULATION_NAME}.c < Generate import library\n")); fprintf (file, _(" --output-def Generate a .DEF file for the built DLL\n")); + fprintf (file, _(" --warn-duplicate-exports Warn about duplicate exports.\n")); + fprintf (file, _(" --compat-implib Create backward compatible import libs;\n")); + fprintf (file, _(" create __imp_ as well.\n")); #endif } @@ -489,6 +496,12 @@ gld_${EMULATION_NAME}_parse_args(argc, a break; case OPTION_IMPLIB_FILENAME: pe_implib_filename = xstrdup (optarg); + break; + case OPTION_WARN_DUPLICATE_EXPORTS: + pe_dll_warn_dup_exports = 1; + break; + case OPTION_IMP_COMPAT: + pe_dll_compat_implib = 1; break; #endif } diff -up -r --new-file binutils-2.9.5.0.22/ld/ld.h binutils-2.9.5.0.24/ld/ld.h --- binutils-2.9.5.0.22/ld/ld.h Sun Oct 10 12:23:21 1999 +++ binutils-2.9.5.0.24/ld/ld.h Thu Jan 13 11:43:43 2000 @@ -1,5 +1,5 @@ /* ld.h -- general linker header file - Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -56,13 +56,20 @@ discarded. */ #define DISCARD_SECTION_NAME "/DISCARD/" +/* A file name list */ +typedef struct name_list +{ + const char *name; + struct name_list *next; +} name_list; + /* A wildcard specification. This is only used in ldgram.y, but it winds up in ldgram.h, so we need to define it outside. */ struct wildcard_spec { const char *name; - const char *exclude_name; + struct name_list *exclude_name_list; boolean sorted; }; diff -up -r --new-file binutils-2.9.5.0.22/ld/ld.texinfo binutils-2.9.5.0.24/ld/ld.texinfo --- binutils-2.9.5.0.22/ld/ld.texinfo Thu Sep 9 16:11:54 1999 +++ binutils-2.9.5.0.24/ld/ld.texinfo Thu Jan 13 11:36:06 2000 @@ -18,7 +18,7 @@ END-INFO-DIR-ENTRY @ifinfo This file documents the @sc{gnu} linker LD version @value{VERSION}. -Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -228,6 +228,21 @@ requires them. For example, @samp{--ofo @samp{--oformat=srec} are equivalent. Unique abbreviations of the names of multiple-letter options are accepted. +Note - if the linker is being invoked indirectly, via a compiler driver +(eg @samp{gcc}) then all the linker command line options should be +prefixed by @samp{-Wl,} (or whatever is appropriate for the particular +compiler driver) like this: + +@smallexample + gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup +@end smallexample + +This is important, because otherwise the compiler driver program may +silently drop the linker options, resulting in a bad link. + +Here is a table of the generic command line switches accepted by the GNU +linker: + @table @code @kindex -a@var{keyword} @item -a@var{keyword} @@ -544,8 +559,8 @@ which caused the archive member to be br @kindex --nmagic @item -n @itemx --nmagic -Set the text segment to be read only, and mark the output as -@code{NMAGIC} if possible. +Turn off page alignment of sections, and mark the output as +@code{NMAGIC} if possible. @kindex -N @kindex --omagic @@ -2235,13 +2250,15 @@ include all input @samp{.text} sections, *(.text) @end smallexample @noindent -Here the @samp{*} is a wildcard which matches any file name. To exclude a file -from matching the file name wildcard, EXCLUDE_FILE may be used to match all files -except the one specified by EXCLUDE_FILE. For example: +Here the @samp{*} is a wildcard which matches any file name. To exclude a list +of files from matching the file name wildcard, EXCLUDE_FILE may be used to +match all files except the ones specified in the EXCLUDE_FILE list. For +example: @smallexample -(*(EXCLUDE_FILE (*crtend.o) .ctors)) +(*(EXCLUDE_FILE (*crtend.o, *otherfile.o) .ctors)) @end smallexample -will cause all .ctors sections from all files except crtend.o to be included. +will cause all .ctors sections from all files except crtend.o and otherfile.o +to be included. There are two ways to include more than one section: @smallexample diff -up -r --new-file binutils-2.9.5.0.22/ld/ldgram.y binutils-2.9.5.0.24/ld/ldgram.y --- binutils-2.9.5.0.22/ld/ldgram.y Sun Jun 20 17:15:57 1999 +++ binutils-2.9.5.0.24/ld/ldgram.y Thu Jan 13 11:43:43 2000 @@ -1,5 +1,5 @@ /* A YACC grammer to parse a superset of the AT&T linker scripting languaue. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com). @@ -70,6 +70,7 @@ static int error_index; char *name; const char *cname; struct wildcard_spec wildcard; + struct name_list *name_list; int token; union etree_union *etree; struct phdr_info @@ -89,6 +90,7 @@ static int error_index; %type exp opt_exp_with_type mustbe_exp opt_at phdr_type phdr_val %type opt_exp_without_type %type fill_opt +%type exclude_name_list %type memspec_opt casesymlist %type wildcard_name %type wildcard_spec @@ -392,43 +394,64 @@ wildcard_spec: { $$.name = $1; $$.sorted = false; - $$.exclude_name = NULL; + $$.exclude_name_list = NULL; } - | EXCLUDE_FILE '(' wildcard_name ')' wildcard_name + | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name { $$.name = $5; $$.sorted = false; - $$.exclude_name = $3; + $$.exclude_name_list = $3; } | SORT '(' wildcard_name ')' { $$.name = $3; $$.sorted = true; - $$.exclude_name = NULL; + $$.exclude_name_list = NULL; } - | SORT '(' EXCLUDE_FILE '(' wildcard_name ')' wildcard_name ')' + | SORT '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')' { $$.name = $7; $$.sorted = true; - $$.exclude_name = $5; + $$.exclude_name_list = $5; } ; + +exclude_name_list: + exclude_name_list ',' wildcard_name + { + struct name_list *tmp; + tmp = (struct name_list *) xmalloc (sizeof *tmp); + tmp->name = $3; + tmp->next = $1; + $$ = tmp; + } + | + wildcard_name + { + struct name_list *tmp; + tmp = (struct name_list *) xmalloc (sizeof *tmp); + tmp->name = $1; + tmp->next = NULL; + $$ = tmp; + } + ; + file_NAME_list: wildcard_spec { lang_add_wild ($1.name, $1.sorted, current_file.name, current_file.sorted, - ldgram_had_keep, $1.exclude_name); + ldgram_had_keep, $1.exclude_name_list); } | file_NAME_list opt_comma wildcard_spec { lang_add_wild ($3.name, $3.sorted, current_file.name, current_file.sorted, - ldgram_had_keep, $3.exclude_name); + ldgram_had_keep, $3.exclude_name_list); } ; diff -up -r --new-file binutils-2.9.5.0.22/ld/ldlang.c binutils-2.9.5.0.24/ld/ldlang.c --- binutils-2.9.5.0.22/ld/ldlang.c Thu Dec 2 08:45:10 1999 +++ binutils-2.9.5.0.24/ld/ldlang.c Thu Jan 13 11:36:06 2000 @@ -1,5 +1,5 @@ /* Linker command language support. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -213,17 +213,21 @@ walk_wild_section (ptr, section, file, c void *data; { /* Don't process sections from files which were excluded. */ - if (ptr->exclude_filename != NULL) + if (ptr->exclude_filename_list != NULL) { - boolean match; + struct name_list *list_tmp; + for (list_tmp = ptr->exclude_filename_list; list_tmp; list_tmp = list_tmp->next) + { + boolean match; - if (wildcardp (ptr->exclude_filename)) - match = fnmatch (ptr->exclude_filename, file->filename, 0) == 0 ? true : false; - else - match = strcmp (ptr->exclude_filename, file->filename) == 0 ? true : false; + if (wildcardp (list_tmp->name)) + match = fnmatch (list_tmp->name, file->filename, 0) == 0 ? true : false; + else + match = strcmp (list_tmp->name, file->filename) == 0 ? true : false; - if (match) - return; + if (match) + return; + } } if (file->just_syms_flag == false) @@ -2360,9 +2364,15 @@ print_wild_statement (w, os) if (w->filenames_sorted) minfo ("SORT("); - if (w->exclude_filename != NULL) - minfo ("EXCLUDE_FILE ( %s )", w->exclude_filename); - if (w->filename != NULL) + if (w->exclude_filename_list != NULL) + { + name_list *tmp; + minfo ("EXCLUDE_FILE ( %s", w->exclude_filename_list->name); + for (tmp=w->exclude_filename_list->next; tmp; tmp = tmp->next) + minfo (", %s", tmp->name); + minfo (")"); + } + if (w->filename != NULL) minfo ("%s", w->filename); else minfo ("*"); @@ -4029,13 +4039,13 @@ lang_process () void lang_add_wild (section_name, sections_sorted, filename, filenames_sorted, - keep_sections, exclude_filename) + keep_sections, exclude_filename_list) const char *const section_name; boolean sections_sorted; const char *const filename; boolean filenames_sorted; boolean keep_sections; - const char *exclude_filename; + struct name_list *exclude_filename_list; { lang_wild_statement_type *new = new_stat (lang_wild_statement, stat_ptr); @@ -4053,7 +4063,7 @@ lang_add_wild (section_name, sections_so new->filename = filename; new->filenames_sorted = filenames_sorted; new->keep_sections = keep_sections; - new->exclude_filename = exclude_filename; + new->exclude_filename_list = exclude_filename_list; lang_list_init (&new->children); } diff -up -r --new-file binutils-2.9.5.0.22/ld/ldlang.h binutils-2.9.5.0.24/ld/ldlang.h --- binutils-2.9.5.0.22/ld/ldlang.h Sun Jun 20 10:05:05 1999 +++ binutils-2.9.5.0.24/ld/ldlang.h Thu Jan 13 11:36:06 2000 @@ -1,5 +1,5 @@ /* ldlang.h - linker command language support - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -283,7 +283,7 @@ typedef struct lang_wild_statement_struc const char *filename; boolean filenames_sorted; boolean keep_sections; - const char *exclude_filename; + struct name_list *exclude_filename_list; lang_statement_list_type children; } lang_wild_statement_type; @@ -401,7 +401,7 @@ extern void lang_section_start PARAMS (( extern void lang_add_entry PARAMS ((const char *, boolean)); extern void lang_add_target PARAMS ((const char *)); extern void lang_add_wild - PARAMS ((const char *, boolean, const char *, boolean, boolean, const char *)); + PARAMS ((const char *, boolean, const char *, boolean, boolean, name_list *)); extern void lang_add_map PARAMS ((const char *)); extern void lang_add_fill PARAMS ((int)); extern lang_assignment_statement_type * lang_add_assignment PARAMS ((union etree_union *)); diff -up -r --new-file binutils-2.9.5.0.22/ld/ldmain.c binutils-2.9.5.0.24/ld/ldmain.c --- binutils-2.9.5.0.22/ld/ldmain.c Mon Jul 19 09:47:39 1999 +++ binutils-2.9.5.0.24/ld/ldmain.c Thu Jan 13 11:24:39 2000 @@ -1169,7 +1169,7 @@ warning_find_reloc (abfd, sec, iarg) /*ARGSUSED*/ static boolean undefined_symbol (info, name, abfd, section, address) - struct bfd_link_info *info ATTRIBUTE_UNUSED; + struct bfd_link_info *info; const char *name; bfd *abfd; asection *section; @@ -1217,8 +1217,14 @@ undefined_symbol (info, name, abfd, sect if (section != NULL) { if (error_count < MAX_ERRORS_IN_A_ROW) - einfo (_("%X%C: undefined reference to `%T'\n"), - abfd, section, address, name); + { + if (info->shared && info->symbolic) + einfo (_("%C: undefined reference to `%T'\n"), + abfd, section, address, name); + else + einfo (_("%X%C: undefined reference to `%T'\n"), + abfd, section, address, name); + } else if (error_count == MAX_ERRORS_IN_A_ROW) einfo (_("%D: more undefined references to `%T' follow\n"), abfd, section, address, name); @@ -1226,8 +1232,14 @@ undefined_symbol (info, name, abfd, sect else { if (error_count < MAX_ERRORS_IN_A_ROW) - einfo (_("%X%B: undefined reference to `%T'\n"), - abfd, name); + { + if (info->shared && info->symbolic) + einfo (_("%B: undefined reference to `%T'\n"), + abfd, name); + else + einfo (_("%X%B: undefined reference to `%T'\n"), + abfd, name); + } else if (error_count == MAX_ERRORS_IN_A_ROW) einfo (_("%B: more undefined references to `%T' follow\n"), abfd, name); diff -up -r --new-file binutils-2.9.5.0.22/ld/pe-dll.c binutils-2.9.5.0.24/ld/pe-dll.c --- binutils-2.9.5.0.22/ld/pe-dll.c Sat Oct 9 09:14:02 1999 +++ binutils-2.9.5.0.24/ld/pe-dll.c Thu Jan 13 11:36:06 2000 @@ -1,5 +1,5 @@ /* Routines to help build PEI-format DLLs (Win32 etc) - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Written by DJ Delorie This file is part of GLD, the Gnu Linker. @@ -60,6 +60,8 @@ int pe_dll_export_everything = 0; int pe_dll_do_default_excludes = 1; int pe_dll_kill_ats = 0; int pe_dll_stdcall_aliases = 0; +int pe_dll_warn_dup_exports = 0; +int pe_dll_compat_implib = 0; /************************************************************************ @@ -338,20 +340,22 @@ process_def_file (abfd, info) { if (i > 0 && strcmp (e[i].name, e[i - 1].name) == 0) { - /* This is a duplicate */ + /* This is a duplicate. */ if (e[j - 1].ordinal != -1 && e[i].ordinal != -1 && e[j - 1].ordinal != e[i].ordinal) { - /* xgettext:c-format */ - einfo (_("%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n"), - e[j - 1].name, e[j - 1].ordinal, e[i].ordinal); + if (pe_dll_warn_dup_exports) + /* xgettext:c-format */ + einfo (_("%XError, duplicate EXPORT with oridinals: %s (%d vs %d)\n"), + e[j - 1].name, e[j - 1].ordinal, e[i].ordinal); } else { - /* xgettext:c-format */ - einfo (_("Warning, duplicate EXPORT: %s\n"), - e[j - 1].name); + if (pe_dll_warn_dup_exports) + /* xgettext:c-format */ + einfo (_("Warning, duplicate EXPORT: %s\n"), + e[j - 1].name); } if (e[i].ordinal) e[j - 1].ordinal = e[i].ordinal; @@ -1359,7 +1363,9 @@ make_one (exp, parent) quick_symbol (abfd, U(""), exp->internal_name, "", tx, BSF_GLOBAL, 0); quick_symbol (abfd, U("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0); quick_symbol (abfd, U("__imp_"), exp->internal_name, "", id5, BSF_GLOBAL, 0); - quick_symbol (abfd, U("_imp__"), exp->internal_name, "", id5, BSF_GLOBAL, 0); + if (pe_dll_compat_implib) + quick_symbol (abfd, U("__imp_"), exp->internal_name, "", + id5, BSF_GLOBAL, 0); bfd_set_section_size (abfd, tx, jmp_byte_count); td = (unsigned char *) xmalloc (jmp_byte_count); @@ -1455,14 +1461,7 @@ pe_dll_generate_implib (def, impfilename bfd *outarch; bfd *head = 0; - dll_filename = def->name; - if (dll_filename == 0) - { - dll_filename = dll_name; - for (i=0; impfilename[i]; i++) - if (impfilename[i] == '/' || impfilename[i] == '\\') - dll_filename = impfilename+1; - } + dll_filename = (def->name) ? def->name : dll_name; dll_symname = xstrdup (dll_filename); for (i=0; dll_symname[i]; i++) if (!isalnum ((unsigned char) dll_symname[i])) diff -up -r --new-file binutils-2.9.5.0.22/ld/pe-dll.h binutils-2.9.5.0.24/ld/pe-dll.h --- binutils-2.9.5.0.22/ld/pe-dll.h Mon Sep 13 09:37:50 1999 +++ binutils-2.9.5.0.24/ld/pe-dll.h Thu Jan 13 11:36:06 2000 @@ -1,5 +1,5 @@ /* pe-dll.h: Header file for routines used to build Windows DLLs. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -31,6 +31,8 @@ extern int pe_dll_export_everything; extern int pe_dll_do_default_excludes; extern int pe_dll_kill_ats; extern int pe_dll_stdcall_aliases; +extern int pe_dll_warn_dup_exports; +extern int pe_dll_compat_implib; extern void pe_dll_id_target PARAMS ((const char *)); extern void pe_dll_add_excludes PARAMS ((const char *)); diff -up -r --new-file binutils-2.9.5.0.22/ld/scripttempl/elf.sc binutils-2.9.5.0.24/ld/scripttempl/elf.sc --- binutils-2.9.5.0.22/ld/scripttempl/elf.sc Sat Oct 9 09:14:07 1999 +++ binutils-2.9.5.0.24/ld/scripttempl/elf.sc Thu Jan 13 11:36:13 2000 @@ -67,7 +67,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : The .ctor section from the crtend file contains the end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) ${CONSTRUCTING+${CTOR_END}} @@ -77,7 +77,7 @@ DTOR=" .dtors ${CONSTRUCTING-0} : { ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) ${CONSTRUCTING+${DTOR_END}} diff -up -r --new-file binutils-2.9.5.0.22/libiberty/ChangeLog binutils-2.9.5.0.24/libiberty/ChangeLog --- binutils-2.9.5.0.22/libiberty/ChangeLog Thu Aug 5 17:15:06 1999 +++ binutils-2.9.5.0.24/libiberty/ChangeLog Thu Jan 13 11:36:18 2000 @@ -1,3 +1,8 @@ +1999-12-27 Geoff Keating + + * vasprintf.c (int_vasprintf): Don't re-read the format character + as this mishandles strings like '%%s'. + 1999-08-03 Ian Lance Taylor * floatformat.c: Add casts to avoid signed/unsigned warnings. diff -up -r --new-file binutils-2.9.5.0.22/libiberty/vasprintf.c binutils-2.9.5.0.24/libiberty/vasprintf.c --- binutils-2.9.5.0.22/libiberty/vasprintf.c Thu Jun 3 11:02:12 1999 +++ binutils-2.9.5.0.24/libiberty/vasprintf.c Thu Jan 13 11:36:19 2000 @@ -105,6 +105,7 @@ int_vasprintf (result, format, args) (void) va_arg (ap, char *); break; } + p++; } } #ifdef TEST diff -up -r --new-file binutils-2.9.5.0.22/opcodes/ChangeLog binutils-2.9.5.0.24/opcodes/ChangeLog --- binutils-2.9.5.0.22/opcodes/ChangeLog Thu Dec 2 08:45:23 1999 +++ binutils-2.9.5.0.24/opcodes/ChangeLog Thu Jan 13 11:36:19 2000 @@ -1,3 +1,19 @@ +2000-01-03 Nick Clifton + + * arm-dis.c (streq): New macro. + (strneq): New macro. + (force_thumb): ew local variable. + (parse_disassembler_option): New function: Parse a single, ARM + specific disassembler command line switch. + (parse_disassembler_option): Call parse_disassembler_option to + parse individual command line switches. + (print_insn_big_arm): Check force_thumb. + (print_insn_little_arm): Check force_thumb. + +1999-12-27 Alan Modra + + * i386-dis.c (grps[]): Correct GRP5 FF/3 from "call" to "lcall". + Wed Dec 1 03:34:53 1999 Jeffrey A Law (law@cygnus.com) * m10300-opc.c, m10300-dis.c: Add am33 support. diff -up -r --new-file binutils-2.9.5.0.22/opcodes/arm-dis.c binutils-2.9.5.0.24/opcodes/arm-dis.c --- binutils-2.9.5.0.22/opcodes/arm-dis.c Fri Nov 19 09:44:11 1999 +++ binutils-2.9.5.0.24/opcodes/arm-dis.c Thu Jan 13 11:36:19 2000 @@ -1,5 +1,5 @@ /* Instruction printing code for the ARM - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modification by James G. Smith (jsmith@cygnus.co.uk) @@ -32,6 +32,13 @@ Foundation, Inc., 59 Temple Place - Suit #include "elf/internal.h" #include "elf/arm.h" +#ifndef streq +#define streq(a,b) (strcmp ((a), (b)) == 0) +#endif +#ifndef strneq +#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0) +#endif + static char * arm_conditional[] = {"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc", "hi", "ls", "ge", "lt", "gt", "le", "", "nv"}; @@ -51,15 +58,22 @@ static char * arm_regnames_apcs[] = /* Choose which register name set to use. */ static char ** arm_regnames = arm_regnames_standard; +static boolean force_thumb = false; + static char * arm_fp_const[] = {"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"}; static char * arm_shift[] = {"lsl", "lsr", "asr", "ror"}; - -static int print_insn_arm - PARAMS ((bfd_vma, struct disassemble_info *, long)); - + +/* Forward declarations. */ +static void arm_decode_shift PARAMS ((long, fprintf_ftype, void *)); +static int print_insn_arm PARAMS ((bfd_vma, struct disassemble_info *, long)); +static int print_insn_thumb PARAMS ((bfd_vma, struct disassemble_info *, long)); +static void parse_disassembler_option PARAMS ((char *)); +static void parse_disassembler_options PARAMS ((char *)); + +/* Functions. */ static void arm_decode_shift (given, func, stream) long given; @@ -792,32 +806,63 @@ arm_toggle_regnames () } static void -parse_disassembler_options (options) - char * options; +parse_disassembler_option (option) + char * option; { - if (options == NULL) + if (option == NULL) return; - if (strncmp (options, "reg-names-", 10) == 0) + if (strneq (option, "reg-names-", 10)) { - options += 10; + option += 10; - if (strcmp (options, "std") == 0) + if (streq (option, "std")) arm_regnames = arm_regnames_standard; - else if (strcmp (options, "apcs") == 0) + else if (streq (option, "apcs")) arm_regnames = arm_regnames_apcs; - else if (strcmp (options, "raw") == 0) + else if (streq (option, "raw")) arm_regnames = arm_regnames_raw; else - fprintf (stderr, "Unrecognised register name set: %s\n", options); + fprintf (stderr, "Unrecognised register name set: %s\n", option); } + else if (streq (option, "force-thumb")) + force_thumb = 1; + else if (streq (option, "no-force-thumb")) + force_thumb = 0; else - fprintf (stderr, "Unrecognised disassembler option: %s\n", options); + fprintf (stderr, "Unrecognised disassembler option: %s\n", option); return; } -/* NOTE: There are no checks in these routines that the relevant number of data bytes exist */ +static void +parse_disassembler_options (options) + char * options; +{ + char * space; + + if (options == NULL) + return; + + do + { + space = strchr (options, ' '); + + if (space) + { + * space = '\0'; + parse_disassembler_option (options); + * space = ' '; + options = space + 1; + } + else + parse_disassembler_option (options); + } + while (space); +} + +/* NOTE: There are no checks in these routines that the relevant number of + data bytes exist. */ int print_insn_big_arm (pc, info) @@ -839,8 +884,9 @@ print_insn_big_arm (pc, info) info->disassembler_options = NULL; } - is_thumb = false; - if (info->symbols != NULL) + is_thumb = force_thumb; + + if (!is_thumb && info->symbols != NULL) { if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour) { @@ -919,10 +965,10 @@ print_insn_little_arm (pc, info) /* To avoid repeated parsing of this option, we remove it here. */ info->disassembler_options = NULL; } + + is_thumb = force_thumb; - is_thumb = false; - - if (info->symbols != NULL) + if (!is_thumb && info->symbols != NULL) { if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour) { @@ -952,9 +998,10 @@ print_insn_little_arm (pc, info) status = info->read_memory_func (pc, (bfd_byte *) b, 2, info); b[3] = b[2] = 0; } + if (status != 0) { - (*info->memory_error_func) (status, pc, info); + info->memory_error_func (status, pc, info); return -1; } diff -up -r --new-file binutils-2.9.5.0.22/opcodes/i386-dis.c binutils-2.9.5.0.24/opcodes/i386-dis.c --- binutils-2.9.5.0.22/opcodes/i386-dis.c Sat Aug 21 11:03:00 1999 +++ binutils-2.9.5.0.24/opcodes/i386-dis.c Thu Jan 13 11:43:43 2000 @@ -1749,7 +1749,7 @@ static const struct dis386 grps[][8] = { { "incQ", Ev, XX, XX }, { "decQ", Ev, XX, XX }, { "callP", indirEv, XX, XX }, - { "callP", indirEv, XX, XX }, + { "lcallP", indirEv, XX, XX }, { "jmpP", indirEv, XX, XX }, { "ljmpP", indirEv, XX, XX }, { "pushQ", Ev, XX, XX },