summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/FREEBSD-Xlist83
-rw-r--r--contrib/binutils/FREEBSD-upgrade20
-rw-r--r--contrib/binutils/bfd/elf.c235
-rw-r--r--contrib/binutils/bfd/elf32-i386.c55
-rw-r--r--contrib/binutils/bfd/freebsd.h81
-rw-r--r--contrib/binutils/binutils/nm.c50
-rw-r--r--contrib/binutils/gas/config/tc-i386.c327
-rw-r--r--contrib/binutils/gas/config/tc-i386.h18
-rwxr-xr-xcontrib/binutils/gas/configure1620
-rw-r--r--contrib/binutils/gas/configure.in391
-rw-r--r--contrib/binutils/ld/Makefile.in1052
-rw-r--r--contrib/binutils/ld/configure.tgt56
-rw-r--r--contrib/binutils/ld/emulparams/i386freebsd.sh6
13 files changed, 1499 insertions, 2495 deletions
diff --git a/contrib/binutils/FREEBSD-Xlist b/contrib/binutils/FREEBSD-Xlist
new file mode 100644
index 0000000..548cc42
--- /dev/null
+++ b/contrib/binutils/FREEBSD-Xlist
@@ -0,0 +1,83 @@
+*-hp*
+*-mac*
+*-ncr*
+*.bat
+*.com
+*.info*
+*/arlex.c
+*/arparse.[ch]
+*/deflex.c
+*/gprof
+*/itbl-lex.c
+*/itbl-parse.[ch]
+*/ldgram.[ch]
+*/ldlex.c
+*/sysinfo.[ch]
+*/syslex.c
+*/testsuite
+*/texinfo/*
+*10[23]00*
+*532*
+*COPYING*
+*ChangeLog.*
+*[a-z]29k*
+*[a-z][89]60*
+*a68*
+*adobe*
+*aix*
+*apollo*
+*arm*
+*bout*
+*cisco*
+*d10v*
+*decstation*
+*delt88*
+*delta*
+*dgux*
+*dos*
+*dpx2*
+*dynix*
+*go32*
+*h8[35]00*
+*hp300*
+*hp[-.]*
+*hppa*
+*hpux*
+*irix*
+*lynx*
+*m32r*
+*m[68]8k*
+*mac-*
+*mach*
+*mip*
+*mpw*
+*netware*
+*news*
+*nlm*
+*ns32*
+*oasys*
+*os9*
+*pei*
+*pmac*
+*powerpc*
+*ppc*
+*psos*
+*pyr*
+*riscix*
+*riscos*
+*rs6000*
+*sa29200*
+*som*
+*sparc*
+*st2000*
+*sun*
+*symmetry*
+*tahoe*
+*u68k*
+*vax*
+*vms*
+*vxworks*
+*w65*
+*we32k*
+*win*
+*xcoff*
diff --git a/contrib/binutils/FREEBSD-upgrade b/contrib/binutils/FREEBSD-upgrade
new file mode 100644
index 0000000..d285611
--- /dev/null
+++ b/contrib/binutils/FREEBSD-upgrade
@@ -0,0 +1,20 @@
+To strip down a new version of GNU binutils for import, extract
+the files like this:
+
+ tar -xvzf binutils-2.8.1.tar.gz -X FREEBSD-Xlist
+
+Don't eliminate the *z8* files. They're needed because of a stupid
+hard-coded configure script in the opcodes subdirectory.
+
+If you decide to bring in more of the files, import them -- don't
+use "cvs add". And please remember to adjust the contents of
+"FREEBSD-Xlist" so that it reflects what is really imported from
+the vendor.
+
+Many of the files generated by GNU configure are present pre-built in
+the "src/gnu/usr.bin/binutils" tree. These can be regenerated for a
+new version of binutils by running the "update.sh" script in that
+directory.
+
+When upgrading to a new version, you also need to update the VERSION
+definition in "src/gnu/usr.bin/binutils/Makefile.inc0".
diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c
index 2d8e160..ee60483 100644
--- a/contrib/binutils/bfd/elf.c
+++ b/contrib/binutils/bfd/elf.c
@@ -1,5 +1,5 @@
/* ELF executable support for BFD.
- Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -305,18 +305,6 @@ bfd_elf_string_from_elf_section (abfd, shindex, strindex)
&& bfd_elf_get_str_section (abfd, shindex) == NULL)
return NULL;
- if (strindex >= hdr->sh_size)
- {
- (*_bfd_error_handler)
- ("%s: invalid string offset %u >= %lu for section `%s'",
- bfd_get_filename (abfd), strindex, (unsigned long) hdr->sh_size,
- ((shindex == elf_elfheader(abfd)->e_shstrndx
- && strindex == hdr->sh_name)
- ? ".shstrtab"
- : elf_string_from_elf_strtab (abfd, hdr->sh_name)));
- return "";
- }
-
return ((char *) hdr->contents) + strindex;
}
@@ -401,7 +389,7 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
&& phdr->p_vaddr <= hdr->sh_addr
&& phdr->p_vaddr + phdr->p_memsz >= hdr->sh_addr + hdr->sh_size
&& ((flags & SEC_LOAD) == 0
- || (phdr->p_offset <= (bfd_vma) hdr->sh_offset
+ || (phdr->p_offset <= hdr->sh_offset
&& (phdr->p_offset + phdr->p_filesz
>= hdr->sh_offset + hdr->sh_size))))
{
@@ -941,91 +929,6 @@ bfd_elf_get_dt_soname (abfd)
return elf_dt_name (abfd);
return NULL;
}
-
-/* Get the list of DT_NEEDED entries from a BFD. This is a hook for
- the ELF linker emulation code. */
-
-boolean
-bfd_elf_get_bfd_needed_list (abfd, pneeded)
- bfd *abfd;
- struct bfd_link_needed_list **pneeded;
-{
- asection *s;
- bfd_byte *dynbuf = NULL;
- int elfsec;
- unsigned long link;
- bfd_byte *extdyn, *extdynend;
- size_t extdynsize;
- void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
-
- *pneeded = NULL;
-
- if (bfd_get_flavour (abfd) != bfd_target_elf_flavour
- || bfd_get_format (abfd) != bfd_object)
- return true;
-
- s = bfd_get_section_by_name (abfd, ".dynamic");
- if (s == NULL || s->_raw_size == 0)
- return true;
-
- dynbuf = (bfd_byte *) bfd_malloc (s->_raw_size);
- if (dynbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, s, (PTR) dynbuf, (file_ptr) 0,
- s->_raw_size))
- goto error_return;
-
- elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
- if (elfsec == -1)
- goto error_return;
-
- link = elf_elfsections (abfd)[elfsec]->sh_link;
-
- extdynsize = get_elf_backend_data (abfd)->s->sizeof_dyn;
- swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
-
- extdyn = dynbuf;
- extdynend = extdyn + s->_raw_size;
- for (; extdyn < extdynend; extdyn += extdynsize)
- {
- Elf_Internal_Dyn dyn;
-
- (*swap_dyn_in) (abfd, (PTR) extdyn, &dyn);
-
- if (dyn.d_tag == DT_NULL)
- break;
-
- if (dyn.d_tag == DT_NEEDED)
- {
- const char *string;
- struct bfd_link_needed_list *l;
-
- string = bfd_elf_string_from_elf_section (abfd, link,
- dyn.d_un.d_val);
- if (string == NULL)
- goto error_return;
-
- l = (struct bfd_link_needed_list *) bfd_alloc (abfd, sizeof *l);
- if (l == NULL)
- goto error_return;
-
- l->by = abfd;
- l->name = string;
- l->next = *pneeded;
- *pneeded = l;
- }
- }
-
- free (dynbuf);
-
- return true;
-
- error_return:
- if (dynbuf != NULL)
- free (dynbuf);
- return false;
-}
/* Allocate an ELF string table--force the first byte to be zero. */
@@ -2203,19 +2106,12 @@ map_sections_to_segments (abfd)
new_segment = true;
}
else if (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize)
- < BFD_ALIGN (hdr->lma, maxpagesize))
+ < hdr->lma)
{
/* If putting this section in this segment would force us to
skip a page in the segment, then we need a new segment. */
new_segment = true;
}
- else if ((last_hdr->flags & SEC_LOAD) == 0
- && (hdr->flags & SEC_LOAD) != 0)
- {
- /* We don't want to put a loadable section after a
- nonloadable section in the same segment. */
- new_segment = true;
- }
else if ((abfd->flags & D_PAGED) == 0)
{
/* If the file is not demand paged, which means that we
@@ -2223,6 +2119,13 @@ map_sections_to_segments (abfd)
file, then there is no other reason for a new segment. */
new_segment = false;
}
+ else if ((last_hdr->flags & SEC_LOAD) == 0
+ && (hdr->flags & SEC_LOAD) != 0)
+ {
+ /* We don't want to put a loadable section after a
+ nonloadable section in the same segment. */
+ new_segment = true;
+ }
else if (! writable
&& (hdr->flags & SEC_READONLY) == 0
&& (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize)
@@ -2361,12 +2264,10 @@ elf_sort_sections (arg1, arg2)
#define TOEND(x) (((x)->flags & SEC_LOAD) == 0)
if (TOEND (sec1))
- {
- if (TOEND (sec2))
- return sec1->target_index - sec2->target_index;
- else
- return 1;
- }
+ if (TOEND (sec2))
+ return sec1->target_index - sec2->target_index;
+ else
+ return 1;
if (TOEND (sec2))
return -1;
@@ -2518,15 +2419,6 @@ assign_file_positions_for_segments (abfd)
if (m->count > 0)
{
BFD_ASSERT (p->p_type == PT_LOAD);
-
- if (p->p_vaddr < (bfd_vma) off)
- {
- _bfd_error_handler ("%s: Not enough room for program headers, try linking with -N",
- bfd_get_filename (abfd));
- bfd_set_error (bfd_error_bad_value);
- return false;
- }
-
p->p_vaddr -= off;
if (! m->p_paddr_valid)
p->p_paddr -= off;
@@ -2599,42 +2491,29 @@ assign_file_positions_for_segments (abfd)
{
bfd_vma adjust;
- if ((flags & SEC_LOAD) != 0)
- adjust = sec->lma - (p->p_paddr + p->p_memsz);
- else if ((flags & SEC_ALLOC) != 0)
+ /* The section VMA must equal the file position modulo
+ the page size. */
+ if ((flags & SEC_ALLOC) != 0)
{
- /* The section VMA must equal the file position
- modulo the page size. FIXME: I'm not sure if
- this adjustment is really necessary. We used to
- not have the SEC_LOAD case just above, and then
- this was necessary, but now I'm not sure. */
if ((abfd->flags & D_PAGED) != 0)
adjust = (sec->vma - voff) % bed->maxpagesize;
else
adjust = (sec->vma - voff) % align;
- }
- else
- adjust = 0;
-
- if (adjust != 0)
- {
- if (i == 0)
- abort ();
- p->p_memsz += adjust;
- off += adjust;
- voff += adjust;
- if ((flags & SEC_LOAD) != 0)
- p->p_filesz += adjust;
+ if (adjust != 0)
+ {
+ if (i == 0)
+ abort ();
+ p->p_memsz += adjust;
+ off += adjust;
+ voff += adjust;
+ if ((flags & SEC_LOAD) != 0)
+ p->p_filesz += adjust;
+ }
}
sec->filepos = off;
- /* We check SEC_HAS_CONTENTS here because if NOLOAD is
- used in a linker script we may have a section with
- SEC_LOAD clear but which is supposed to have
- contents. */
- if ((flags & SEC_LOAD) != 0
- || (flags & SEC_HAS_CONTENTS) != 0)
+ if ((flags & SEC_LOAD) != 0)
off += sec->_raw_size;
if ((flags & SEC_ALLOC) != 0)
voff += sec->_raw_size;
@@ -2974,16 +2853,6 @@ prep_headers (abfd)
case bfd_arch_d10v:
i_ehdrp->e_machine = EM_CYGNUS_D10V;
break;
- case bfd_arch_v850:
- switch (bfd_get_mach (abfd))
- {
- default:
- case 0: i_ehdrp->e_machine = EM_CYGNUS_V850; break;
- }
- break;
- case bfd_arch_arc:
- i_ehdrp->e_machine = EM_CYGNUS_ARC;
- break;
case bfd_arch_m32r:
i_ehdrp->e_machine = EM_CYGNUS_M32R;
break;
@@ -3000,6 +2869,11 @@ prep_headers (abfd)
i_ehdrp->e_version = bed->s->ev_current;
i_ehdrp->e_ehsize = bed->s->sizeof_ehdr;
+#ifdef __FreeBSD__
+ /* Quick and dirty hack to brand the file as a FreeBSD ELF file. */
+ strncpy((char *) &i_ehdrp->e_ident[8], "FreeBSD", EI_NIDENT-8);
+#endif
+
/* no program header, for now. */
i_ehdrp->e_phoff = 0;
i_ehdrp->e_phentsize = 0;
@@ -3233,7 +3107,6 @@ copy_private_bfd_data (ibfd, obfd)
Elf_Internal_Ehdr *iehdr;
struct elf_segment_map *mfirst;
struct elf_segment_map **pm;
- struct elf_segment_map *m;
Elf_Internal_Phdr *p;
unsigned int i, c;
@@ -3254,6 +3127,7 @@ copy_private_bfd_data (ibfd, obfd)
{
unsigned int csecs;
asection *s;
+ struct elf_segment_map *m;
unsigned int isec;
csecs = 0;
@@ -3323,19 +3197,6 @@ copy_private_bfd_data (ibfd, obfd)
pm = &m->next;
}
- /* The Solaris linker creates program headers in which all the
- p_paddr fields are zero. When we try to objcopy or strip such a
- file, we get confused. Check for this case, and if we find it
- reset the p_paddr_valid fields. */
- for (m = mfirst; m != NULL; m = m->next)
- if (m->p_paddr != 0)
- break;
- if (m == NULL)
- {
- for (m = mfirst; m != NULL; m = m->next)
- m->p_paddr_valid = 0;
- }
-
elf_tdata (obfd)->segment_map = mfirst;
return true;
@@ -3367,12 +3228,10 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
{
asection *s;
- /* Only set up the segments if there are no more SEC_ALLOC
- sections. FIXME: This won't do the right thing if objcopy is
- used to remove the last SEC_ALLOC section, since objcopy
- won't call this routine in that case. */
- for (s = isec->next; s != NULL; s = s->next)
- if ((s->flags & SEC_ALLOC) != 0)
+ /* Only set up the segments when all the sections have been set
+ up. */
+ for (s = ibfd->sections; s != NULL; s = s->next)
+ if (s->output_section == NULL)
break;
if (s == NULL)
{
@@ -4113,11 +3972,6 @@ _bfd_elf_find_nearest_line (abfd,
bfd_vma low_func;
asymbol **p;
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
- filename_ptr, functionname_ptr,
- line_ptr))
- return true;
-
if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
&found, filename_ptr,
functionname_ptr, line_ptr,
@@ -4325,16 +4179,3 @@ _bfd_elf_validate_reloc (abfd, areloc)
bfd_set_error (bfd_error_bad_value);
return false;
}
-
-boolean
-_bfd_elf_close_and_cleanup (abfd)
- bfd *abfd;
-{
- if (bfd_get_format (abfd) == bfd_object)
- {
- if (elf_shstrtab (abfd) != NULL)
- _bfd_stringtab_free (elf_shstrtab (abfd));
- }
-
- return _bfd_generic_close_and_cleanup (abfd);
-}
diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c
index a2d53ea..77fbba3 100644
--- a/contrib/binutils/bfd/elf32-i386.c
+++ b/contrib/binutils/bfd/elf32-i386.c
@@ -1,5 +1,5 @@
/* Intel 80386/80486-specific support for 32-bit ELF
- Copyright 1993-1997, 1998 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -960,16 +960,17 @@ elf_i386_size_dynamic_sections (output_bfd, info)
relocs = true;
/* If this relocation section applies to a read only
- section, then we probably need a DT_TEXTREL
- entry. The entries in the .rel.plt section
- really apply to the .got section, which we
- created ourselves and so know is not readonly. */
+ section which is in memory at run time, then
+ we probably need a DT_TEXTREL entry. The entries
+ in the .rel.plt section really apply to the
+ .got section, which we created ourselves and so
+ know is not readonly. */
outname = bfd_get_section_name (output_bfd,
s->output_section);
target = bfd_get_section_by_name (output_bfd, outname + 4);
if (target != NULL
- && (target->flags & SEC_READONLY) != 0
- && (target->flags & SEC_ALLOC) != 0)
+ && (target->flags & SEC_ALLOC) != 0
+ && (target->flags & SEC_READONLY) != 0)
reltext = true;
}
@@ -1180,16 +1181,15 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|| (r_type == R_386_GOT32
&& elf_hash_table (info)->dynamic_sections_created
&& (! info->shared
- || (! info->symbolic && h->dynindx != -1)
+ || ! info->symbolic
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|| (info->shared
- && ((! info->symbolic && h->dynindx != -1)
+ && (! info->symbolic
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
&& (r_type == R_386_32
- || r_type == R_386_PC32)
- && (input_section->flags & SEC_ALLOC) != 0))
+ || r_type == R_386_PC32)))
{
/* In these cases, we don't need the relocation
value. We check specially because in some
@@ -1243,16 +1243,15 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
if (! elf_hash_table (info)->dynamic_sections_created
|| (info->shared
- && (info->symbolic || h->dynindx == -1)
+ && info->symbolic
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
{
/* This is actually a static link, or it is a
-Bsymbolic link and the symbol is defined
- locally, or the symbol was forced to be local
- because of a version file. We must initialize
- this entry in the global offset table. Since the
- offset must always be a multiple of 4, we use the
- least significant bit to record whether we have
+ locally. We must initialize this entry in the
+ global offset table. Since the offset must
+ always be a multiple of 4, we use the least
+ significant bit to record whether we have
initialized it already.
When doing a dynamic link, we create a .rel.got
@@ -1381,7 +1380,6 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared
&& (r_type != R_386_PC32
|| (h != NULL
- && h->dynindx != -1
&& (! info->symbolic
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))))
@@ -1442,10 +1440,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
else if (r_type == R_386_PC32)
{
BFD_ASSERT (h != NULL && h->dynindx != -1);
- if ((input_section->flags & SEC_ALLOC) != 0)
- relocate = false;
- else
- relocate = true;
+ relocate = false;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_PC32);
}
else
@@ -1463,10 +1458,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
BFD_ASSERT (h->dynindx != -1);
- if ((input_section->flags & SEC_ALLOC) != 0)
- relocate = false;
- else
- relocate = true;
+ relocate = false;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_32);
}
}
@@ -1633,6 +1625,8 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
/* This symbol has an entry in the global offset table. Set it
up. */
+ BFD_ASSERT (h->dynindx != -1);
+
sgot = bfd_get_section_by_name (dynobj, ".got");
srel = bfd_get_section_by_name (dynobj, ".rel.got");
BFD_ASSERT (sgot != NULL && srel != NULL);
@@ -1642,12 +1636,11 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
+ (h->got_offset &~ 1));
/* If this is a -Bsymbolic link, and the symbol is defined
- locally, we just want to emit a RELATIVE reloc. Likewise if
- the symbol was forced to be local because of a version file.
- The entry in the global offset table will already have been
- initialized in the relocate_section function. */
+ locally, we just want to emit a RELATIVE reloc. The entry in
+ the global offset table will already have been initialized in
+ the relocate_section function. */
if (info->shared
- && (info->symbolic || h->dynindx == -1)
+ && info->symbolic
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
else
diff --git a/contrib/binutils/bfd/freebsd.h b/contrib/binutils/bfd/freebsd.h
index 8bb19ac..8e42124 100644
--- a/contrib/binutils/bfd/freebsd.h
+++ b/contrib/binutils/bfd/freebsd.h
@@ -1,4 +1,4 @@
-/* BFD back-end definitions used by all FreeBSD targets.
+/* BFD back-end definitions used by all FreeBSD a.out targets.
Copyright (C) 1990, 1991, 1992, 1996 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,26 +18,33 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/* FreeBSD ZMAGIC files never have the header in the text. */
-#define N_HEADER_IN_TEXT(x) 0
-
-/* ZMAGIC files start at offset 0. Does not apply to QMAGIC files. */
-#define TEXT_START_ADDR 0
-
-#define N_GETMAGIC_NET(exec) \
- ((exec).a_info & 0xffff)
-#define N_GETMID_NET(exec) \
- (((exec).a_info >> 16) & 0x3ff)
-#define N_GETFLAG_NET(ex) \
- (((exec).a_info >> 26) & 0x3f)
+/* FreeBSD QMAGIC files have the header in the text. */
+#define N_HEADER_IN_TEXT(x) 1
+#define MY_text_includes_header 1
+
+#define TEXT_START_ADDR (TARGET_PAGE_SIZE + 0x20)
+
+/*
+ * FreeBSD uses a weird mix of byte orderings for its a_info field.
+ * Its assembler emits NetBSD style object files, with a big-endian
+ * a_info. Its linker seems to accept either byte ordering, but
+ * emits a little-endian a_info.
+ *
+ * Here, we accept either byte ordering, but always produce
+ * little-endian.
+ *
+ * FIXME - Probably we should always produce the _native_ byte
+ * ordering. I.e., it should be in the architecture-specific
+ * file, not here. But in reality, there is almost zero chance
+ * that FreeBSD will ever use a.out in a new port.
+ */
#define N_MACHTYPE(exec) \
((enum machine_type) \
- ((N_GETMAGIC_NET (exec) == ZMAGIC) ? N_GETMID_NET (exec) : \
- ((exec).a_info >> 16) & 0x3ff))
+ ((freebsd_swap_magic(&(exec).a_info) >> 16) & 0x3ff))
#define N_FLAGS(exec) \
- ((N_GETMAGIC_NET (exec) == ZMAGIC) ? N_GETFLAG_NET (exec) : \
- ((exec).a_info >> 26) & 0x3f)
+ ((enum machine_type) \
+ ((freebsd_swap_magic(&(exec).a_info) >> 26) & 0x3f))
#define N_SET_INFO(exec, magic, type, flags) \
((exec).a_info = ((magic) & 0xffff) \
@@ -55,22 +62,50 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "libbfd.h"
#include "libaout.h"
-/* On FreeBSD, the magic number is always in i386 (little-endian)
- format. I think. */
-#define SWAP_MAGIC(ext) bfd_getl32 (ext)
+#define SWAP_MAGIC(ext) (freebsd_swap_magic(ext))
+#define MY_bfd_final_link freebsd_bfd_final_link
+#define MY_write_object_contents freebsd_write_object_contents
-#define MY_write_object_contents MY(write_object_contents)
-static boolean MY(write_object_contents) PARAMS ((bfd *abfd));
+static boolean freebsd_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
+static long freebsd_swap_magic PARAMS ((void *ext));
+static boolean freebsd_write_object_contents PARAMS ((bfd *abfd));
#include "aout-target.h"
+static boolean
+freebsd_bfd_final_link(abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ obj_aout_subformat (abfd) = q_magic_format;
+ return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
+}
+
+/* Swap a magic number. We accept either endian, whichever looks valid. */
+
+static long
+freebsd_swap_magic(ext)
+ void *ext;
+{
+ long linfo = bfd_getl32(ext);
+ long binfo = bfd_getb32(ext);
+ int lmagic = linfo & 0xffff;
+ int bmagic = binfo & 0xffff;
+ int lmagic_ok = lmagic == OMAGIC || lmagic == NMAGIC ||
+ lmagic == ZMAGIC || lmagic == QMAGIC;
+ int bmagic_ok = bmagic == OMAGIC || bmagic == NMAGIC ||
+ bmagic == ZMAGIC || bmagic == QMAGIC;
+
+ return bmagic_ok && !lmagic_ok ? binfo : linfo;
+}
+
/* Write an object file.
Section contents have already been written. We write the
file header, symbols, and relocation. */
static boolean
-MY(write_object_contents) (abfd)
+freebsd_write_object_contents(abfd)
bfd *abfd;
{
struct external_exec exec_bytes;
diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c
index 27ae400..21ce368 100644
--- a/contrib/binutils/binutils/nm.c
+++ b/contrib/binutils/binutils/nm.c
@@ -1,5 +1,5 @@
/* nm.c -- Describe symbol table of a rel file.
- Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -247,11 +247,9 @@ static int print_radix = 16;
static char other_format[] = "%02x";
static char desc_format[] = "%04x";
-static char *target = NULL;
-
-/* Used to cache the line numbers for a BFD. */
-static bfd *lineno_cache_bfd;
-static bfd *lineno_cache_rel_bfd;
+/* IMPORT */
+extern char *program_name;
+extern char *target;
static struct option long_options[] =
{
@@ -299,7 +297,7 @@ Usage: %s [-aABCDglnopPrsuvV] [-t radix] [--radix=radix] [--target=bfdname]\n\
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
+ fprintf (stream, "Report bugs to bug-gnu-utils@prep.ai.mit.edu\n");
exit (status);
}
@@ -532,20 +530,12 @@ display_archive (file)
}
if (last_arfile != NULL)
- {
- bfd_close (last_arfile);
- lineno_cache_bfd = NULL;
- lineno_cache_rel_bfd = NULL;
- }
+ bfd_close (last_arfile);
last_arfile = arfile;
}
if (last_arfile != NULL)
- {
- bfd_close (last_arfile);
- lineno_cache_bfd = NULL;
- lineno_cache_rel_bfd = NULL;
- }
+ bfd_close (last_arfile);
}
static boolean
@@ -586,9 +576,6 @@ display_file (filename)
if (bfd_close (file) == false)
bfd_fatal (filename);
- lineno_cache_bfd = NULL;
- lineno_cache_rel_bfd = NULL;
-
return retval;
}
@@ -792,7 +779,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
{
struct size_sym *symsizes;
bfd_byte *from, *fromend;
- asymbol *sym = NULL;
+ asymbol *sym;
asymbol *store_sym, *store_next;
qsort (minisyms, symcount, size, size_forward1);
@@ -1137,6 +1124,7 @@ print_symbol (abfd, sym, archive_bfd)
if (line_numbers)
{
+ static bfd *cache_bfd;
static asymbol **syms;
static long symcount;
const char *filename, *functionname;
@@ -1145,7 +1133,7 @@ print_symbol (abfd, sym, archive_bfd)
/* We need to get the canonical symbols in order to call
bfd_find_nearest_line. This is inefficient, but, then, you
don't have to use --line-numbers. */
- if (abfd != lineno_cache_bfd && syms != NULL)
+ if (abfd != cache_bfd && syms != NULL)
{
free (syms);
syms = NULL;
@@ -1161,22 +1149,24 @@ print_symbol (abfd, sym, archive_bfd)
symcount = bfd_canonicalize_symtab (abfd, syms);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
- lineno_cache_bfd = abfd;
+ cache_bfd = abfd;
}
if (bfd_is_und_section (bfd_get_section (sym)))
{
+ static bfd *cache_rel_bfd;
static asection **secs;
static arelent ***relocs;
static long *relcount;
- static unsigned int seccount;
- unsigned int i;
+ unsigned int seccount, i;
const char *symname;
/* For an undefined symbol, we try to find a reloc for the
symbol, and print the line number of the reloc. */
- if (abfd != lineno_cache_rel_bfd && relocs != NULL)
+ seccount = bfd_count_sections (abfd);
+
+ if (abfd != cache_rel_bfd && relocs != NULL)
{
for (i = 0; i < seccount; i++)
if (relocs[i] != NULL)
@@ -1193,8 +1183,6 @@ print_symbol (abfd, sym, archive_bfd)
{
struct get_relocs_info info;
- seccount = bfd_count_sections (abfd);
-
secs = (asection **) xmalloc (seccount * sizeof *secs);
relocs = (arelent ***) xmalloc (seccount * sizeof *relocs);
relcount = (long *) xmalloc (seccount * sizeof *relcount);
@@ -1204,13 +1192,13 @@ print_symbol (abfd, sym, archive_bfd)
info.relcount = relcount;
info.syms = syms;
bfd_map_over_sections (abfd, get_relocs, (PTR) &info);
- lineno_cache_rel_bfd = abfd;
+ cache_rel_bfd = abfd;
}
symname = bfd_asymbol_name (sym);
for (i = 0; i < seccount; i++)
{
- long j;
+ unsigned int j;
for (j = 0; j < relcount[i]; j++)
{
@@ -1262,7 +1250,7 @@ static void
print_object_filename_bsd (filename)
char *filename;
{
- if (filename_per_file && !filename_per_symbol)
+ if (filename_per_file)
printf ("\n%s:\n", filename);
}
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c
index cc173ec..5189c9d3 100644
--- a/contrib/binutils/gas/config/tc-i386.c
+++ b/contrib/binutils/gas/config/tc-i386.c
@@ -1,6 +1,5 @@
/* i386.c -- Assemble code for the Intel 80386
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 1998
- Free Software Foundation.
+ Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -106,7 +105,7 @@ struct _i386_insn
unsigned char prefix[MAX_PREFIXES];
unsigned int prefixes;
- /* RM and BI are the modrm byte and the base index byte where the
+ /* RM and IB are the modrm byte and the base index byte where the
addressing modes of this insn are encoded. */
modrm_byte rm;
@@ -117,7 +116,7 @@ typedef struct _i386_insn i386_insn;
/* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful */
-#if defined (TE_I386AIX) || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#if defined (TE_I386AIX) || (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined(TE_FreeBSD)
const char comment_chars[] = "#/";
#else
const char comment_chars[] = "#";
@@ -131,7 +130,7 @@ const char comment_chars[] = "#";
#NO_APP at the beginning of its output. */
/* Also note that comments started like this one will always work if
'/' isn't otherwise defined. */
-#if defined (TE_I386AIX) || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#if defined (TE_I386AIX) || (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined(TE_FreeBSD)
const char line_comment_chars[] = "";
#else
const char line_comment_chars[] = "/";
@@ -303,18 +302,18 @@ i386_align_code (fragP, count)
{0xeb,0x0d,0x90,0x90,0x90,0x90,0x90, /* jmp .+15; lotsa nops */
0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
static const char f16_4[] =
- {0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */
+ {0x8d,0xb6,0x00,0x00}; /* lea 0w(%si),%si */
static const char f16_5[] =
{0x90, /* nop */
- 0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */
+ 0x8d,0xb6,0x00,0x00}; /* lea 0w(%si),%si */
static const char f16_6[] =
{0x89,0xf6, /* mov %si,%si */
0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
static const char f16_7[] =
- {0x8d,0x74,0x00, /* lea 0(%si),%si */
+ {0x8d,0x76,0x00, /* lea 0(%si),%si */
0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
static const char f16_8[] =
- {0x8d,0xb4,0x00,0x00, /* lea 0w(%si),%si */
+ {0x8d,0xb6,0x00,0x00, /* lea 0w(%si),%si */
0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
static const char *const f32_patt[] = {
f32_1, f32_2, f32_3, f32_4, f32_5, f32_6, f32_7, f32_8,
@@ -434,7 +433,7 @@ const pseudo_typeS md_pseudo_table[] =
#ifndef I386COFF
{"bss", s_bss, 0},
#endif
-#if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO)
+#ifndef OBJ_AOUT
{"align", s_align_bytes, 0},
#else
{"align", s_align_ptwo, 0},
@@ -803,7 +802,7 @@ int
tc_i386_fix_adjustable(fixP)
fixS * fixP;
{
-#ifdef OBJ_ELF
+#ifndef OBJ_AOUT
/* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixP->fx_addsy))
return 0;
@@ -834,8 +833,8 @@ void
md_assemble (line)
char *line;
{
- /* Points to template once we've found it. */
- const template *t;
+ /* Holds template once we've found it. */
+ template *t;
/* Count the size of the instruction generated. */
int insn_size = 0;
@@ -845,11 +844,6 @@ md_assemble (line)
int j;
- /* Wait prefix needs to come before any other prefixes, so handle it
- specially. wait_prefix will hold the opcode modifier flag FWait
- if a wait prefix is given. */
- int wait_prefix = 0;
-
/* Initialize globals. */
memset (&i, '\0', sizeof (i));
for (j = 0; j < MAX_OPERANDS; j++)
@@ -858,7 +852,7 @@ md_assemble (line)
memset (im_expressions, '\0', sizeof (im_expressions));
save_stack_p = save_stack; /* reset stack pointer */
- /* First parse an opcode & call i386_operand for the operands.
+ /* Fist parse an opcode & call i386_operand for the operands.
We assume that the scrubber has arranged it so that line[0] is the valid
start of a (possibly prefixed) opcode. */
{
@@ -910,27 +904,14 @@ md_assemble (line)
as_bad ("same prefix used twice; you don't really want this!");
return;
}
- if (prefix->prefix_code == FWAIT_OPCODE)
- {
- if (wait_prefix != 0)
- {
- as_bad ("same prefix used twice; you don't really want this!");
- return;
- }
- wait_prefix = FWait;
- }
- else
+ if (i.prefixes == MAX_PREFIXES)
{
- if (i.prefixes == MAX_PREFIXES)
- {
- as_bad ("too many opcode prefixes");
- return;
- }
- i.prefix[i.prefixes++] = prefix->prefix_code;
- if (prefix->prefix_code == REPE
- || prefix->prefix_code == REPNE)
- expecting_string_instruction = 1;
+ as_bad ("too many opcode prefixes");
+ return;
}
+ i.prefix[i.prefixes++] = prefix->prefix_code;
+ if (prefix->prefix_code == REPE || prefix->prefix_code == REPNE)
+ expecting_string_instruction = 1;
/* skip past PREFIX_SEPERATOR and reset token_start */
token_start = ++l;
}
@@ -1150,8 +1131,8 @@ md_assemble (line)
if (!MATCH (overlap0, i.types[0]) ||
!MATCH (overlap1, i.types[1]) ||
!CONSISTENT_REGISTER_MATCH (overlap0, overlap1,
- t->operand_types[1],
- t->operand_types[0]))
+ t->operand_types[0],
+ t->operand_types[1]))
{
/* does not match either direction */
continue;
@@ -1184,26 +1165,20 @@ md_assemble (line)
return;
}
- /* Copy the template we found. */
+ /* Copy the template we found (we may change it!). */
i.tm = *t;
- i.tm.opcode_modifier |= wait_prefix;
-
- if (found_reverse_match)
- {
- i.tm.operand_types[0] = t->operand_types[1];
- i.tm.operand_types[1] = t->operand_types[0];
- }
+ t = &i.tm; /* alter new copy of template */
/* If the matched instruction specifies an explicit opcode suffix,
use it - and make sure none has already been specified. */
- if (i.tm.opcode_modifier & (Data16|Data32))
+ if (t->opcode_modifier & (Data16|Data32))
{
if (i.suffix)
{
as_bad ("extraneous opcode suffix given");
return;
}
- if (i.tm.opcode_modifier & Data16)
+ if (t->opcode_modifier & Data16)
i.suffix = WORD_OPCODE_SUFFIX;
else
i.suffix = DWORD_OPCODE_SUFFIX;
@@ -1300,11 +1275,19 @@ md_assemble (line)
if (overlap0 & Imm1)
i.imm_operands = 0; /* kludge for shift insns */
+ if (found_reverse_match)
+ {
+ unsigned int save;
+ save = t->operand_types[0];
+ t->operand_types[0] = t->operand_types[1];
+ t->operand_types[1] = save;
+ }
+
/* Finalize opcode. First, we change the opcode based on the operand
size given by i.suffix: we never have to change things for byte insns,
or when no opcode suffix is need to size the operands. */
- if (!i.suffix && (i.tm.opcode_modifier & W))
+ if (!i.suffix && (t->opcode_modifier & W))
{
as_bad ("no opcode suffix given and no register operands; can't size instruction");
return;
@@ -1313,15 +1296,15 @@ md_assemble (line)
if (i.suffix && i.suffix != BYTE_OPCODE_SUFFIX)
{
/* Select between byte and word/dword operations. */
- if (i.tm.opcode_modifier & W)
- i.tm.base_opcode |= W;
+ if (t->opcode_modifier & W)
+ t->base_opcode |= W;
/* Now select between word & dword operations via the
operand size prefix. */
if ((i.suffix == WORD_OPCODE_SUFFIX) ^ flag_16bit_code)
{
if (i.prefixes == MAX_PREFIXES)
{
- as_bad ("%d prefixes given and data size prefix gives too many prefixes",
+ as_bad ("%d prefixes given and 'w' opcode suffix gives too many prefixes",
MAX_PREFIXES);
return;
}
@@ -1348,12 +1331,12 @@ md_assemble (line)
if (found_reverse_match)
{
- i.tm.base_opcode |= found_reverse_match;
+ t->base_opcode |= found_reverse_match;
}
/* The imul $imm, %reg instruction is converted into
imul $imm, %reg, %reg. */
- if (i.tm.opcode_modifier & imulKludge)
+ if (t->opcode_modifier & imulKludge)
{
/* Pretend we saw the 3 operand case. */
i.regs[2] = i.regs[1];
@@ -1361,7 +1344,7 @@ md_assemble (line)
}
/* The clr %reg instruction is converted into xor %reg, %reg. */
- if (i.tm.opcode_modifier & iclrKludge)
+ if (t->opcode_modifier & iclrKludge)
{
i.regs[1] = i.regs[0];
i.reg_operands = 2;
@@ -1372,7 +1355,7 @@ md_assemble (line)
instructions, if the source operand is a register, we must reverse
the i.rm.reg and i.rm.regmem fields. We accomplish this by faking
that the two register operands were given in the reverse order. */
- if ((i.tm.opcode_modifier & ReverseRegRegmem) && i.reg_operands == 2)
+ if ((t->opcode_modifier & ReverseRegRegmem) && i.reg_operands == 2)
{
unsigned int first_reg_operand = (i.types[0] & Reg) ? 0 : 1;
unsigned int second_reg_operand = first_reg_operand + 1;
@@ -1381,40 +1364,40 @@ md_assemble (line)
i.regs[second_reg_operand] = tmp;
}
- if (i.tm.opcode_modifier & ShortForm)
+ if (t->opcode_modifier & ShortForm)
{
/* The register or float register operand is in operand 0 or 1. */
unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1;
/* Register goes in low 3 bits of opcode. */
- i.tm.base_opcode |= i.regs[op]->reg_num;
+ t->base_opcode |= i.regs[op]->reg_num;
}
- else if (i.tm.opcode_modifier & ShortFormW)
+ else if (t->opcode_modifier & ShortFormW)
{
/* Short form with 0x8 width bit. Register is always dest. operand */
- i.tm.base_opcode |= i.regs[1]->reg_num;
+ t->base_opcode |= i.regs[1]->reg_num;
if (i.suffix == WORD_OPCODE_SUFFIX ||
i.suffix == DWORD_OPCODE_SUFFIX)
- i.tm.base_opcode |= 0x8;
+ t->base_opcode |= 0x8;
}
- else if (i.tm.opcode_modifier & Seg2ShortForm)
+ else if (t->opcode_modifier & Seg2ShortForm)
{
- if (i.tm.base_opcode == POP_SEG_SHORT && i.regs[0]->reg_num == 1)
+ if (t->base_opcode == POP_SEG_SHORT && i.regs[0]->reg_num == 1)
{
as_bad ("you can't 'pop cs' on the 386.");
return;
}
- i.tm.base_opcode |= (i.regs[0]->reg_num << 3);
+ t->base_opcode |= (i.regs[0]->reg_num << 3);
}
- else if (i.tm.opcode_modifier & Seg3ShortForm)
+ else if (t->opcode_modifier & Seg3ShortForm)
{
/* 'push %fs' is 0x0fa0; 'pop %fs' is 0x0fa1.
'push %gs' is 0x0fa8; 'pop %fs' is 0x0fa9.
So, only if i.regs[0]->reg_num == 5 (%gs) do we need
to change the opcode. */
if (i.regs[0]->reg_num == 5)
- i.tm.base_opcode |= 0x08;
+ t->base_opcode |= 0x08;
}
- else if ((i.tm.base_opcode & ~DW) == MOV_AX_DISP32)
+ else if ((t->base_opcode & ~DW) == MOV_AX_DISP32)
{
/* This is a special non-modrm instruction
that addresses memory with a 32-bit displacement mode anyway,
@@ -1422,12 +1405,12 @@ md_assemble (line)
uses_mem_addrmode = 1;
default_seg = &ds;
}
- else if (i.tm.opcode_modifier & Modrm)
+ else if (t->opcode_modifier & Modrm)
{
- /* The opcode is completed (modulo i.tm.extension_opcode which
- must be put into the modrm byte).
- Now, we make the modrm & index base bytes based on all the
- info we've collected. */
+ /* The opcode is completed (modulo t->extension_opcode which must
+ be put into the modrm byte.
+ Now, we make the modrm & index base bytes based on all the info
+ we've collected. */
/* i.reg_operands MUST be the number of real register operands;
implicit registers do not count. */
@@ -1579,10 +1562,10 @@ md_assemble (line)
}
/* Fill in i.rm.reg or i.rm.regmem field with register
- operand (if any) based on i.tm.extension_opcode.
- Again, we must be careful to make sure that
- segment/control/debug/test/MMX registers are coded
- into the i.rm.reg field. */
+ operand (if any) based on
+ t->extension_opcode. Again, we must be careful to
+ make sure that segment/control/debug/test/MMX
+ registers are coded into the i.rm.reg field. */
if (i.reg_operands)
{
unsigned int op =
@@ -1597,7 +1580,7 @@ md_assemble (line)
: 2));
/* If there is an extension opcode to put here, the
register number must be put into the regmem field. */
- if (i.tm.extension_opcode != None)
+ if (t->extension_opcode != None)
i.rm.regmem = i.regs[op]->reg_num;
else
i.rm.reg = i.regs[op]->reg_num;
@@ -1610,8 +1593,8 @@ md_assemble (line)
}
/* Fill in i.rm.reg field with extension opcode (if any). */
- if (i.tm.extension_opcode != None)
- i.rm.reg = i.tm.extension_opcode;
+ if (t->extension_opcode != None)
+ i.rm.reg = t->extension_opcode;
}
if (i.rm.mode != 3)
@@ -1652,9 +1635,9 @@ md_assemble (line)
}
/* Handle conversion of 'int $3' --> special int3 insn. */
- if (i.tm.base_opcode == INT_OPCODE && i.imms[0]->X_add_number == 3)
+ if (t->base_opcode == INT_OPCODE && i.imms[0]->X_add_number == 3)
{
- i.tm.base_opcode = INT3_OPCODE;
+ t->base_opcode = INT3_OPCODE;
i.imm_operands = 0;
}
@@ -1663,7 +1646,7 @@ md_assemble (line)
register char *p;
/* Output jumps. */
- if (i.tm.opcode_modifier & Jump)
+ if (t->opcode_modifier & Jump)
{
unsigned long n = i.disps[0]->X_add_number;
@@ -1673,7 +1656,7 @@ md_assemble (line)
{
p = frag_more (2);
insn_size += 2;
- p[0] = i.tm.base_opcode;
+ p[0] = t->base_opcode;
p[1] = n;
}
else
@@ -1690,7 +1673,7 @@ md_assemble (line)
return;
}
- if (i.tm.base_opcode == JUMP_PC_RELATIVE)
+ if (t->base_opcode == JUMP_PC_RELATIVE)
{ /* pace */
/* unconditional jump */
p = frag_more (1 + jmp_size);
@@ -1704,7 +1687,7 @@ md_assemble (line)
p = frag_more (2 + jmp_size);
insn_size += 2 + jmp_size;
p[0] = TWO_BYTE_OPCODE_ESCAPE;
- p[1] = i.tm.base_opcode + 0x10;
+ p[1] = t->base_opcode + 0x10;
md_number_to_chars (&p[2], (valueT) n, jmp_size);
}
}
@@ -1723,7 +1706,7 @@ md_assemble (line)
frag_grow (7);
p = frag_more (1);
insn_size += 1;
- p[0] = i.tm.base_opcode;
+ p[0] = t->base_opcode;
frag_var (rs_machine_dependent,
6, /* 2 opcode/prefix + 4 displacement */
1,
@@ -1734,9 +1717,9 @@ md_assemble (line)
(offsetT) n, p);
}
}
- else if (i.tm.opcode_modifier & (JumpByte | JumpDword))
+ else if (t->opcode_modifier & (JumpByte | JumpDword))
{
- int size = (i.tm.opcode_modifier & JumpByte) ? 1 : 4;
+ int size = (t->opcode_modifier & JumpByte) ? 1 : 4;
unsigned long n = i.disps[0]->X_add_number;
unsigned char *q;
@@ -1745,29 +1728,7 @@ md_assemble (line)
{
if (*q == WORD_PREFIX_OPCODE)
{
- /* The jcxz/jecxz instructions are marked with Data16
- and Data32, which means that they may get
- WORD_PREFIX_OPCODE added to the list of prefixes.
- However, the are correctly distinguished using
- ADDR_PREFIX_OPCODE. Here we look for
- WORD_PREFIX_OPCODE, and actually emit
- ADDR_PREFIX_OPCODE. This is a hack, but, then, so
- is the instruction itself.
-
- If an explicit suffix is used for the loop
- instruction, that actually controls whether we use
- cx vs. ecx. This is also controlled by
- ADDR_PREFIX_OPCODE.
-
- I don't know if there is any valid case in which we
- want to emit WORD_PREFIX_OPCODE, but I am keeping
- the old behaviour for safety. */
-
- if (IS_JUMP_ON_CX_ZERO (i.tm.base_opcode)
- || IS_LOOP_ECX_TIMES (i.tm.base_opcode))
- FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
- else
- FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
+ FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
insn_size += 1;
break;
}
@@ -1779,9 +1740,9 @@ md_assemble (line)
insn_size += 1;
}
- if (fits_in_unsigned_byte (i.tm.base_opcode))
+ if (fits_in_unsigned_byte (t->base_opcode))
{
- FRAG_APPEND_1_CHAR (i.tm.base_opcode);
+ FRAG_APPEND_1_CHAR (t->base_opcode);
insn_size += 1;
}
else
@@ -1789,8 +1750,8 @@ md_assemble (line)
p = frag_more (2); /* opcode can be at most two bytes */
insn_size += 2;
/* put out high byte first: can't use md_number_to_chars! */
- *p++ = (i.tm.base_opcode >> 8) & 0xff;
- *p = i.tm.base_opcode & 0xff;
+ *p++ = (t->base_opcode >> 8) & 0xff;
+ *p = t->base_opcode & 0xff;
}
p = frag_more (size);
@@ -1811,7 +1772,7 @@ md_assemble (line)
}
}
- else if (i.tm.opcode_modifier & JumpInterSegment)
+ else if (t->opcode_modifier & JumpInterSegment)
{
if (flag_16bit_code)
{
@@ -1821,7 +1782,7 @@ md_assemble (line)
p = frag_more (1 + 2 + 4); /* 1 opcode; 2 segment; 4 offset */
insn_size += 1 + 2 + 4;
- p[0] = i.tm.base_opcode;
+ p[0] = t->base_opcode;
if (i.imms[1]->X_op == O_constant)
md_number_to_chars (p + 1, (valueT) i.imms[1]->X_add_number, 4);
else
@@ -1836,16 +1797,7 @@ md_assemble (line)
/* Output normal instructions here. */
unsigned char *q;
- /* Hack for fwait. It must come before any prefixes, as it
- really is an instruction rather than a prefix. */
- if ((i.tm.opcode_modifier & FWait) != 0)
- {
- p = frag_more (1);
- insn_size += 1;
- md_number_to_chars (p, (valueT) FWAIT_OPCODE, 1);
- }
-
- /* The prefix bytes. */
+ /* First the prefix bytes. */
for (q = i.prefix; q < i.prefix + i.prefixes; q++)
{
p = frag_more (1);
@@ -1854,39 +1806,39 @@ md_assemble (line)
}
/* Now the opcode; be careful about word order here! */
- if (fits_in_unsigned_byte (i.tm.base_opcode))
+ if (fits_in_unsigned_byte (t->base_opcode))
{
- FRAG_APPEND_1_CHAR (i.tm.base_opcode);
+ FRAG_APPEND_1_CHAR (t->base_opcode);
insn_size += 1;
}
- else if (fits_in_unsigned_word (i.tm.base_opcode))
+ else if (fits_in_unsigned_word (t->base_opcode))
{
p = frag_more (2);
insn_size += 2;
/* put out high byte first: can't use md_number_to_chars! */
- *p++ = (i.tm.base_opcode >> 8) & 0xff;
- *p = i.tm.base_opcode & 0xff;
+ *p++ = (t->base_opcode >> 8) & 0xff;
+ *p = t->base_opcode & 0xff;
}
else
{ /* opcode is either 3 or 4 bytes */
- if (i.tm.base_opcode & 0xff000000)
+ if (t->base_opcode & 0xff000000)
{
p = frag_more (4);
insn_size += 4;
- *p++ = (i.tm.base_opcode >> 24) & 0xff;
+ *p++ = (t->base_opcode >> 24) & 0xff;
}
else
{
p = frag_more (3);
insn_size += 3;
}
- *p++ = (i.tm.base_opcode >> 16) & 0xff;
- *p++ = (i.tm.base_opcode >> 8) & 0xff;
- *p = (i.tm.base_opcode) & 0xff;
+ *p++ = (t->base_opcode >> 16) & 0xff;
+ *p++ = (t->base_opcode >> 8) & 0xff;
+ *p = (t->base_opcode) & 0xff;
}
/* Now the modrm byte and base index byte (if present). */
- if (i.tm.opcode_modifier & Modrm)
+ if (t->opcode_modifier & Modrm)
{
p = frag_more (1);
insn_size += 1;
@@ -2138,16 +2090,6 @@ i386_operand (operand_string)
input_line_pointer = ++op_string; /* must advance op_string! */
SKIP_WHITESPACE ();
exp_seg = expression (exp);
- if (*input_line_pointer != '\0')
- {
- /* This should be as_bad, but some versions of gcc, up to
- about 2.8 and egcs 1.01, generate a bogus @GOTOFF(%ebx)
- in certain cases. Oddly, the code in question turns out
- to work correctly anyhow, so we make this just a warning
- until those versions of gcc are obsolete. */
- as_warn ("warning: unrecognized characters `%s' in expression",
- input_line_pointer);
- }
input_line_pointer = save_input_line_pointer;
if (exp->X_op == O_absent)
@@ -2217,7 +2159,7 @@ i386_operand (operand_string)
i.mem_operands++;
/* Determine type of memory operand from opcode_suffix;
- no opcode suffix implies general memory references. */
+ no opcode suffix implies general memory references. */
switch (i.suffix)
{
case BYTE_OPCODE_SUFFIX:
@@ -2388,7 +2330,6 @@ i386_operand (operand_string)
save_input_line_pointer = input_line_pointer;
input_line_pointer = displacement_string_start;
END_STRING_AND_SAVE (displacement_string_end);
-
#ifndef LEX_AT
{
/*
@@ -2398,49 +2339,36 @@ i386_operand (operand_string)
* into a temporary buffer...
*/
register char *cp;
-
- cp = strchr (input_line_pointer, '@');
- if (cp != NULL)
- {
- char *tmpbuf;
-
- if (GOT_symbol == NULL)
- GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
-
- tmpbuf = (char *) alloca ((cp - input_line_pointer) + 20);
-
- if (strncmp (cp + 1, "PLT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
- *cp = '\0';
- strcpy (tmpbuf, input_line_pointer);
- strcat (tmpbuf, cp + 1 + 3);
- *cp = '@';
- }
- else if (strncmp (cp + 1, "GOTOFF", 6) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
- *cp = '\0';
- strcpy (tmpbuf, input_line_pointer);
- strcat (tmpbuf, cp + 1 + 6);
- *cp = '@';
- }
- else if (strncmp (cp + 1, "GOT", 3) == 0)
- {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
- *cp = '\0';
- strcpy (tmpbuf, input_line_pointer);
- strcat (tmpbuf, cp + 1 + 3);
- *cp = '@';
- }
- else
- as_bad ("Bad reloc specifier '%s' in expression", cp + 1);
-
- input_line_pointer = tmpbuf;
- }
+ if ((cp = strchr (input_line_pointer,'@')) != NULL) {
+ char tmpbuf[BUFSIZ];
+
+ if(!GOT_symbol)
+ GOT_symbol = symbol_find_or_make(GLOBAL_OFFSET_TABLE_NAME);
+
+ if (strncmp(cp+1, "PLT", 3) == 0) {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
+ *cp = '\0';
+ strcpy(tmpbuf, input_line_pointer);
+ strcat(tmpbuf, cp+1+3);
+ *cp = '@';
+ } else if (strncmp(cp+1, "GOTOFF", 6) == 0) {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
+ *cp = '\0';
+ strcpy(tmpbuf, input_line_pointer);
+ strcat(tmpbuf, cp+1+6);
+ *cp = '@';
+ } else if (strncmp(cp+1, "GOT", 3) == 0) {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
+ *cp = '\0';
+ strcpy(tmpbuf, input_line_pointer);
+ strcat(tmpbuf, cp+1+3);
+ *cp = '@';
+ } else
+ as_bad("Bad reloc specifier '%s' in expression", cp+1);
+ input_line_pointer = tmpbuf;
+ }
}
#endif
-
exp_seg = expression (exp);
#ifdef BFD_ASSEMBLER
@@ -2755,9 +2683,6 @@ md_apply_fix3 (fixP, valp, seg)
register char *p = fixP->fx_where + fixP->fx_frag->fr_literal;
valueT value = *valp;
- if (fixP->fx_r_type == BFD_RELOC_32 && fixP->fx_pcrel)
- fixP->fx_r_type = BFD_RELOC_32_PCREL;
-
#if defined (BFD_ASSEMBLER) && !defined (TE_Mach)
/*
* This is a hack. There should be a better way to
@@ -2766,8 +2691,7 @@ md_apply_fix3 (fixP, valp, seg)
if (fixP->fx_r_type == BFD_RELOC_32_PCREL && fixP->fx_addsy)
{
#ifndef OBJ_AOUT
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
- || OUTPUT_FLAVOR == bfd_target_coff_flavour)
+ if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
value += fixP->fx_where + fixP->fx_frag->fr_address;
#endif
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
@@ -2782,12 +2706,6 @@ md_apply_fix3 (fixP, valp, seg)
value += fixP->fx_where + fixP->fx_frag->fr_address;
}
#endif
-#if defined (OBJ_COFF) && defined (TE_PE)
- /* For some reason, the PE format does not store a section
- address offset for a PC relative symbol. */
- if (S_GET_SEGMENT (fixP->fx_addsy) != seg)
- value += md_pcrel_from (fixP);
-#endif
}
/* Fix a few things - the dynamic linker expects certain values here,
@@ -3137,7 +3055,6 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_386_GOT32:
case BFD_RELOC_386_GOTOFF:
case BFD_RELOC_386_GOTPC:
- case BFD_RELOC_RVA:
code = fixp->fx_r_type;
break;
default:
diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h
index 5142642..139ccc7 100644
--- a/contrib/binutils/gas/config/tc-i386.h
+++ b/contrib/binutils/gas/config/tc-i386.h
@@ -1,5 +1,5 @@
/* tc-i386.h -- Header file for tc-i386.c
- Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation.
+ Copyright (C) 1989, 92, 93, 94, 95, 96, 1997 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -69,6 +69,9 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
#define TARGET_ARCH bfd_arch_i386
#ifdef OBJ_AOUT
+#ifdef TE_FreeBSD
+#define TARGET_FORMAT "a.out-i386-freebsd"
+#endif
#ifdef TE_NetBSD
#define TARGET_FORMAT "a.out-i386-netbsd"
#endif
@@ -297,7 +300,6 @@ typedef struct
#define Data16 0x20000 /* needs data prefix if in 32-bit mode */
#define Data32 0x40000 /* needs data prefix if in 16-bit mode */
#define iclrKludge 0x80000 /* used to convert clr to xor */
-#define FWait 0x100000 /* instruction needs FWAIT */
/* (opcode_modifier & COMES_IN_ALL_SIZES) is true if the
instuction comes in byte, word, and dword sizes and is encoded into
@@ -399,18 +401,10 @@ extern const struct relax_type md_relax_table[];
extern int flag_16bit_code;
-#ifdef BFD_ASSEMBLER
-#define md_maybe_text() \
- ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
-#else
-#define md_maybe_text() \
- (now_seg != data_section && now_seg != bss_section)
-#endif
-
#define md_do_align(n, fill, len, max, around) \
if ((n) && !need_pass_2 \
&& (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \
- && md_maybe_text ()) \
+ && now_seg != data_section && now_seg != bss_section) \
{ \
char *p; \
p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \
@@ -440,6 +434,4 @@ void i386_print_statistics PARAMS ((FILE *));
extern void sco_id PARAMS ((void));
#endif
-#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
-
/* end of tc-i386.h */
diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure
index 937b289..9498428 100755
--- a/contrib/binutils/gas/configure
+++ b/contrib/binutils/gas/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
+# Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,24 +12,13 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-shared build shared libraries [default=yes]
- --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
-ac_help="$ac_help
- --enable-static build static libraries [default=yes]
- --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
--enable-bfd-assembler use BFD back end for writing object files"
ac_help="$ac_help
targets alternative target configurations besides the primary"
ac_help="$ac_help
- --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
+ --enable-shared build shared BFD library"
ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
+ --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -68,7 +57,6 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@@ -352,7 +340,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
+ echo "configure generated by autoconf version 2.12"
exit 0 ;;
-with-* | --with-*)
@@ -537,10 +525,54 @@ else
ac_n= ac_c='\c' ac_t=
fi
+user_bfd_gas=
+# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
+if test "${enable_bfd_assembler+set}" = set; then
+ enableval="$enable_bfd_assembler"
+ case "${enableval}" in
+ yes) need_bfd=yes user_bfd_gas=yes ;;
+ no) user_bfd_gas=no ;;
+ *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
+esac
+fi
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ case "${enableval}" in
+ yes) shared=true shared_bfd=true shared_opcodes=true ;;
+ no) shared=false ;;
+ *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
+ *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
+ *bfd*) shared=true shared_bfd=true ;;
+ *opcodes*) shared=true shared_opcodes=true ;;
+ *) shared=false ;;
+esac
+fi
+# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+if test "${enable_commonbfdlib+set}" = set; then
+ enableval="$enable_commonbfdlib"
+ case "${enableval}" in
+ yes) commonbfdlib=true ;;
+ no) commonbfdlib=false ;;
+ *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
+esac
+fi
+
+# Generate a header file -- gets more post-processing by Makefile later.
ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -552,7 +584,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
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: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
@@ -581,33 +613,33 @@ esac
# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+if $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:590: checking host system type" >&5
+echo "configure:622: 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 :
+ if host_alias=`$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=`$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:611: checking target system type" >&5
+echo "configure:643: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -618,14 +650,14 @@ NONE)
esac ;;
esac
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target=`$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:629: checking build system type" >&5
+echo "configure:661: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -636,7 +668,7 @@ NONE)
esac ;;
esac
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build=`$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/'`
@@ -647,110 +679,6 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# 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:664: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:718: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
program_transform_name=
else
@@ -770,588 +698,6 @@ test "$program_suffix" != NONE &&
# 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:775: checking whether ${MAKE-make} sets \${MAKE}" >&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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=gas
-
-VERSION=2.9.1
-
-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; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:821: checking for working aclocal" >&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.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:834: checking for working autoconf" >&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.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:847: checking for working automake" >&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.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:860: checking for working autoheader" >&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.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:873: checking for working makeinfo" >&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.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-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:936: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-# 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:965: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-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.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:994: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- ac_prog_rejected=no
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-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:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 1052 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-
-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:1076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&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:1081: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$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
- GCC=yes
- 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:1105: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-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"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-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:1145: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
- /* | [A-Za-z]:\\*)
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1163: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1166: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-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:1202: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'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.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-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:1218: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$NM" in
-/* | [A-Za-z]:\\*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- else
- ac_cv_path_NM="$ac_dir/nm"
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac
-fi
-
-NM="$ac_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1255: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags=
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$silent" = yes && libtool_flags="$libtool_flags --silent"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$host" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 1291 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- CFLAGS="$CFLAGS -belf"
- ;;
-esac
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-
-user_bfd_gas=
-# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
-if test "${enable_bfd_assembler+set}" = set; then
- enableval="$enable_bfd_assembler"
- case "${enableval}" in
- yes) need_bfd=yes user_bfd_gas=yes ;;
- no) user_bfd_gas=no ;;
- *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
-esac
-fi
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi
-# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
-if test "${enable_commonbfdlib+set}" = set; then
- enableval="$enable_commonbfdlib"
- case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
-esac
-fi
-
-# Generate a header file
-
-
-
te_file=generic
@@ -1388,13 +734,9 @@ for this_target in $target $canon_targets ; do
eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
# check for architecture variants
- arch=
- endian=
case ${cpu} in
- alpha*) cpu_type=alpha ;;
armeb) cpu_type=arm endian=big ;;
arm*) cpu_type=arm endian=little ;;
- thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
i[456]86) cpu_type=i386 ;;
m680[012346]0) cpu_type=m68k ;;
@@ -1406,31 +748,18 @@ for this_target in $target $canon_targets ; do
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
- sparclite*) cpu_type=sparc arch=sparclite ;;
- sparclet*) cpu_type=sparc arch=sparclet ;;
- sparc64*) cpu_type=sparc arch=v9-64 ;;
- sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
- v850*) cpu_type=v850 ;;
+ sparc64) cpu_type=sparc want_sparc_v9=true ;;
+ sparc*) cpu_type=sparc ;;
*) cpu_type=${cpu} ;;
esac
if test ${this_target} = $target ; then
target_cpu_type=${cpu_type}
- if test x${endian} = xbig; then
- cat >> confdefs.h <<\EOF
-#define TARGET_BYTES_BIG_ENDIAN 1
-EOF
-
- elif test x${endian} = xlittle; then
- cat >> confdefs.h <<\EOF
-#define TARGET_BYTES_BIG_ENDIAN 0
-EOF
-
- fi
elif test ${target_cpu_type} != ${cpu_type} ; then
continue
fi
+ targ=${cpu_type}
generic_target=${cpu_type}-$vendor-$os
dev=no
bfd_gas=no
@@ -1438,27 +767,31 @@ EOF
# assign object format
case ${generic_target} in
- a29k-*-coff) fmt=coff ;;
- a29k-amd-udi) fmt=coff ;;
- a29k-amd-ebmon) fmt=coff ;;
- a29k-nyu-sym1) fmt=coff ;;
+ a29k-*-coff) fmt=coff targ=ebmon29k ;;
+ a29k-amd-udi) fmt=coff targ=ebmon29k ;;
+ a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
+ a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
a29k-*-vxworks*) fmt=coff ;;
- alpha*-*-*vms*) fmt=evax ;;
- alpha*-*-netware*) fmt=ecoff ;;
- alpha*-*-openbsd*) fmt=ecoff ;;
- alpha*-*-osf*) fmt=ecoff ;;
- alpha*-*-linuxecoff*) fmt=ecoff ;;
- alpha*-*-linux-gnu*) fmt=elf em=linux ;;
- alpha*-*-netbsd*) fmt=elf em=nbsd ;;
+ alpha-*-*vms*) fmt=evax ;;
+ alpha-*-freebsd*) fmt=elf em=freebsd ;;
+ alpha-*-netware*) fmt=ecoff ;;
+ alpha-*-openbsd*) fmt=ecoff ;;
+ alpha-*-osf*) fmt=ecoff ;;
+ alpha-*-linuxecoff*) fmt=ecoff ;;
+ alpha-*-linux*) fmt=elf em=linux ;;
- arc-*-elf*) fmt=elf bfd_gas=yes ;;
- arm-*-riscix*) fmt=aout em=riscix ;;
- arm-*-aout) fmt=aout ;;
- arm-*-coff | thumb-*-coff) fmt=coff ;;
+ arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
+ arm-*-aout) fmt=aout
+ case "$endian" in
+ big) targ=arm-big ;;
+ *) targ=arm-lit ;;
+ esac
+ ;;
+ arm-*-coff) fmt=coff ;;
arm-*-riscix*) fmt=aout ;;
- arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
+ arm-*-pe) fmt=coff targ=armcoff em=pe ;;
d10v-*-*) fmt=elf bfd_gas=yes ;;
@@ -1472,128 +805,142 @@ EOF
h8300-*-coff) fmt=coff ;;
- i386-ibm-aix*) fmt=coff em=i386aix ;;
+ i386-ibm-aix*) fmt=coff targ=i386coff
+ em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff em=lynx ;;
+ i386-*-linux*coff*) fmt=coff em=linux
+ targ=i386coff ;;
+ i386-*-linux*) fmt=elf em=linux ;;
+ i386-*-lynxos*) fmt=coff targ=i386coff
+ em=lynx ;;
i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
fmt=elf ;;
- i386-*-freebsdelf*) fmt=elf ;;
- i386-*-freebsd*) fmt=aout em=386bsd ;;
- i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
- fmt=coff ;;
- i386-*-sco3.2v5*) fmt=elf
- if test ${this_target} = $target; then
- cat >> confdefs.h <<\EOF
-#define SCO_ELF 1
-EOF
-
- fi
- ;;
- i386-*-sco3.2*) fmt=coff ;;
+ i386-*-freebsdelf*) fmt=elf em=freebsd ;;
+ i386-*-freebsd*) fmt=aout em=freebsd bfd_gas=yes ;;
+ i386-*-sco*elf*) fmt=elf targ=sco5 ;;
+ i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
+ fmt=coff targ=i386coff ;;
i386-*-vsta) fmt=aout ;;
- i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
- fmt=coff em=go32;;
- i386-*-rtems*) fmt=coff ;;
+ i386-*-go32) fmt=coff targ=i386coff ;;
+ i386-*-rtems*) fmt=coff targ=i386coff ;;
i386-*-gnu*) fmt=elf ;;
i386-*-mach*)
fmt=aout em=mach bfd_gas=yes ;;
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
- i386-*-pe) fmt=coff em=pe ;;
- i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;;
- i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
- i386-*-*nt*) fmt=coff em=pe ;;
+ i386-*-pe) fmt=coff targ=i386coff em=pe ;;
+ i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
+ i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
i960-*-bout) fmt=bout ;;
- i960-*-coff) fmt=coff em=ic960 ;;
- i960-*-rtems*) fmt=coff em=ic960 ;;
+ i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
+ i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
i960-*-nindy*) fmt=bout ;;
i960-*-vxworks4*) fmt=bout ;;
i960-*-vxworks5.0) fmt=bout ;;
- i960-*-vxworks5.*) fmt=coff em=ic960 ;;
+ i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
i960-*-vxworks*) fmt=bout ;;
m32r-*-*) fmt=elf bfd_gas=yes ;;
m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
fmt=aout em=sun3 ;;
- m68k-motorola-sysv*) fmt=coff em=delta ;;
- m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
- m68k-apollo-*) fmt=coff em=apollo ;;
+ m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
+ m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
+ m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
m68k-*-sysv4*) # must be before -sysv*
fmt=elf em=svr4 ;;
m68k-*-elf*) fmt=elf ;;
m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
- fmt=coff ;;
+ fmt=coff targ=m68kcoff ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
- m68k-*-lynxos*) fmt=coff em=lynx ;;
+ m68k-*-linux*) fmt=elf em=linux ;;
+ m68k-*-lynxos*) fmt=coff targ=m68kcoff
+ em=lynx ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-apple-aux*) fmt=coff em=aux ;;
+ m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
- m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
- m88k-*-coff*) fmt=coff ;;
+ m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
+ m88k-*-coff*) fmt=coff targ=m88kcoff ;;
# don't change em like *-*-bsd does
- mips-dec-netbsd*) fmt=elf endian=little ;;
- mips-dec-openbsd*) fmt=elf endian=little ;;
- mips-dec-bsd*) fmt=aout ;;
- mips-sony-bsd*) fmt=ecoff ;;
+ mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
+ mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;;
+ mips-dec-bsd*) fmt=aout targ=mips-lit ;;
+ mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
- mips-*-ultrix*) fmt=ecoff endian=little ;;
- mips-*-osf*) fmt=ecoff endian=little ;;
- mips-*-ecoff*) fmt=ecoff ;;
- mips-*-ecoff*) fmt=ecoff ;;
- mips-*-irix6*) fmt=elf ;;
- mips-*-irix5*) fmt=elf ;;
- mips-*-irix*) fmt=ecoff ;;
- mips-*-lnews*) fmt=ecoff em=lnews ;;
- mips-*-riscos*) fmt=ecoff ;;
- mips-*-sysv*) fmt=ecoff ;;
- mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
- fmt=elf ;;
+ mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
+ mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
+ mips-*-ecoff*) fmt=ecoff
+ case "$endian" in
+ big) targ=mips-big ;;
+ *) targ=mips-lit ;;
+ esac
+ ;;
+ mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
+ mips-*-irix6*) fmt=elf targ=mips-big ;;
+ mips-*-irix5*) fmt=elf targ=mips-big ;;
+ mips-*-irix*) fmt=ecoff targ=mips-big ;;
+ mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
+ mips-*-riscos*) fmt=ecoff targ=mips-big ;;
+ mips-*-sysv*) fmt=ecoff targ=mips-big ;;
+ mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
+ fmt=elf
+ case "$endian" in
+ big) targ=mips-big ;;
+ *) targ=mips-lit ;;
+ esac
+ ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
mn10300-*-*) fmt=elf bfd_gas=yes ;;
ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
- fmt=coff em=pe ;;
+ fmt=coff em=pe
+ case "$endian" in
+ big) targ=ppc-big ;;
+ *) targ=ppc-lit ;;
+ esac
+ ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
- fmt=elf ;;
- ppc-*-linux-gnu*) fmt=elf
+ fmt=elf
case "$endian" in
- big) ;;
- *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
+ big) targ=ppc-big ;;
+ *) targ=ppc-lit ;;
+ esac
+ ;;
+ ppc-*-linux*) fmt=elf
+ case "$endian" in
+ big) targ=ppc-big ;;
+ *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;;
esac
;;
ppc-*-solaris*) fmt=elf
- if test ${this_target} = $target; then
- cat >> confdefs.h <<\EOF
-#define TARGET_SOLARIS_COMMENT 1
-EOF
-
- fi
- if test x${endian} = xbig; then
- { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
- fi
+ case "$endian" in
+ big) { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;;
+ *) targ=ppc-sol ;;
+ esac
+ ;;
+ ppc-*-rtems*)
+ fmt=elf
+ case "$endian" in
+ big) targ=ppc-big ;;
+ *) targ=ppc-lit ;;
+ esac
;;
- ppc-*-rtems*) fmt=elf ;;
ppc-*-macos* | ppc-*-mpw*)
fmt=coff em=macos ;;
ppc-*-netware*) fmt=elf em=ppcnw ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
- sh-*-rtems*) fmt=coff ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
@@ -1605,7 +952,7 @@ EOF
fmt=aout em=sparcaout ;;
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
+ sparc-*-linux*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
@@ -1613,12 +960,6 @@ EOF
sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
- tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
-
-
- v850-*-*) fmt=elf bfd_gas=yes ;;
-
vax-*-bsd* | vax-*-ultrix*)
fmt=aout ;;
vax-*-vms) fmt=vms ;;
@@ -1645,7 +986,7 @@ EOF
esac
case ${cpu_type}-${fmt} in
- alpha*-*) bfd_gas=yes ;;
+ alpha-*) bfd_gas=yes ;;
arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
@@ -1663,16 +1004,10 @@ EOF
# do we need the opcodes library?
case ${cpu_type} in
- vax | i386 | tic30)
+ vax | i386)
;;
*)
need_opcodes=yes
-
- case "${enable_shared}" in
- yes) shared_opcodes=true ;;
- *opcodes*) shared_opcodes=true ;;
- *) shared_opcodes=false ;;
- esac
if test "${shared_opcodes}" = "true"; then
# A shared libopcodes must be linked against libbfd.
need_bfd=yes
@@ -1680,6 +1015,18 @@ EOF
;;
esac
+ test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF
+#define SPARC_V9 1
+EOF
+
+
+ case ${cpu}-${vendor}-${os} in
+ sparc64-*-elf*) cat >> confdefs.h <<\EOF
+#define SPARC_ARCH64 1
+EOF
+ ;;
+ esac
+
case ${cpu_type} in
m32r)
case ${extra_objects} in
@@ -1717,15 +1064,6 @@ EOF
fi
;;
- sparc)
- if test $this_target = $target ; then
- cat >> confdefs.h <<EOF
-#define DEFAULT_ARCH "${arch}"
-EOF
-
- fi
- ;;
-
*)
;;
esac
@@ -1735,6 +1073,7 @@ EOF
if test $this_target = $target ; then
primary_bfd_gas=$bfd_gas
obj_format=$fmt
+ gas_target=$targ
te_file=$em
if test $bfd_gas = no ; then
@@ -1750,7 +1089,7 @@ EOF
case ${generic_target}-${fmt} in
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
- mips-*-linux-gnu*-*) case "$endian" in
+ mips-*-linux*-*) case "$endian" in
big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
*) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
esac ;;
@@ -1794,6 +1133,14 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
{ echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
fi
+# and target makefile frag
+
+target_frag=${srcdir}/config/${gas_target}.mt
+if test ! -r ${target_frag}; then
+ target_frag=/dev/null # ick! but subst_file can't be conditionalized
+fi
+
+
case ${user_bfd_gas}-${primary_bfd_gas} in
yes-yes | no-no)
# We didn't override user's choice.
@@ -2005,14 +1352,68 @@ esac
# do we need the opcodes library?
case "${need_opcodes}" in
yes)
- OPCODES_LIB=../opcodes/libopcodes.la
+ OPCODES_DEP=../opcodes/libopcodes.a
+ OPCODES_LIB='-L../opcodes -lopcodes'
+
+ # We need to handle some special cases for shared libraries.
+ case "${host}" in
+ *-*-sunos*)
+ # On SunOS, we must link against the name we are going to install,
+ # not -lbfd, since SunOS does not support SONAME.
+ if test "${shared_opcodes}" = "true"; then
+ OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
+ fi
+ ;;
+ alpha*-*-osf*)
+ # On Alpha OSF/1, the native linker searches all the -L
+ # directories for any LIB.so files, and only then searches for any
+ # LIB.a files. That means that if there is an installed
+ # libbfd.so, but this build is not done with --enable-shared, the
+ # link will wind up being against the install libbfd.so rather
+ # than the newly built libbfd. To avoid this, we must explicitly
+ # link against libbfd.a when --enable-shared is not used.
+ if test "${shared_opcodes}" != "true"; then
+ OPCODES_LIB='../opcodes/libopcodes.a'
+ fi
+ ;;
+ esac
;;
esac
case "${need_bfd}" in
yes)
- BFDLIB=../bfd/libbfd.la
+ BFDDEP=../bfd/libbfd.a
+ BFDLIB='-L../bfd -lbfd'
ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
+
+ # We need to handle some special cases for shared libraries
+ case "${host}" in
+ *-*-sunos*)
+ # On SunOS, we must link against the name we are going to install,
+ # not -lbfd, since SunOS does not support SONAME.
+ if test "${shared_bfd}" = "true"; then
+ BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
+ fi
+ ;;
+ alpha*-*-osf*)
+ # On Alpha OSF/1, the native linker searches all the -L
+ # directories for any LIB.so files, and only then searches for any
+ # LIB.a files. That means that if there is an installed
+ # libbfd.so, but this build is not done with --enable-shared, the
+ # link will wind up being against the install libbfd.so rather
+ # than the newly built libbfd. To avoid this, we must explicitly
+ # link against libbfd.a when --enable-shared is not used.
+ if test "${shared_bfd}" != "true"; then
+ BFDLIB='../bfd/libbfd.a'
+ fi
+ ;;
+ esac
+
+ if test "${commonbfdlib}" = "true"; then
+ # when a shared libbfd is built with --enable-commonbfdlib,
+ # all of libopcodes is available in libbfd.so
+ OPCODES_LIB=
+ fi
;;
esac
@@ -2021,6 +1422,8 @@ esac
+
+
cat >> confdefs.h <<EOF
#define TARGET_ALIAS "${target_alias}"
EOF
@@ -2045,7 +1448,7 @@ EOF
# 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:2049: checking for $ac_word" >&5
+echo "configure:1449: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2074,7 +1477,7 @@ 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:2078: checking for $ac_word" >&5
+echo "configure:1478: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2122,7 +1525,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2126: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1526: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2132,11 +1535,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2136 "configure"
+#line 1536 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -2156,12 +1559,12 @@ 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:2160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&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:2165: checking whether we are using GNU C" >&5
+echo "configure:1565: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2170,7 +1573,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1574: \"$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
@@ -2185,7 +1588,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2189: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1589: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2212,120 +1615,69 @@ else
test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
-
-for ac_prog in 'bison -y' byacc
-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:2222: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# 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:1627: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_YACC="$ac_prog"
- break
- fi
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ for ac_prog in ginstall installbsd scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
done
- IFS="$ac_save_ifs"
-fi
-fi
-YACC="$ac_cv_prog_YACC"
-if test -n "$YACC"; then
- echo "$ac_t""$YACC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
+ IFS="$ac_save_IFS"
-# Extract the first word of "flex", so it can be a program name with args.
-set dummy flex; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2254: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LEX"; then
- ac_cv_prog_LEX="$LEX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LEX="flex"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
-fi
fi
-LEX="$ac_cv_prog_LEX"
-if test -n "$LEX"; then
- echo "$ac_t""$LEX" 1>&6
-else
- echo "$ac_t""no" 1>&6
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
fi
+echo "$ac_t""$INSTALL" 1>&6
-if test -z "$LEXLIB"
-then
- case "$LEX" in
- flex*) ac_lib=fl ;;
- *) ac_lib=l ;;
- esac
- echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2287: checking for yywrap in -l$ac_lib" >&5
-ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-l$ac_lib $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yywrap();
-
-int main() {
-yywrap()
-; return 0; }
-EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LEXLIB="-l$ac_lib"
-else
- echo "$ac_t""no" 1>&6
-fi
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2329: checking how to run the C preprocessor" >&5
+echo "configure:1678: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2340,13 +1692,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
+#line 1693 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -2357,13 +1709,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2361 "configure"
+#line 1710 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -2385,187 +1737,21 @@ else
fi
echo "$ac_t""$CPP" 1>&6
-echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2390: checking lex output file root" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # The minimal lex program is just a single line: %%. But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-echo '%%
-%%' | $LEX
-if test -f lex.yy.c; then
- ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
- ac_cv_prog_lex_root=lexyy
-else
- { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-
-echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2411: checking whether yytext is a pointer" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
-ac_save_LIBS="$LIBS"
-LIBS="$LIBS $LEXLIB"
-cat > conftest.$ac_ext <<EOF
-#line 2423 "configure"
-#include "confdefs.h"
-`cat $LEX_OUTPUT_ROOT.c`
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- ac_cv_prog_lex_yytext_pointer=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-rm -f "${LEX_OUTPUT_ROOT}.c"
-
-fi
-
-echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
- cat >> confdefs.h <<\EOF
-#define YYTEXT_POINTER 1
-EOF
-
-fi
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2453: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
-
-
-echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:2471: checking for Cygwin32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2476 "configure"
-#include "confdefs.h"
-
-int main() {
-return __CYGWIN32__;
-; return 0; }
-EOF
-if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- am_cv_cygwin32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_cygwin32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_cygwin32" 1>&6
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes
-echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:2500: checking for Mingw32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2505 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:2512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- am_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_mingw32" 1>&6
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2531: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
-else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
-rm -f am_c_test*
-fi
-
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
-fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-echo "$ac_t""${am_cv_exeext}" 1>&6
-
-
for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2559: checking for $ac_hdr" >&5
+echo "configure:1742: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2564 "configure"
+#line 1747 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2595,7 +1781,7 @@ done
# Put this here so that autoconf's "cross-compiling" message doesn't confuse
# people who are not cross-compiling but are compiling cross-assemblers.
echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
-echo "configure:2599: checking whether compiling a cross-assembler" >&5
+echo "configure:1782: checking whether compiling a cross-assembler" >&5
if test "${host}" = "${target}"; then
cross_gas=no
else
@@ -2610,19 +1796,19 @@ echo "$ac_t""$cross_gas" 1>&6
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2614: checking for working alloca.h" >&5
+echo "configure:1797: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2619 "configure"
+#line 1802 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2643,12 +1829,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2647: checking for alloca" >&5
+echo "configure:1830: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2652 "configure"
+#line 1835 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2671,7 +1857,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2703,12 +1889,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2707: checking whether alloca needs Cray hooks" >&5
+echo "configure:1890: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2712 "configure"
+#line 1895 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2733,12 +1919,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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:2737: checking for $ac_func" >&5
+echo "configure:1920: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2742 "configure"
+#line 1925 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2761,7 +1947,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2788,7 +1974,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2792: checking stack direction for C alloca" >&5
+echo "configure:1975: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2796,7 +1982,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2800 "configure"
+#line 1983 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2815,7 +2001,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2837,21 +2023,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2841: checking for inline" >&5
+echo "configure:2024: checking for inline" >&5
if eval "test \"`echo '$''{'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 <<EOF
-#line 2848 "configure"
+#line 2031 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2881,12 +2067,12 @@ esac
for ac_func in unlink remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2885: checking for $ac_func" >&5
+echo "configure:2068: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2890 "configure"
+#line 2073 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2909,7 +2095,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2938,12 +2124,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2942: checking for $ac_func" >&5
+echo "configure:2125: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2947 "configure"
+#line 2130 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2966,7 +2152,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2995,12 +2181,12 @@ done
# enough, but on some of those systems, the assert macro relies on requoting
# working properly!
echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
-echo "configure:2999: checking for working assert macro" >&5
+echo "configure:2182: checking for working assert macro" >&5
if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
+#line 2187 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -3016,7 +2202,7 @@ assert (a == b
; return 0; }
EOF
-if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_assert_ok=yes
else
@@ -3057,12 +2243,12 @@ gas_test_headers="
"
echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
-echo "configure:3061: checking whether declaration is required for strstr" >&5
+echo "configure:2244: checking whether declaration is required for strstr" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3066 "configure"
+#line 2249 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3073,7 +2259,7 @@ x = (f) strstr;
; return 0; }
EOF
-if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_strstr=no
else
@@ -3094,12 +2280,12 @@ EOF
echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
-echo "configure:3098: checking whether declaration is required for malloc" >&5
+echo "configure:2281: checking whether declaration is required for malloc" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3103 "configure"
+#line 2286 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3110,7 +2296,7 @@ x = (f) malloc;
; return 0; }
EOF
-if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_malloc=no
else
@@ -3131,12 +2317,12 @@ EOF
echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
-echo "configure:3135: checking whether declaration is required for free" >&5
+echo "configure:2318: checking whether declaration is required for free" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3140 "configure"
+#line 2323 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3147,7 +2333,7 @@ x = (f) free;
; return 0; }
EOF
-if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_free=no
else
@@ -3168,12 +2354,12 @@ EOF
echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
-echo "configure:3172: checking whether declaration is required for sbrk" >&5
+echo "configure:2355: checking whether declaration is required for sbrk" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3177 "configure"
+#line 2360 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -3184,7 +2370,7 @@ x = (f) sbrk;
; return 0; }
EOF
-if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_sbrk=no
else
@@ -3208,12 +2394,12 @@ EOF
# for it?
echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
-echo "configure:3212: checking whether declaration is required for errno" >&5
+echo "configure:2395: checking whether declaration is required for errno" >&5
if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3217 "configure"
+#line 2400 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@@ -3228,7 +2414,7 @@ x = (f) errno;
; return 0; }
EOF
-if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_errno=no
else
@@ -3248,6 +2434,58 @@ EOF
}
+HLDFLAGS=
+HLDENV=
+RPATH_ENVVAR=LD_LIBRARY_PATH
+# If we have shared libraries, try to set rpath reasonably.
+if test "${shared}" = "true"; then
+ case "${host}" in
+ *-*-hpux*)
+ HLDFLAGS='-Wl,+s,+b,$(libdir)'
+ RPATH_ENVVAR=SHLIB_PATH
+ ;;
+ *-*-irix5* | *-*-irix6*)
+ HLDFLAGS='-Wl,-rpath,$(libdir)'
+ ;;
+ *-*-linux*aout*)
+ ;;
+ *-*-linux*)
+ HLDFLAGS='-Wl,-rpath,$(libdir)'
+ ;;
+ *-*-solaris*)
+ HLDFLAGS='-R $(libdir)'
+ ;;
+ *-*-sysv4*)
+ HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
+ ;;
+ esac
+fi
+
+# On SunOS, if the linker supports the -rpath option, use it to
+# prevent ../bfd and ../opcodes from being included in the run time
+# search path.
+case "${host}" in
+ *-*-sunos*)
+ echo 'main () { }' > conftest.c
+ ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
+ if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
+ :
+ elif grep 'No such file' conftest.t >/dev/null 2>&1; then
+ :
+ elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
+ :
+ elif test "${shared}" = "true"; then
+ HLDFLAGS='-Wl,-rpath=$(libdir)'
+ else
+ HLDFLAGS='-Wl,-rpath='
+ fi
+ rm -f conftest.t conftest.c conftest
+ ;;
+esac
+
+
+
+
trap '' 1 2 15
@@ -3273,7 +2511,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -3340,7 +2578,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.12"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -3351,7 +2589,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3360,7 +2598,6 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
-s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
@@ -3397,39 +2634,26 @@ 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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%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%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
-s%@LN_S@%$LN_S%g
-s%@LIBTOOL@%$LIBTOOL%g
+/@target_frag@/r $target_frag
+s%@target_frag@%%g
s%@extra_objects@%$extra_objects%g
s%@target_cpu_type@%$target_cpu_type%g
s%@obj_format@%$obj_format%g
s%@te_file@%$te_file%g
s%@atof@%$atof%g
+s%@BFDDEP@%$BFDDEP%g
s%@BFDLIB@%$BFDLIB%g
+s%@OPCODES_DEP@%$OPCODES_DEP%g
s%@OPCODES_LIB@%$OPCODES_LIB%g
s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
-s%@YACC@%$YACC%g
-s%@LEX@%$LEX%g
-s%@LEXLIB@%$LEXLIB%g
+s%@CC@%$CC%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CPP@%$CPP%g
-s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
s%@ALLOCA@%$ALLOCA%g
+s%@HLDFLAGS@%$HLDFLAGS%g
+s%@HLDENV@%$HLDENV%g
+s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
CEOF
EOF
@@ -3552,7 +2776,7 @@ ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
+ CONFIG_HEADERS="conf"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
@@ -3639,13 +2863,11 @@ fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
-
target_cpu_type=${target_cpu_type}
obj_format=${obj_format}
te_file=${te_file}
EOF
cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in
index ebb6202..9431028 100644
--- a/contrib/binutils/gas/configure.in
+++ b/contrib/binutils/gas/configure.in
@@ -4,16 +4,9 @@ dnl And be careful when changing it! If you must add tests with square
dnl brackets, be sure changequote invocations surround it.
dnl
dnl
-dnl v2.5 needed for --bindir et al
-AC_PREREQ(2.5)
-AC_INIT(as.h)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(gas, 2.9.1)
-
-AM_PROG_LIBTOOL
-
+AC_PREREQ(2.5)dnl v2.5 needed for --bindir et al
+AC_INIT(as.h)dnl
+dnl
user_bfd_gas=
AC_ARG_ENABLE(bfd-assembler,
[ --enable-bfd-assembler use BFD back end for writing object files],
@@ -30,6 +23,17 @@ AC_ARG_ENABLE(targets,
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
+AC_ARG_ENABLE(shared,
+[ --enable-shared build shared BFD library],
+[case "${enableval}" in
+ yes) shared=true shared_bfd=true shared_opcodes=true ;;
+ no) shared=false ;;
+ *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
+ *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
+ *bfd*) shared=true shared_bfd=true ;;
+ *opcodes*) shared=true shared_opcodes=true ;;
+ *) shared=false ;;
+esac])dnl
AC_ARG_ENABLE(commonbfdlib,
[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
[case "${enableval}" in
@@ -38,8 +42,13 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
-# Generate a header file
-AM_CONFIG_HEADER(config.h:config.in)
+# Generate a header file -- gets more post-processing by Makefile later.
+AC_CONFIG_HEADER(conf)
+
+dnl For recursion to work right, this must be an absolute pathname.
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
te_file=generic
@@ -66,13 +75,9 @@ changequote(,)dnl
changequote([,])dnl
# check for architecture variants
- arch=
- endian=
case ${cpu} in
- alpha*) cpu_type=alpha ;;
armeb) cpu_type=arm endian=big ;;
arm*) cpu_type=arm endian=little ;;
- thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
changequote(,)dnl
i[456]86) cpu_type=i386 ;;
@@ -86,25 +91,18 @@ changequote([,])dnl
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
- sparclite*) cpu_type=sparc arch=sparclite ;;
- sparclet*) cpu_type=sparc arch=sparclet ;;
- sparc64*) cpu_type=sparc arch=v9-64 ;;
- sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
- v850*) cpu_type=v850 ;;
+ sparc64) cpu_type=sparc want_sparc_v9=true ;;
+ sparc*) cpu_type=sparc ;;
*) cpu_type=${cpu} ;;
esac
if test ${this_target} = $target ; then
target_cpu_type=${cpu_type}
- if test x${endian} = xbig; then
- AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1)
- elif test x${endian} = xlittle; then
- AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0)
- fi
elif test ${target_cpu_type} != ${cpu_type} ; then
continue
fi
+ targ=${cpu_type}
generic_target=${cpu_type}-$vendor-$os
dev=no
bfd_gas=no
@@ -112,27 +110,30 @@ changequote([,])dnl
# assign object format
case ${generic_target} in
- a29k-*-coff) fmt=coff ;;
- a29k-amd-udi) fmt=coff ;;
- a29k-amd-ebmon) fmt=coff ;;
- a29k-nyu-sym1) fmt=coff ;;
+ a29k-*-coff) fmt=coff targ=ebmon29k ;;
+ a29k-amd-udi) fmt=coff targ=ebmon29k ;;
+ a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
+ a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
a29k-*-vxworks*) fmt=coff ;;
- alpha*-*-*vms*) fmt=evax ;;
- alpha*-*-netware*) fmt=ecoff ;;
- alpha*-*-openbsd*) fmt=ecoff ;;
- alpha*-*-osf*) fmt=ecoff ;;
- alpha*-*-linuxecoff*) fmt=ecoff ;;
- alpha*-*-linux-gnu*) fmt=elf em=linux ;;
- alpha*-*-netbsd*) fmt=elf em=nbsd ;;
+ alpha-*-*vms*) fmt=evax ;;
+ alpha-*-netware*) fmt=ecoff ;;
+ alpha-*-openbsd*) fmt=ecoff ;;
+ alpha-*-osf*) fmt=ecoff ;;
+ alpha-*-linuxecoff*) fmt=ecoff ;;
+ alpha-*-linux*) fmt=elf em=linux ;;
- arc-*-elf*) fmt=elf bfd_gas=yes ;;
- arm-*-riscix*) fmt=aout em=riscix ;;
- arm-*-aout) fmt=aout ;;
- arm-*-coff | thumb-*-coff) fmt=coff ;;
+ arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
+ arm-*-aout) fmt=aout
+ case "$endian" in
+ big) targ=arm-big ;;
+ *) targ=arm-lit ;;
+ esac
+ ;;
+ arm-*-coff) fmt=coff ;;
arm-*-riscix*) fmt=aout ;;
- arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
+ arm-*-pe) fmt=coff targ=armcoff em=pe ;;
d10v-*-*) fmt=elf bfd_gas=yes ;;
@@ -146,122 +147,142 @@ changequote([,])dnl
h8300-*-coff) fmt=coff ;;
- i386-ibm-aix*) fmt=coff em=i386aix ;;
+ i386-ibm-aix*) fmt=coff targ=i386coff
+ em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff em=lynx ;;
+ i386-*-linux*coff*) fmt=coff em=linux
+ targ=i386coff ;;
+ i386-*-linux*) fmt=elf em=linux ;;
+ i386-*-lynxos*) fmt=coff targ=i386coff
+ em=lynx ;;
i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
fmt=elf ;;
- i386-*-freebsdelf*) fmt=elf ;;
- i386-*-freebsd*) fmt=aout em=386bsd ;;
- i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
- fmt=coff ;;
- i386-*-sco3.2v5*) fmt=elf
- if test ${this_target} = $target; then
- AC_DEFINE(SCO_ELF)
- fi
- ;;
- i386-*-sco3.2*) fmt=coff ;;
+ i386-*-freebsdelf*) fmt=elf em=freebsd ;;
+ i386-*-freebsd*) fmt=aout em=freebsd bfd_gas=yes ;;
+ i386-*-sco*elf*) fmt=elf targ=sco5 ;;
+ i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
+ fmt=coff targ=i386coff ;;
i386-*-vsta) fmt=aout ;;
- i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
- fmt=coff em=go32;;
- i386-*-rtems*) fmt=coff ;;
+ i386-*-go32) fmt=coff targ=i386coff ;;
+ i386-*-rtems*) fmt=coff targ=i386coff ;;
i386-*-gnu*) fmt=elf ;;
i386-*-mach*)
fmt=aout em=mach bfd_gas=yes ;;
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
- i386-*-pe) fmt=coff em=pe ;;
- i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;;
- i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
- i386-*-*nt*) fmt=coff em=pe ;;
+ i386-*-pe) fmt=coff targ=i386coff em=pe ;;
+ i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
+ i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
i960-*-bout) fmt=bout ;;
- i960-*-coff) fmt=coff em=ic960 ;;
- i960-*-rtems*) fmt=coff em=ic960 ;;
+ i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
+ i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
i960-*-nindy*) fmt=bout ;;
i960-*-vxworks4*) fmt=bout ;;
i960-*-vxworks5.0) fmt=bout ;;
- i960-*-vxworks5.*) fmt=coff em=ic960 ;;
+ i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
i960-*-vxworks*) fmt=bout ;;
m32r-*-*) fmt=elf bfd_gas=yes ;;
m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
fmt=aout em=sun3 ;;
- m68k-motorola-sysv*) fmt=coff em=delta ;;
- m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
- m68k-apollo-*) fmt=coff em=apollo ;;
+ m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
+ m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
+ m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
m68k-*-sysv4*) # must be before -sysv*
fmt=elf em=svr4 ;;
m68k-*-elf*) fmt=elf ;;
m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
- fmt=coff ;;
+ fmt=coff targ=m68kcoff ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
- m68k-*-lynxos*) fmt=coff em=lynx ;;
+ m68k-*-linux*) fmt=elf em=linux ;;
+ m68k-*-lynxos*) fmt=coff targ=m68kcoff
+ em=lynx ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-apple-aux*) fmt=coff em=aux ;;
+ m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
- m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
- m88k-*-coff*) fmt=coff ;;
+ m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
+ m88k-*-coff*) fmt=coff targ=m88kcoff ;;
# don't change em like *-*-bsd does
- mips-dec-netbsd*) fmt=elf endian=little ;;
- mips-dec-openbsd*) fmt=elf endian=little ;;
- mips-dec-bsd*) fmt=aout ;;
- mips-sony-bsd*) fmt=ecoff ;;
+ mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
+ mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;;
+ mips-dec-bsd*) fmt=aout targ=mips-lit ;;
+ mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
- mips-*-ultrix*) fmt=ecoff endian=little ;;
- mips-*-osf*) fmt=ecoff endian=little ;;
- mips-*-ecoff*) fmt=ecoff ;;
- mips-*-ecoff*) fmt=ecoff ;;
- mips-*-irix6*) fmt=elf ;;
- mips-*-irix5*) fmt=elf ;;
- mips-*-irix*) fmt=ecoff ;;
- mips-*-lnews*) fmt=ecoff em=lnews ;;
- mips-*-riscos*) fmt=ecoff ;;
- mips-*-sysv*) fmt=ecoff ;;
- mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
- fmt=elf ;;
+ mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
+ mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
+ mips-*-ecoff*) fmt=ecoff
+ case "$endian" in
+ big) targ=mips-big ;;
+ *) targ=mips-lit ;;
+ esac
+ ;;
+ mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
+ mips-*-irix6*) fmt=elf targ=mips-big ;;
+ mips-*-irix5*) fmt=elf targ=mips-big ;;
+ mips-*-irix*) fmt=ecoff targ=mips-big ;;
+ mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
+ mips-*-riscos*) fmt=ecoff targ=mips-big ;;
+ mips-*-sysv*) fmt=ecoff targ=mips-big ;;
+ mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
+ fmt=elf
+ case "$endian" in
+ big) targ=mips-big ;;
+ *) targ=mips-lit ;;
+ esac
+ ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
mn10300-*-*) fmt=elf bfd_gas=yes ;;
ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
- fmt=coff em=pe ;;
+ fmt=coff em=pe
+ case "$endian" in
+ big) targ=ppc-big ;;
+ *) targ=ppc-lit ;;
+ esac
+ ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
- fmt=elf ;;
- ppc-*-linux-gnu*) fmt=elf
+ fmt=elf
+ case "$endian" in
+ big) targ=ppc-big ;;
+ *) targ=ppc-lit ;;
+ esac
+ ;;
+ ppc-*-linux*) fmt=elf
case "$endian" in
- big) ;;
- *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
+ big) targ=ppc-big ;;
+ *) AC_MSG_ERROR(Linux must be configured big endian) ;;
esac
;;
ppc-*-solaris*) fmt=elf
- if test ${this_target} = $target; then
- AC_DEFINE(TARGET_SOLARIS_COMMENT)
- fi
- if test x${endian} = xbig; then
- AC_MSG_ERROR(Solaris must be configured little endian)
- fi
+ case "$endian" in
+ big) AC_MSG_ERROR(Solaris must be configured little endian) ;;
+ *) targ=ppc-sol ;;
+ esac
+ ;;
+ ppc-*-rtems*)
+ fmt=elf
+ case "$endian" in
+ big) targ=ppc-big ;;
+ *) targ=ppc-lit ;;
+ esac
;;
- ppc-*-rtems*) fmt=elf ;;
ppc-*-macos* | ppc-*-mpw*)
fmt=coff em=macos ;;
ppc-*-netware*) fmt=elf em=ppcnw ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
- sh-*-rtems*) fmt=coff ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
@@ -273,7 +294,7 @@ changequote([,])dnl
fmt=aout em=sparcaout ;;
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
+ sparc-*-linux*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
@@ -281,12 +302,6 @@ changequote([,])dnl
sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
- tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
-
-
- v850-*-*) fmt=elf bfd_gas=yes ;;
-
vax-*-bsd* | vax-*-ultrix*)
fmt=aout ;;
vax-*-vms) fmt=vms ;;
@@ -313,7 +328,7 @@ changequote([,])dnl
esac
case ${cpu_type}-${fmt} in
- alpha*-*) bfd_gas=yes ;;
+ alpha-*) bfd_gas=yes ;;
arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
@@ -331,16 +346,10 @@ changequote([,])dnl
# do we need the opcodes library?
case ${cpu_type} in
- vax | i386 | tic30)
+ vax | i386)
;;
*)
need_opcodes=yes
-
- case "${enable_shared}" in
- yes) shared_opcodes=true ;;
- *opcodes*) shared_opcodes=true ;;
- *) shared_opcodes=false ;;
- esac
if test "${shared_opcodes}" = "true"; then
# A shared libopcodes must be linked against libbfd.
need_bfd=yes
@@ -348,6 +357,12 @@ changequote([,])dnl
;;
esac
+ test -n "$want_sparc_v9" && AC_DEFINE(SPARC_V9)
+
+ case ${cpu}-${vendor}-${os} in
+ sparc64-*-elf*) AC_DEFINE(SPARC_ARCH64) ;;
+ esac
+
case ${cpu_type} in
m32r)
case ${extra_objects} in
@@ -382,12 +397,6 @@ changequote([,])dnl
fi
;;
- sparc)
- if test $this_target = $target ; then
- AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}")
- fi
- ;;
-
*)
;;
esac
@@ -397,6 +406,7 @@ changequote([,])dnl
if test $this_target = $target ; then
primary_bfd_gas=$bfd_gas
obj_format=$fmt
+ gas_target=$targ
te_file=$em
if test $bfd_gas = no ; then
@@ -412,7 +422,7 @@ changequote([,])dnl
case ${generic_target}-${fmt} in
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
- mips-*-linux-gnu*-*) case "$endian" in
+ mips-*-linux*-*) case "$endian" in
big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
*) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
esac ;;
@@ -459,6 +469,14 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
fi
+# and target makefile frag
+
+target_frag=${srcdir}/config/${gas_target}.mt
+if test ! -r ${target_frag}; then
+ target_frag=/dev/null # ick! but subst_file can't be conditionalized
+fi
+AC_SUBST_FILE(target_frag)
+
case ${user_bfd_gas}-${primary_bfd_gas} in
yes-yes | no-no)
# We didn't override user's choice.
@@ -581,18 +599,74 @@ esac
# do we need the opcodes library?
case "${need_opcodes}" in
yes)
- OPCODES_LIB=../opcodes/libopcodes.la
+ OPCODES_DEP=../opcodes/libopcodes.a
+ OPCODES_LIB='-L../opcodes -lopcodes'
+
+ # We need to handle some special cases for shared libraries.
+ case "${host}" in
+ *-*-sunos*)
+ # On SunOS, we must link against the name we are going to install,
+ # not -lbfd, since SunOS does not support SONAME.
+ if test "${shared_opcodes}" = "true"; then
+ OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
+ fi
+ ;;
+ alpha*-*-osf*)
+ # On Alpha OSF/1, the native linker searches all the -L
+ # directories for any LIB.so files, and only then searches for any
+ # LIB.a files. That means that if there is an installed
+ # libbfd.so, but this build is not done with --enable-shared, the
+ # link will wind up being against the install libbfd.so rather
+ # than the newly built libbfd. To avoid this, we must explicitly
+ # link against libbfd.a when --enable-shared is not used.
+ if test "${shared_opcodes}" != "true"; then
+ OPCODES_LIB='../opcodes/libopcodes.a'
+ fi
+ ;;
+ esac
;;
esac
case "${need_bfd}" in
yes)
- BFDLIB=../bfd/libbfd.la
+ BFDDEP=../bfd/libbfd.a
+ BFDLIB='-L../bfd -lbfd'
ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
+
+ # We need to handle some special cases for shared libraries
+ case "${host}" in
+ *-*-sunos*)
+ # On SunOS, we must link against the name we are going to install,
+ # not -lbfd, since SunOS does not support SONAME.
+ if test "${shared_bfd}" = "true"; then
+ BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
+ fi
+ ;;
+ alpha*-*-osf*)
+ # On Alpha OSF/1, the native linker searches all the -L
+ # directories for any LIB.so files, and only then searches for any
+ # LIB.a files. That means that if there is an installed
+ # libbfd.so, but this build is not done with --enable-shared, the
+ # link will wind up being against the install libbfd.so rather
+ # than the newly built libbfd. To avoid this, we must explicitly
+ # link against libbfd.a when --enable-shared is not used.
+ if test "${shared_bfd}" != "true"; then
+ BFDLIB='../bfd/libbfd.a'
+ fi
+ ;;
+ esac
+
+ if test "${commonbfdlib}" = "true"; then
+ # when a shared libbfd is built with --enable-commonbfdlib,
+ # all of libopcodes is available in libbfd.so
+ OPCODES_LIB=
+ fi
;;
esac
+AC_SUBST(BFDDEP)
AC_SUBST(BFDLIB)
+AC_SUBST(OPCODES_DEP)
AC_SUBST(OPCODES_LIB)
AC_SUBST(ALL_OBJ_DEPS)
@@ -604,14 +678,7 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}")
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}")
AC_PROG_CC
-
-AC_PROG_YACC
-AC_PROG_LEX
-AC_DECL_YYTEXT
-
-AM_MAINTAINER_MODE
-AM_CYGWIN32
-AM_EXEEXT
+AC_PROG_INSTALL
AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
@@ -676,6 +743,58 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [
#endif
])
+HLDFLAGS=
+HLDENV=
+RPATH_ENVVAR=LD_LIBRARY_PATH
+# If we have shared libraries, try to set rpath reasonably.
+if test "${shared}" = "true"; then
+ case "${host}" in
+ *-*-hpux*)
+ HLDFLAGS='-Wl,+s,+b,$(libdir)'
+ RPATH_ENVVAR=SHLIB_PATH
+ ;;
+ *-*-irix5* | *-*-irix6*)
+ HLDFLAGS='-Wl,-rpath,$(libdir)'
+ ;;
+ *-*-linux*aout*)
+ ;;
+ *-*-linux*)
+ HLDFLAGS='-Wl,-rpath,$(libdir)'
+ ;;
+ *-*-solaris*)
+ HLDFLAGS='-R $(libdir)'
+ ;;
+ *-*-sysv4*)
+ HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
+ ;;
+ esac
+fi
+
+# On SunOS, if the linker supports the -rpath option, use it to
+# prevent ../bfd and ../opcodes from being included in the run time
+# search path.
+case "${host}" in
+ *-*-sunos*)
+ echo 'main () { }' > conftest.c
+ ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
+ if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
+ :
+ elif grep 'No such file' conftest.t >/dev/null 2>&1; then
+ :
+ elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
+ :
+ elif test "${shared}" = "true"; then
+ HLDFLAGS='-Wl,-rpath=$(libdir)'
+ else
+ HLDFLAGS='-Wl,-rpath='
+ fi
+ rm -f conftest.t conftest.c conftest
+ ;;
+esac
+AC_SUBST(HLDFLAGS)
+AC_SUBST(HLDENV)
+AC_SUBST(RPATH_ENVVAR)
+
dnl This must come last.
dnl We used to make symlinks to files in the source directory, but now
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
index c37aab3..f6f2b2c 100644
--- a/contrib/binutils/ld/Makefile.in
+++ b/contrib/binutils/ld/Makefile.in
@@ -1,93 +1,76 @@
-# Makefile.in generated automatically by automake 1.2e from Makefile.am
+# Makefile for the GNU linker ld (version 2)
+# Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
+# Free Software Foundation, Inc.
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# This file is part of GNU ld.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
+srcdir = @srcdir@
+objdir = .
+
+target_alias = @target_alias@
prefix = @prefix@
-exec_prefix = @exec_prefix@
+program_transform_name = @program_transform_name@
+exec_prefix = @exec_prefix@
bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
libdir = @libdir@
-infodir = @infodir@
+tooldir = $(exec_prefix)/$(target_alias)
+datadir = @datadir@
mandir = @mandir@
+man1dir = $(mandir)/man1
+man2dir = $(mandir)/man2
+man3dir = $(mandir)/man3
+man4dir = $(mandir)/man4
+man5dir = $(mandir)/man5
+man6dir = $(mandir)/man6
+man7dir = $(mandir)/man7
+man8dir = $(mandir)/man8
+man9dir = $(mandir)/man9
+infodir = @infodir@
includedir = @includedir@
-oldincludedir = /usr/include
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+# We put the scripts in the directory $(scriptdir)/ldscripts.
+# We can't put the scripts in $(datadir) because the SEARCH_DIR
+# directives need to be different for native and cross linkers.
+scriptdir = $(tooldir)/lib
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
+SHELL = /bin/sh
-INSTALL = @INSTALL@
+INSTALL = `cd $(srcdir); pwd`/../install.sh -c
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-CC = @CC@
-EXEEXT = @EXEEXT@
-HDEFINES = @HDEFINES@
-LD = @LD@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
-NM = @NM@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-TDIRS = @TDIRS@
-VERSION = @VERSION@
-
-AUTOMAKE_OPTIONS = cygnus dejagnu
-
-tooldir = $(exec_prefix)/$(target_alias)
-
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
-YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
+INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
-# We put the scripts in the directory $(scriptdir)/ldscripts.
-# We can't put the scripts in $(datadir) because the SEARCH_DIR
-# directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+AR = ar
+AR_FLAGS = qv
+CC = @CC@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+HLDFLAGS = @HLDFLAGS@
+HLDENV = @HLDENV@
+RPATH_ENVVAR = @RPATH_ENVVAR@
+MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
+RANLIB = ranlib
+BISON = bison -y
+LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
@@ -103,16 +86,44 @@ LIB_PATH =
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
+INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
DEP = mkdep
# What version of the manual to build
DOCVER = gen
+# Where to find texinfo.tex to format docn with TeX
+TEXIDIR = $(srcdir)/../texinfo
+
+# Where to find other docs needed to format with TeX
+TEXINPUTS = $(TEXIDIR):$(BFDDIR)/doc:$(srcdir)
+
+# Whether to get roff to put indexing entries on stderr
+TEXI2OPT =
+# You neeed this to generate ld-index.ms (or .mm or .me)
+# TEXI2OPT = -i
+
+TEXI2ROFF=texi2roff
+
+# Which roff program to use to generate index for texi2roff'd doc
+ROFF = groff
+
#stuff for self hosting (can be overridden in config file).
HOSTING_CRT0 = @HOSTING_CRT0@
HOSTING_LIBS = @HOSTING_LIBS@
HOSTING_EMU = -m $(EMUL)
+# These were used by `make check-cdtest'
+#
+#CXX = `if [ -f ../gcc/xgcc ] ; then \
+# echo ../gcc/xgcc -B../gcc/; \
+# else echo gcc; \
+# fi`
+#CXXFLAGS = -fgnu-linker
+#
+# FIX_ME: using ../gcc/xgcc breaks the cdtest.
+#CXX = g++
+
# Setup the testing framework, if you have one
EXPECT = `if [ -f $$r/../expect/expect ] ; \
then echo $$r/../expect/expect ; \
@@ -135,7 +146,7 @@ CC_FOR_TARGET = ` \
if [ "@host@" = "@target@" ] ; then \
echo $(CC); \
else \
- echo gcc | sed '$(transform)'; \
+ echo gcc | sed '$(program_transform_name)'; \
fi; \
fi`
@@ -151,18 +162,37 @@ CXX_FOR_TARGET = ` \
if [ "@host@" = "@target@" ] ; then \
echo $(CXX); \
else \
- echo gcc | sed '$(transform)'; \
+ echo gcc | sed '$(program_transform_name)'; \
fi; \
fi`
-noinst_PROGRAMS = ld-new
-info_TEXINFOS = ld.texinfo
-noinst_TEXINFOS = ldint.texinfo
-man_MANS = ld.1
+# go directly to ld.new in case this ld isn't capable of
+# linking native object on this host. It can be renamed on
+# install.
+LD_PROG = ld.new
+
+all: $(LD_PROG)
+.PHONY: all
+
+LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
+
+# The .cc suffix was used by `make check-cdtest'.
+
+.SUFFIXES: .y $(SUFFIXES) .cc
+
+# Suppress smart makes who think they know how to automake Yacc files
+.y.c:
+
+# This rule was used for the check-cdtest target.
+#.cc.o:
+# $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $<
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) $(HDEFINES) $(CFLAGS)
+ALL_CFLAGS = -D_GNU_SOURCE $(INCLUDES) @HDEFINES@ $(CFLAGS)
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $<
-BFDLIB = ../bfd/libbfd.la
+BFDDEP = ../bfd/libbfd.a
+BFDLIB = @BFDLIB@
LIBIBERTY = ../libiberty/libiberty.a
ALL_EMULATIONS = \
@@ -170,13 +200,11 @@ ALL_EMULATIONS = \
eaixppc.o \
eaixrs6.o \
ealpha.o \
- earcelf.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
earmpe.o \
ecoff_sparc.o \
- ed10velf.o \
edelta68.o \
eebmon29k.o \
eelf32_sparc.o \
@@ -188,6 +216,7 @@ ALL_EMULATIONS = \
eelf32lmip.o \
eelf32lppc.o \
eelf32ppc.o \
+ eelf64_sparc.o \
eelf_i386.o \
egld960.o \
egld960coff.o \
@@ -206,6 +235,7 @@ ALL_EMULATIONS = \
ei386aout.o \
ei386bsd.o \
ei386coff.o \
+ ei386freebsd.o \
ei386go32.o \
ei386linux.o \
ei386lynx.o \
@@ -251,8 +281,6 @@ ALL_EMULATIONS = \
est2000.o \
esun3.o \
esun4.o \
- etic30aout.o \
- etic30coff.o \
evanilla.o \
evax.o \
evsta.o \
@@ -261,7 +289,6 @@ ALL_EMULATIONS = \
ez8002.o
ALL_64_EMULATIONS = \
- eelf64_sparc.o \
eelf64alpha.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
@@ -279,449 +306,24 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
ldfile.o ldcref.o ${EMULATION_OFILES}
-STAGESTUFF = *.o ldscripts/* e*.c
-
-# These all start with e so 'make clean' can find them.
-
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
-GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
-
-ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
- ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
-ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
-ld_new_LDADD = $(EMULATION_OFILES) $(BFDLIB) $(LIBIBERTY)
-
-# This is the real libbfd.a created by libtool.
-TESTBFDLIB = @TESTBFDLIB@
-
-MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
- ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
-CLEANFILES = dep.sed .dep .dep1
-
-# Stuff that should be included in a distribution. The diststuff
-# target is run by the taz target in ../Makefile.in.
-LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
-
-DISTCLEANFILES = site.exp site.bak
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-noinst_PROGRAMS = ld-new$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-ld_new_OBJECTS = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o \
-ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o
-ld_new_LDFLAGS =
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LEXLIB = @LEXLIB@
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
-TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
-INFO_DEPS = ld.info
-DVIS = ld.dvi
-TEXINFOS = ld.texinfo
-MANS = ld.1
-
-NROFF = nroff
-DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \
-acconfig.h acinclude.m4 aclocal.m4 config.in configure configure.in \
-ldgram.c ldlex.c stamp-h.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP = --best
-SOURCES = $(ld_new_SOURCES)
-OBJECTS = $(ld_new_OBJECTS)
-
-default: all
-
-.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .y
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-config.h: stamp-h
- @:
-stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h
-$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in
-
-mostlyclean-hdr:
-
-clean-hdr:
-
-distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-noinstPROGRAMS:
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
+LINTSOURCES = $(CFILES) $(GENERATED_CFILES) e*.c
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
+STAGESTUFF = *.o ldscripts/* e*.c
-distclean-libtool:
+info: ld.info
+.PHONY: info
-maintainer-clean-libtool:
+ldgram.c: ldgram.y
+ $(BISON) $(BISONFLAGS) -d $(srcdir)/ldgram.y
+ mv -f y.tab.c ldgram.c
+ mv -f y.tab.h ldgram.h
-ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
- @rm -f ld-new$(EXEEXT)
- $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
-.y.c:
- $(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
- if test -f y.tab.h; then \
- if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
- else :; fi
+# Separate from ldgram.c so that a parallel make doesn't try to build
+# both ldgram.c and ldgram.h simultaneously.
ldgram.h: ldgram.c
-.l.c:
- $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
-
-ld.info: ld.texinfo
-ld.dvi: ld.texinfo
-
-
-DVIPS = dvips
-
-.texi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.texi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-.dvi.ps:
- $(DVIPS) $< -o $@
-
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(infodir)
- @for file in $(INFO_DEPS); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
- if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
- else : ; fi; \
- done; \
- done
- @$(POST_INSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- for file in $(INFO_DEPS); do \
- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
- done; \
- else : ; fi
-
-uninstall-info:
- $(PRE_UNINSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- ii=yes; \
- else ii=; fi; \
- for file in $(INFO_DEPS); do \
- test -z "$ii" \
- || install-info --info-dir=$(infodir) --remove $$file; \
- done
- $(NORMAL_UNINSTALL)
- for file in $(INFO_DEPS); do \
- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
- done
-
-dist-info: $(INFO_DEPS)
- for base in $(INFO_DEPS); do \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && eval echo $$base*`; do \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
- done; \
- done
-
-mostlyclean-aminfo:
- -rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps \
- ld.log ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr \
- ld.cv ld.cn
-
-clean-aminfo:
-
-distclean-aminfo:
-
-maintainer-clean-aminfo:
- for i in $(INFO_DEPS); do \
- rm -f $$i; \
- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- rm -f $$i-[0-9]*; \
- fi; \
- done
-clean-info: mostlyclean-aminfo
-install-man: $(MANS)
- $(NORMAL_INSTALL)
- $(mkinstalldirs) $(mandir)/man1
- @sect=1; \
- inst=`echo "ld" | sed '$(transform)'`.1; \
- if test -f $(srcdir)/ld.1; then file=$(srcdir)/ld.1; \
- else file=ld.1; fi; \
- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
-
-uninstall-man:
- $(NORMAL_UNINSTALL)
- -inst=`echo "ld" | sed '$(transform)'`.1; \
- rm -f $(mandir)/man1/$$inst
-
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) dvi \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) installcheck \
- && $(MAKE) dist
- -rm -rf $(distdir)
- @echo "========================"; \
- echo "$(distdir).tar.gz is ready for distribution"; \
- echo "========================"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
- done
- $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-
-DEJATOOL = $(PACKAGE)
-
-RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
-site.exp: Makefile
- @echo 'Making a new site.exp file...'
- -@rm -f site.bak
- @echo '## these variables are automatically generated by make ##' > $@-t
- @echo '# Do not edit here. If you wish to override these values' >> $@-t
- @echo '# edit the last section' >> $@-t
- @echo 'set tool $(DEJATOOL)' >> $@-t
- @echo 'set srcdir $(srcdir)' >> $@-t
- @echo 'set objdir' `pwd` >> $@-t
- @echo 'set host_alias $(host_alias)' >> $@-t
- @echo 'set host_triplet $(host_triplet)' >> $@-t
- @echo 'set target_alias $(target_alias)' >> $@-t
- @echo 'set target_triplet $(target_triplet)' >> $@-t
- @echo 'set build_alias $(build_alias)' >> $@-t
- @echo 'set build_triplet $(build_triplet)' >> $@-t
- @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- -@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t
- -@mv site.exp site.bak
- @mv $@-t site.exp
-info: $(INFO_DEPS)
-dvi: $(DVIS)
-check:
- $(MAKE) check-DEJAGNU
-installcheck:
-install-info: install-info-am
-install-exec: install-exec-local
- @$(NORMAL_INSTALL)
-
-install-data: install-man install-data-local
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall: uninstall-man
-
-all: Makefile $(PROGRAMS) $(MANS) config.h
-
-install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs:
- $(mkinstalldirs) $(mandir)/man1
-
-
-mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
- mostlyclean-compile mostlyclean-libtool \
- mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
- mostlyclean-local
-
-clean: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
- clean-aminfo clean-tags clean-generic mostlyclean
-
-distclean: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
- distclean-libtool distclean-aminfo distclean-tags \
- distclean-generic clean distclean-local
- -rm -f config.status
- -rm -f libtool
-
-maintainer-clean: maintainer-clean-hdr maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-aminfo maintainer-clean-tags \
- maintainer-clean-generic distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- -rm -f config.status
-
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-noinstPROGRAMS \
-distclean-noinstPROGRAMS clean-noinstPROGRAMS \
-maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-libtool \
-distclean-libtool clean-libtool maintainer-clean-libtool \
-install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
-clean-aminfo maintainer-clean-aminfo install-man uninstall-man tags \
-mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
-distdir check-DEJAGNU info dvi installcheck install-info install-exec \
-install-data install uninstall all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
-
-
ldmain.o: ldmain.c config.status
- $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
+ $(CC) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(ALL_CFLAGS) $<
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
@@ -737,6 +339,20 @@ ldemul-list.h: Makefile
done;\
echo " 0") >ldemul-tmp.h
mv ldemul-tmp.h ldemul-list.h
+
+ldlex.c: ldlex.l
+ $(LEX) $(srcdir)/ldlex.l
+ -sed -e '/^int.*free();/d' \
+ -e '/^char.*malloc();/d' \
+ -e 's/malloc/xmalloc/g' \
+ < lex.yy.c > ldlex.c.new
+ -rm lex.yy.c
+ mv ldlex.c.new ./ldlex.c
+
+# These all start with e so 'make clean' can find them.
+
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
+GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
@TDIRS@
ea29k.c: $(srcdir)/emulparams/a29k.sh \
@@ -751,9 +367,6 @@ eaixrs6.c: $(srcdir)/emulparams/aixrs6.sh \
ealpha.c: $(srcdir)/emulparams/alpha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
${GENSCRIPTS} alpha "$(tdir_alpha)"
-earcelf.c: $(srcdir)/emulparams/arcelf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} arcelf "$(tdir_arcelf)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -788,29 +401,23 @@ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
-eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
-eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
@@ -818,7 +425,7 @@ eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -874,6 +481,9 @@ ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386coff "$(tdir_i386coff)"
+ei386freebsd.c: $(srcdir)/emulparams/i386freebsd.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386freebsd "$(tdir_i386freebsd)"
ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386go32 "$(tdir_i386go32)"
@@ -1015,12 +625,6 @@ esun3.c: $(srcdir)/emulparams/sun3.sh \
esun4.c: $(srcdir)/emulparams/sun4.sh \
$(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sun4 "$(tdir_sun4)"
-etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30aout.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic30aout "$(tdir_tic30aout)"
-etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
evanilla.c: $(srcdir)/emulparams/vanilla.sh \
$(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
${GENSCRIPTS} vanilla "$(tdir_vanilla)"
@@ -1030,9 +634,6 @@ evax.c: $(srcdir)/emulparams/vax.sh \
evsta.c: $(srcdir)/emulparams/vsta.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} vsta "$(tdir_vsta)"
-ev850.c: $(srcdir)/emulparams/v850.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} v850 "$(tdir_v850)"
ew65.c: $(srcdir)/emulparams/w65.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
${GENSCRIPTS} w65 "$(tdir_w65)"
@@ -1043,52 +644,91 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
${GENSCRIPTS} z8002 "$(tdir_z8002)"
+$(LD_PROG): $(OFILES) $(BFDDEP) $(LIBIBERTY)
+ $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(EXTRALIBS)
+
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
ldctor.h ldexp.h ldlang.h ldgram.h
-check-DEJAGNU: site.exp
- srcroot=`cd $(srcdir) && pwd`; export srcroot; \
+# These targets are for the dejagnu testsuites. The file site.exp
+# contains global variables that all the testsuites will use.
+
+site.exp: ./config.status Makefile
+ @echo "Making a new config file..."
+ @rm -f ./tmp?
+ @touch site.exp
+ @mv site.exp site.bak
+ @echo "## variables are automatically generated by make ##" > ./tmp0
+ @echo "# Do not edit here. If you wish to override these" >> ./tmp0
+ @echo "# values, add them to the last section" >> ./tmp0
+ @echo "# HOST AND TARGET INFO" >> ./tmp0
+ @echo "set host_os @host_os@" >> ./tmp0
+ @echo "set host_alias @host_alias@" >> ./tmp0
+ @echo "set host_cpu @host_cpu@" >> ./tmp0
+ @echo "set host_vendor @host_vendor@" >> ./tmp0
+ @echo "set target_os @target_os@" >> ./tmp0
+ @echo "set target_alias @target_alias@" >> ./tmp0
+ @echo "set target_cpu @target_cpu@" >> ./tmp0
+ @echo "set target_vendor @target_vendor@" >> ./tmp0
+ @echo "set host_triplet @host@" >> ./tmp0
+ @echo "set target_triplet @target@" >> ./tmp0
+ @echo "# DIRECTORY INFO" >> ./tmp0
+ @echo "set objdir `pwd`" >> ./tmp0
+ @echo "" >> ./tmp0
+ @echo "# LD DEPENDENCIES" >> ./tmp0
+ @echo "set OFILES \"$(OFILES)\"" >> ./tmp0
+ @echo "set BFDLIB \"$(BFDLIB)\"" >> ./tmp0
+ @echo "set LIBIBERTY \"$(LIBIBERTY)\"" >> ./tmp0
+ @echo "set HOSTING_EMU \"$(HOSTING_EMU)\"" >> ./tmp0
+ @echo "set HOSTING_CRT0 \"$(HOSTING_CRT0)\"" >> ./tmp0
+ @echo "set HOSTING_LIBS \"$(HOSTING_LIBS)\"" >> ./tmp0
+ @echo "" >> ./tmp0
+ @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0
+ @cat ./tmp0 > site.exp
+ @cat site.bak | sed \
+ -e '1,/^## Variables generated by.*##/ d' >> site.exp
+ -@rm -f ./tmp?
+
+check: site.exp
r=`pwd`; export r; \
- EXPECT=$(EXPECT); export EXPECT; \
- if [ -f $(top_builddir)/../expect/expect ]; then \
- TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
- export TCL_LIBRARY; \
- fi; \
- runtest=$(RUNTEST); \
- if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
- $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
- CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
- OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY)" HOSTING_EMU="$(HOSTING_EMU)" \
- HOSTING_CRT0="$(HOSTING_CRT0)" HOSTING_LIBS="$(HOSTING_LIBS)" \
- $(RUNTESTFLAGS); \
- else echo "WARNING: could not find \`runtest'" 1>&2; :;\
- fi
+ srcroot=`cd ${srcdir}; pwd` ; export srcroot ; \
+ EXPECT=${EXPECT} ; export EXPECT ; \
+ $(RPATH_ENVVAR)=$$r/../bfd:$$r/../opcodes:$$$(RPATH_ENVVAR); \
+ export $(RPATH_ENVVAR); \
+ if [ -f $$r/../expect/expect ] ; then \
+ TCL_LIBRARY=$${srcroot}/../tcl/library ; \
+ export TCL_LIBRARY ; \
+ else true ; fi ; \
+ $(RUNTEST) --tool ld --srcdir $(srcdir)/testsuite $(RUNTESTFLAGS) \
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
+ CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)"
+
+installcheck:
+.PHONY: check installcheck
# Rules for testing by relinking ld itself.
# A similar test is in the testsuite. This target is for ease of use
# when porting ld.
-ld-partial.o: ld-new$(EXEEXT)
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
-ld1$(EXEEXT): ld-partial.o
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1$(EXEEXT) $(HOSTING_CRT0) ld-partial.o $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld-partial.o: ld.new
+ ./ld.new $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
+ld1: ld-partial.o
+ ./ld.new $(HOSTING_EMU) -o ld1 $(HOSTING_CRT0) ld-partial.o $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-ld1-full$(EXEEXT): ld-new
- ./ld-new$(EXEEXT) $(HOSTING_EMU) -o ld1-full$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld1-full: ld.new
+ ./ld.new $(HOSTING_EMU) -o ld1-full $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-ld2$(EXEEXT): ld1$(EXEEXT)
- ./ld1$(EXEEXT) $(HOSTING_EMU) -o ld2$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld2: ld1
+ ./ld1 $(HOSTING_EMU) -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-ld3$(EXEEXT): ld2$(EXEEXT)
- ./ld2$(EXEEXT) $(HOSTING_EMU) -o ld3$(EXEEXT) $(HOSTING_CRT0) $(OFILES) $(TESTBFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
+ld3: ld2
+ ./ld2 $(HOSTING_EMU) -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
-bootstrap: ld3$(EXEEXT)
- cmp ld2$(EXEEXT) ld3$(EXEEXT)
+bootstrap: ld3
+ cmp ld2 ld3
.PHONY: bootstrap
@@ -1128,49 +768,206 @@ bootstrap: ld3$(EXEEXT)
# because almost all configs use "gen" version of manual.
# Set DOCVER above to change.
configdoc.texi: ${DOCVER}-doc.texi
- ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
-
-ld.info: $(srcdir)/ld.texinfo configdoc.texi
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
-
-ld.dvi: $(srcdir)/ld.texinfo configdoc.texi
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc' $(TEXI2DVI) $(srcdir)/ld.texinfo
-
-# We want to reconfigure if configure.host or configure.tgt changes.
-Makefile: configure.host configure.tgt
-mostlyclean-local:
- -rm -rf tmpdir
-
-.PHONY: install-exec-local install-data-local
-
-install-exec-local: ld-new$(EXEEXT)
- $(mkinstalldirs) $(bindir) $(tooldir)/bin
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
- else :; fi; \
- done
- rm -f $(tooldir)/bin/ld$(EXEEXT)
- n=`echo ld | sed '$(transform)'`; \
- if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
- fi
-
-install-data-local:
- $(mkinstalldirs) $(scriptdir)
+ ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \
+ ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \
+ cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+
+# TeX output
+dvi: ld.dvi
+ld.dvi: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
+ TEXINPUTS=$(BFDDIR)/doc:$$TEXINPUTS MAKEINFO='$(MAKEINFO) -I$(BFDDIR)/doc -I$(srcdir)' \
+ $(TEXI2DVI) $(srcdir)/ld.texinfo
+
+ldint.dvi: $(srcdir)/ldint.texinfo
+ $(TEXI2DVI) $(srcdir)/ldint.texinfo
+
+# info file for online browsing
+ld.info: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
+ $(MAKEINFO) -I$(BFDDIR)/doc -I$(srcdir) -o ld.info $(srcdir)/ld.texinfo
+
+ldint.info: $(srcdir)/ldint.texinfo
+ $(MAKEINFO) -o ldint.info $(srcdir)/ldint.texinfo
+
+.PHONY: dvi
+
+#separate targets for "ms", "me", and "mm" forms of roff doc
+# Try to use a recent texi2roff. v2 was put on prep in jan91.
+# If you want an index, see texi2roff doc for postprocessing
+# and add -i to texi2roff invocations below.
+# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
+# correspondint -e lines when later texi2roff's are current)
+# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
+# + @c's deleted explicitly because texi2roff sees texinfo commands in them
+# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
+# + @alphaenumerate is ridiculously new, turned into @enumerate
+
+ld.ms: $(srcdir)/ld.texinfo
+ sed -e '/\\input texinfo/d' \
+ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
+ -e 's/{.*,,/{/' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
+ $(srcdir)/ld.texinfo | \
+ $(TEXI2ROFF) $(TEXI2OPT) -ms | \
+ sed -e 's/---/\\(em/g' \
+ >>ld.ms
+
+# index for roff output
+ld-index.ms: ld.ms
+ $(ROFF) -ms ld.ms 2>&1 1>/dev/null | \
+ sed -e '/: warning:/d' | \
+ texi2index >ld-index.ms
+
+# roff output (-mm)
+ld.mm: $(srcdir)/ld.texinfo
+ sed -e '/\\input texinfo/d' \
+ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
+ -e 's/{.*,,/{/' \
+ -e '/@noindent/d' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
+ $(srcdir)/ld.texinfo | \
+ $(TEXI2ROFF) $(TEXI2OPT) -mm | \
+ sed -e 's/---/\\(em/g' \
+ >ld.mm
+
+# index for roff output
+ld-index.mm: ld.mm
+ $(ROFF) -mm ld.mm 2>&1 1>/dev/null | \
+ sed -e '/: warning:/d' | \
+ texi2index >ld-index.mm
+
+# roff output (-me)
+ld.me: $(srcdir)/ld.texinfo
+ sed -e '/\\input texinfo/d' \
+ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
+ -e 's/{.*,,/{/' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
+ $(srcdir)/ld.texinfo | \
+ $(TEXI2ROFF) $(TEXI2OPT) -me | \
+ sed -e 's/---/\\(em/g' \
+ >>ld.me
+
+# index for roff output
+ld-index.me: ld.me
+ $(ROFF) -me ld.me 2>&1 1>/dev/null | \
+ sed -e '/: warning:/d' | \
+ texi2index >ld-index.me
+
+stage1: force
+ -mkdir stage1
+ -mv -f $(STAGESTUFF) $(LD_PROG) stage1
+ -(cd stage1 ; ln -s $(LD_PROG) ld)
+
+stage2: force
+ -mkdir stage2
+ -mv -f $(STAGESTUFF) $(LD_PROG) stage2
+ -(cd stage2 ; ln -s $(LD_PROG) ld)
+
+stage3: force
+ -mkdir stage3
+ -mv -f $(STAGESTUFF) $(LD_PROG) stage3
+ -(cd stage3 ; ln -s $(LD_PROG) ld)
+
+against = stage2
+
+comparison: force
+ for i in $(STAGESTUFF) $(LD_PROG) ; do cmp $$i $(against)/$$i ; done
+
+de-stage1: force
+ -(cd stage1 ; mv -f * ..)
+ -rm ld
+ -rmdir stage1
+
+de-stage2: force
+ -(cd stage2 ; mv -f * ..)
+ -rm ld
+ -rmdir stage2
+
+de-stage3: force
+ -(cd stage3 ; mv -f * ..)
+ -rm ld
+ -rmdir stage3
+
+.PHONY: stage1 stage2 stage3 comparison de-stage1 de-stage2 de-stage3
+
+# Stuff that should be included in a distribution:
+LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
+diststuff: $(LDDISTSTUFF) info
+
+mostlyclean:
+ -rm -f $(STAGESTUFF) ld.?? ld.??? ldlex.[qp]
+ -rm -f ld ld1 ld2 ld3 *.o y.output cdtest cdtest.out cdtest.tmp
+ -rm -f cdtest-ur cdtest-ur.out cdtest-ur.tmp crtbegin.o crtend.o
+ -rm -f ldemul-list.h
+ -rm -fr tmpdir
+clean: mostlyclean
+ -rm -f $(LD_PROG)
+distclean: clean
+ -rm -f Makefile config.status TAGS site.exp site.bak config.cache
+ -rm -f config.h stamp-h config.log
+ -rm -rf ldscripts
+maintainer-clean realclean: clean distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f $(GENERATED_CFILES) $(GENERATED_HFILES)
+ -rm -f $(LDDISTSTUFF) *.info* configdoc.texi
+
+.PHONY: diststuff mostlyclean clean distclean realclean
+
+lintlog:$(LINTSOURCES) Makefile
+ $(LINT) -abhxzn $(LINTFLAGS) $(LINTSOURCES) \
+| grep -v "pointer casts may be troublesome" \
+| grep -v "possible pointer alignment problem" \
+| grep -v "ignore" \
+| grep -v "conversion from long may lose accuracy" \
+| grep -v "warning: constant argument to NOT" \
+| grep -v "enumeration type clash, operator CAST" \
+| grep -v "warning: constant in conditional context"\
+| grep -v "archive\.c"
+
+
+TAGS:
+ etags -t $(srcdir)/*.[chly] *.[chly]
+
+
+install:
+ $(INSTALL_XFORM) ld.new $(bindir)/ld
+ $(INSTALL_XFORM1) $(srcdir)/ld.1 $(man1dir)/ld.1
for f in ldscripts/*; do \
$(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
done
-diststuff: $(LDDISTSTUFF) info
+ test -d $(tooldir) || mkdir $(tooldir)
+ test -d $(tooldir)/bin || mkdir $(tooldir)/bin
+ -n=`echo ld | sed '$(program_transform_name)'`; \
+ rm -f $(tooldir)/bin/ld; \
+ ln $(bindir)/$$n $(tooldir)/bin/ld >/dev/null 2>/dev/null \
+ || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld
+
+install-info: ld.info
+ if [ -r ld.info ]; then \
+ dir=. ; \
+ else \
+ dir=$(srcdir) ; \
+ fi ; \
+ for i in `cd $$dir ; echo ld.info*` ; do \
+ $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
+ done
-distclean-local:
- rm -rf ldscripts
+clean-info:
+ -rm -rf *.info*
+
+.PHONY: install install-info clean-info
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
@@ -1183,7 +980,7 @@ distclean-local:
.dep1: $(CFILES) $(GENERATED_CFILES)
rm -f .dep2
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
- $(DEP) -f .dep2 $(INCLUDES) $?
+ $(DEP) -f .dep2 $(ALL_CFLAGS) $?
$(srcdir)/../move-if-change .dep2 .dep1
dep.sed: dep-in.sed config.status
@@ -1201,12 +998,23 @@ dep-in: .dep
cat .dep >> tmp-Makefile.in
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-dep-am: .dep
- sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
- cat .dep >> tmp-Makefile.am
- $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
+.PHONY: dep dep-in
+
+# Dummy target to force execution of dependent targets.
+#
+force:
-.PHONY: dep dep-in dep-am
+.PHONY: force
+
+Makefile: Makefile.in config.status
+ CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+
+config.h: stamp-h ; @true
+stamp-h: config.in config.status
+ CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
+
+config.status: configure configure.host configure.tgt
+ $(SHELL) ./config.status --recheck
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -1268,7 +1076,3 @@ ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
ldmain.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
index 18c74c4..677dcdf 100644
--- a/contrib/binutils/ld/configure.tgt
+++ b/contrib/binutils/ld/configure.tgt
@@ -12,12 +12,10 @@ targ_extra_emuls=
case "${targ}" in
arm-*-pe) targ_emul=armpe ;;
-arc-*-elf*) targ_emul=arcelf ;;
d10v-*-*) targ_emul=d10velf ;;
sparc64-*-aout*) targ_emul=sparcaout ;;
sparc64-*-elf*) targ_emul=elf64_sparc ;;
sparc-sun-sunos4*) targ_emul=sun4 ;;
-sparclite*-*-elf) targ_emul=elf32_sparc ;;
sparclite*-*-coff) targ_emul=coff_sparc ;;
sparclite*-fujitsu-*) targ_emul=sparcaout ;;
sparc*-*-aout) targ_emul=sparcaout ;;
@@ -29,13 +27,7 @@ sparc*-*-linux*aout*) targ_emul=sparclinux
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
tdir_sun4=sparc-sun-sunos4
;;
-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc sparclinux sun4"
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
- tdir_sparclinux=${tdir_elf32_sparc}aout
- tdir_sun4=sparc-sun-sunos4
- ;;
-sparc*-*-linux-gnu*) targ_emul=elf32_sparc
+sparc*-*-linux*) targ_emul=elf32_sparc
targ_extra_emuls="sparclinux sun4"
tdir_sparclinux=${targ_alias}aout
tdir_sun4=sparc-sun-sunos4
@@ -60,7 +52,6 @@ m68*-apple-aux*) targ_emul=m68kaux ;;
i[3456]86-*-vsta) targ_emul=vsta ;;
i[3456]86-go32-rtems*) targ_emul=i386go32 ;;
i[3456]86-*-go32) targ_emul=i386go32 ;;
-i[3456]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
i[3456]86-*-aix*) targ_emul=i386coff ;;
i[3456]86-*-sco*) targ_emul=i386coff ;;
i[3456]86-*-isc*) targ_emul=i386coff ;;
@@ -76,7 +67,7 @@ i[3456]86-*-linux*aout*) targ_emul=i386linux
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
;;
i[3456]86-*-linuxoldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3456]86-*-linux-gnu*) targ_emul=elf_i386
+i[3456]86-*-linux*) targ_emul=elf_i386
targ_extra_emuls=i386linux
tdir_i386linux=${targ_alias}aout
;;
@@ -86,17 +77,16 @@ i[3456]86-*-netbsd*) targ_emul=i386nbsd ;;
i[3456]86-*-netware) targ_emul=i386nw ;;
i[3456]86-*-elf*) targ_emul=elf_i386 ;;
i[3456]86-*-freebsdelf*) targ_emul=elf_i386 ;;
-i[3456]86-*-freebsd*) targ_emul=i386bsd ;;
+i[3456]86-*-freebsd*) targ_emul=i386freebsd ;;
i[3456]86-*-sysv*) targ_emul=i386coff ;;
i[3456]86-*-ptx*) targ_emul=i386coff ;;
i[3456]86-*-mach*) targ_emul=i386mach ;;
-i[3456]86-*-gnu*) targ_emul=elf_i386 ;;
+i[3456]86-*-gnu*) targ_emul=elf_i386; targ_extra_emuls=i386mach ;;
i[3456]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
i[3456]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
-i[3456]86-*-winnt*) targ_emul=i386pe ;;
+i[3456]86-*-winnt) targ_emul=i386pe ;;
i[3456]86-*-pe) targ_emul=i386pe ;;
-i[3456]86-*-cygwin32*) targ_emul=i386pe ;;
-i[3456]86-*-mingw32*) targ_emul=i386pe ;;
+i[3456]86-*-cygwin32) targ_emul=i386pe ;;
m8*-*-*) targ_emul=m88kbcs ;;
a29k-*-udi) targ_emul=sa29200 ;;
a29k-*-ebmon) targ_emul=ebmon29k ;;
@@ -105,8 +95,6 @@ a29k-*-*) targ_emul=a29k ;;
arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
armeb-*-aout) targ_emul=armaoutb ;;
arm-*-coff) targ_emul=armcoff ;;
-thumb-*-coff) targ_emul=armcoff ;;
-thumb-*-pe) targ_emul=armpe ;;
h8300-*-hms) targ_emul=h8300; targ_extra_emuls="h8300h h8300s"
;;
h8500-*-hms) targ_emul=h8500
@@ -115,7 +103,7 @@ h8500-*-hms) targ_emul=h8500
sh-*-elf*) targ_emul=shelf
targ_extra_emuls="shlelf sh shl"
;;
-sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;;
+sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
m68k-sony-*) targ_emul=news ;;
m68k-hp-bsd*) targ_emul=hp300bsd ;;
m68*-motorola-sysv*) targ_emul=delta68 ;;
@@ -127,7 +115,7 @@ m68k-*-linux*aout*) targ_emul=m68klinux
targ_extra_emuls=m68kelf
tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
;;
-m68k-*-linux-gnu*) targ_emul=m68kelf
+m68k-*-linux*) targ_emul=m68kelf
targ_extra_emuls=m68klinux
tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
;;
@@ -142,7 +130,7 @@ hppa*-*-rtems*) targ_emul=hppaelf ;;
vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
mips*-dec-osf*) targ_emul=mipslit ;;
-mips*-sgi-irix[56]*) targ_emul=elf32bsmip ;;
+mips*-sgi-irix[56]*) targ_emul=elf32bmip ;;
mips*-sgi-irix*) targ_emul=mipsbig ;;
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
@@ -158,30 +146,29 @@ mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
-mips*el-*-linux-gnu*) targ_emul=elf32lsmip
- targ_extra_emuls="elf32bsmip mipslit mipsbig"
+mips*el-*-linux*) targ_emul=elf32lmip
+ targ_extra_emuls="elf32bmip mipslit mipsbig"
;;
-mips*-*-linux-gnu*) targ_emul=elf32bsmip
- targ_extra_emuls="elf32lsmip mipsbig mipslit"
+mips*-*-linux*) targ_emul=elf32bmip
+ targ_extra_emuls="elf32lmip mipsbig mipslit"
;;
mips*-*-lnews*) targ_emul=mipslnews ;;
mn10200-*-*) targ_emul=mn10200 ;;
mn10300-*-*) targ_emul=mn10300 ;;
-alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
+alpha-*-freebsd*) targ_emul=elf64alpha ;;
+alpha-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
;;
-alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
+alpha-*-linux*) targ_emul=elf64alpha targ_extra_emuls=alpha
tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
;;
-alpha*-*-osf*) targ_emul=alpha ;;
-alpha*-*-gnu*) targ_emul=elf64alpha ;;
-alpha*-*-netware*) targ_emul=alpha ;;
-alpha*-*-netbsd*) targ_emul=elf64alpha ;;
+alpha-*-osf*) targ_emul=alpha ;;
+alpha-*-gnu*) targ_emul=elf64alpha ;;
+alpha-*-netware*) targ_emul=alpha ;;
z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
-powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-linux-gnu* | powerpc-*-sysv* \
- | powerpc-*-netbsd*)
+powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-linux* | powerpc-*-sysv*)
targ_emul=elf32ppc ;;
powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* | powerpcle-*-sysv*) targ_emul=elf32lppc ;;
powerpc-*-rtems*) targ_emul=elf32ppc ;;
@@ -193,9 +180,6 @@ powerpcle-*-cygwin32) targ_emul=ppcpe ;;
powerpc-*-aix*) targ_emul=aixppc ;;
powerpc-*-beos*) targ_emul=aixppc ;;
rs6000-*-aix*) targ_emul=aixrs6 ;;
-tic30-*-*aout*) targ_emul=tic30aout ;;
-tic30-*-*coff*) targ_emul=tic30coff ;;
-v850-*-*) targ_emul=v850 ;;
w65-*-*) targ_emul=w65 ;;
*-*-aout) targ_emul=${target_cpu}-${target_vendor} ;;
*-*-coff) targ_emul=${target_cpu}-${target_vendor} ;;
diff --git a/contrib/binutils/ld/emulparams/i386freebsd.sh b/contrib/binutils/ld/emulparams/i386freebsd.sh
new file mode 100644
index 0000000..0d5e9ff
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/i386freebsd.sh
@@ -0,0 +1,6 @@
+SCRIPT_NAME=aout
+TEXT_START_ADDR=0x1020
+OUTPUT_FORMAT="a.out-i386-freebsd"
+TARGET_PAGE_SIZE=0x1000
+ARCH=i386
+EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
OpenPOWER on IntegriCloud