Subject: Re: toolchain/34258: Cross building NetBSD 3.x with GCC 4.x fails
To: None <gnats-bugs@netbsd.org>
From: Nick Hudson <skrll@netbsd.org>
List: netbsd-bugs
Date: 09/22/2006 23:27:50
--Boundary-00=_nNGFFNea/xC13G2
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 22 August 2006 15:35, tron@colwyn.zhadum.org.uk wrote:
> >Synopsis:       Cross building NetBSD 3.x with GCC 4.x fails

Here's where I've got to... I've verified that I can build tools for all archs 
except vax, but I've not verified that working binaries are produced. A check 
against using netbsd-3 to build netbsd-3 is good enough for this.

The binutils ChangeLog entry is the diff I backported.

The non-binutils diffs have HEAD diffs which I've not made a note of.

At this point I'm going to punt

Nick

--Boundary-00=_nNGFFNea/xC13G2
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="src-3.diffs"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="src-3.diffs"

? gnu/dist/binutils/cscope.out
Index: gnu/dist/binutils/ChangeLog
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/Attic/ChangeLog,v
retrieving revision 1.3
diff -u -p -u -r1.3 ChangeLog
--- gnu/dist/binutils/ChangeLog	8 Dec 2004 13:38:07 -0000	1.3
+++ gnu/dist/binutils/ChangeLog	22 Sep 2006 22:06:10 -0000
@@ -1,3 +1,44 @@
+2005-02-17  Alan Modra  <amodra@bigpond.net.au>
+
+	* tc.h (struct relax_type, relax_typeS): Move from here..
+	* as.h: ..to here.  Make rlx_forward and rlx_backward an offsetT.
+	* ecoff.c (ecoff_new_file): Add appfile param.
+	* ecoff.h (ecoff_new_file): Likewise.
+	* itbl-lex.h: New file.
+	* itbl-lex.l: Include itbl-lex.h.
+	* itbl-parse.y: Likewise.
+	(insntbl_line, yyparse, yylex): Move to itbl-lex.h.
+	* read.c (s_app_file_string): Mark appfile possibly unused.
+	* subsegs.c (seg_not_empty_p): Make sec possibly unused.
+	* subsegs.h (struct seg_info_trash): Delete.
+	(seg_info): Use segment_info_type instead.
+	* config/obj-coff.c (struct filename_list): Make filename const char *.
+	* config/obj-ecoff.h (obj_app_file): Pass app to ecoff_new_file.
+	* config/obj-elf.c (elf_file_symbol): Similarly.
+	* config/tc-a29k.c (md_apply_fix3): Make val a valueT.  Don't use
+	signed right shift.
+	* config/tc-arc.c (md_operand): Warning fix.
+	* config/tc-arm.c (arm_parse_reloc): Only define when OBJ_ELF.
+	(md_begin): Rearrange #if defined OBJ_COFF || defined OBJ_ELF.
+	* config/tc-cris.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Use do while.
+	* config/tc-frv.c (frv_force_relocation): Warning fix.
+	* config/tc-m68k.c (md_parse_option): Delete unused var.
+	* config/tc-mcore.c (mylog2): Rename from log2 throughout.
+	* config/tc-sparc.c: Likewise.
+	(s_common): Warning fix.
+	* config/tc-mips.c (append_insn): Use unsigned long long expressions.
+	* config/tc-mmix.c (PUSHJSTUB_MAX, PUSHJSTUB_MIN): Define from
+	addressT.
+	* config/tc-s390.c (s390_insn): Delete test of unsigned >= 0.
+	* config/tc-sh.c (sh_cfi_frame_initial_instructions,
+	sh_regname_to_dw2regnum): Only define for OBJ_ELF.
+	* config/tc-tic4x.c (tic4x_insert_reg): Use ISLOWER.
+	(tic4x_do_align): Use TIC_NOP_OPCODE.
+	* config/tc-tic4x.h (TIC_NOP_OPCODE): Rename from NOP_OPCODE.
+	* config/tc-vax.c: Include netinet/in.h.
+	(tc_headers_hook): Formatting.
+	* config/tc-xstormy16.c (md_pcrel_from_section): Correct parens.
+
 2004-05-06  Daniel Jacobowitz  <dan@debian.org>
 
 	* src-release (do-tar): Add directories to the tar file.
Index: gnu/dist/binutils/bfd/coff-alpha.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/bfd/coff-alpha.c,v
retrieving revision 1.3
diff -u -p -u -r1.3 coff-alpha.c
--- gnu/dist/binutils/bfd/coff-alpha.c	8 Dec 2004 13:38:08 -0000	1.3
+++ gnu/dist/binutils/bfd/coff-alpha.c	22 Sep 2006 22:06:14 -0000
@@ -1457,7 +1457,7 @@ alpha_relocate_section (output_bfd, info
 	  amt = sizeof (struct ecoff_section_tdata);
 	  lita_sec_data = ((struct ecoff_section_tdata *)
 			   bfd_zalloc (input_bfd, amt));
-	  ecoff_section_data (input_bfd, lita_sec) = lita_sec_data;
+	  lita_sec->used_by_bfd = lita_sec_data;
 	}
 
       if (lita_sec_data->gp != 0)
Index: gnu/dist/binutils/bfd/elf32-iq2000.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/bfd/elf32-iq2000.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 elf32-iq2000.c
--- gnu/dist/binutils/bfd/elf32-iq2000.c	8 Dec 2004 09:02:45 -0000	1.1.1.2
+++ gnu/dist/binutils/bfd/elf32-iq2000.c	22 Sep 2006 22:06:15 -0000
@@ -512,7 +512,7 @@ iq2000_elf_check_relocs (abfd, info, sec
   if (changed)
     /* Note that we've changed relocs, otherwise if !info->keep_memory
        we'll free the relocs and lose our changes.  */
-    (const Elf_Internal_Rela *) (elf_section_data (sec)->relocs) = relocs;
+    elf_section_data (sec)->relocs = (Elf_Internal_Rela *) relocs;
 
   return TRUE;
 }
Index: gnu/dist/binutils/bfd/pdp11.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/bfd/pdp11.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 pdp11.c
--- gnu/dist/binutils/bfd/pdp11.c	8 Dec 2004 09:07:08 -0000	1.1.1.2
+++ gnu/dist/binutils/bfd/pdp11.c	22 Sep 2006 22:06:23 -0000
@@ -341,11 +341,6 @@ DESCRIPTION
 
 #define RELOC_SIZE 2
 
-struct pdp11_aout_reloc_external
-{
-  bfd_byte e_reloc_entry[2];
-};
-
 #define RELFLG		0x0001	/* pc-relative flag */
 #define RTYPE		0x000e	/* type mask */
 #define RIDXMASK	0xfff0	/* index mask */
@@ -368,9 +363,9 @@ static void adjust_z_magic PARAMS ((bfd 
 static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *));
 
 static int pdp11_aout_write_headers PARAMS ((bfd *, struct internal_exec *));
-void pdp11_aout_swap_reloc_out PARAMS  ((bfd *, arelent *, struct pdp11_aout_reloc_external *));
+void pdp11_aout_swap_reloc_out PARAMS  ((bfd *, arelent *, bfd_byte *));
 void pdp11_aout_swap_reloc_in
-PARAMS ((bfd *, struct pdp11_aout_reloc_external *, arelent *,
+PARAMS ((bfd *, bfd_byte *, arelent *,
 	 bfd_size_type, asymbol **, bfd_size_type));
 
 /*
@@ -2034,7 +2029,7 @@ void
 pdp11_aout_swap_reloc_out (abfd, g, natptr)
      bfd *abfd;
      arelent *g;
-     register struct pdp11_aout_reloc_external *natptr;
+     bfd_byte *natptr;
 {
   int r_index;
   int r_pcrel;
@@ -2096,7 +2091,7 @@ pdp11_aout_swap_reloc_out (abfd, g, natp
 
   reloc_entry = r_index << 4 | r_type | r_pcrel;
 
-  PUT_WORD (abfd, reloc_entry, natptr->e_reloc_entry);
+  PUT_WORD (abfd, reloc_entry, natptr);
 }
 
 /* BFD deals internally with all things based from the section they're
@@ -2149,7 +2144,7 @@ void
 pdp11_aout_swap_reloc_in (abfd, bytes, cache_ptr, offset,
 			  symbols, symcount)
      bfd *abfd;
-     struct pdp11_aout_reloc_external *bytes;
+     bfd_byte *bytes;
      arelent *cache_ptr;
      bfd_size_type offset;
      asymbol **symbols;
@@ -2196,7 +2191,7 @@ NAME(aout,slurp_reloc_table) (abfd, asec
      sec_ptr asect;
      asymbol **symbols;
 {
-  struct pdp11_aout_reloc_external *rptr;
+  bfd_byte *rptr;
   bfd_size_type count;
   bfd_size_type reloc_size;
   PTR relocs;
@@ -2262,16 +2257,14 @@ NAME(aout,slurp_reloc_table) (abfd, asec
 
   cache_ptr = reloc_cache;
 
-  rptr = (struct pdp11_aout_reloc_external *) relocs;
+  rptr = relocs;
   for (counter = 0;
        counter < count;
-       counter++, ((char *)rptr) += RELOC_SIZE, cache_ptr++)
+       counter++, rptr += RELOC_SIZE, cache_ptr++)
     {
       while (GET_WORD (abfd, (PTR)rptr) == 0)
 	{
-	  rptr =
-	    (struct pdp11_aout_reloc_external *)
-	    ((char *) rptr + RELOC_SIZE);
+	  rptr += RELOC_SIZE;
 	  if ((char *) rptr >= (char *) relocs + reloc_size)
 	    goto done;
 	}
@@ -2324,10 +2317,9 @@ NAME(aout,squirt_out_relocs) (abfd, sect
     {
       while (count > 0)
 	{
-	  struct pdp11_aout_reloc_external *r;
+	  bfd_byte *r;
 
-	  r = (struct pdp11_aout_reloc_external *)
-	    (native + (*generic)->address);
+	  r = native + (*generic)->address;
 	  pdp11_aout_swap_reloc_out (abfd, *generic, r);
 	  count--;
 	  generic++;
@@ -3356,7 +3348,7 @@ static bfd_boolean pdp11_aout_link_input
   PARAMS ((struct aout_final_link_info *finfo,
 	   bfd *input_bfd,
 	   asection *input_section,
-	   struct pdp11_aout_reloc_external *relocs,
+	   bfd_byte *relocs,
 	   bfd_size_type rel_size,
 	   bfd_byte *contents));
 
@@ -4447,7 +4439,7 @@ aout_link_input_section (finfo, input_bf
 
   /* Relocate the section contents.  */
   if (! pdp11_aout_link_input_section (finfo, input_bfd, input_section,
-				       (struct pdp11_aout_reloc_external *) relocs,
+				       (bfd_byte *) relocs,
 				       rel_size, finfo->contents))
     return FALSE;
 
@@ -4511,7 +4503,7 @@ pdp11_aout_link_input_section (finfo, in
      struct aout_final_link_info *finfo;
      bfd *input_bfd;
      asection *input_section;
-     struct pdp11_aout_reloc_external *relocs;
+     bfd_byte *relocs;
      bfd_size_type rel_size;
      bfd_byte *contents;
 {
@@ -4526,8 +4518,8 @@ pdp11_aout_link_input_section (finfo, in
   struct aout_link_hash_entry **sym_hashes;
   int *symbol_map;
   bfd_size_type reloc_count;
-  register struct pdp11_aout_reloc_external *rel;
-  struct pdp11_aout_reloc_external *rel_end;
+  bfd_byte *rel;
+  bfd_byte *rel_end;
 
   output_bfd = finfo->output_bfd;
   check_dynamic_reloc = aout_backend_info (output_bfd)->check_dynamic_reloc;
@@ -4544,8 +4536,8 @@ pdp11_aout_link_input_section (finfo, in
 
   reloc_count = rel_size / RELOC_SIZE;
   rel = relocs;
-  rel_end = (struct pdp11_aout_reloc_external *)(((char *)rel) + rel_size);
-  for (; rel < rel_end; ((char *)rel) += RELOC_SIZE)
+  rel_end = rel + rel_size;
+  for (; rel < rel_end; rel += RELOC_SIZE)
     {
       bfd_vma r_addr;
       int r_index;
@@ -4653,10 +4645,10 @@ pdp11_aout_link_input_section (finfo, in
 		}
 
 	      /* Write out the new r_index value.  */
-	      reloc_entry = GET_WORD (input_bfd, rel->e_reloc_entry);
+	      reloc_entry = GET_WORD (input_bfd, rel);
 	      reloc_entry &= RIDXMASK;
 	      reloc_entry |= r_index << 4;
-	      PUT_WORD (input_bfd, reloc_entry, rel->e_reloc_entry);
+	      PUT_WORD (input_bfd, reloc_entry, rel);
 	    }
 	  else
 	    {
Index: gnu/dist/binutils/gas/as.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/as.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 as.h
--- gnu/dist/binutils/gas/as.h	8 Dec 2004 09:17:16 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/as.h	22 Sep 2006 22:06:35 -0000
@@ -1,6 +1,6 @@
 /* as.h - global header file
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003
+   1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -397,6 +397,22 @@ typedef unsigned int relax_substateT;
 /* Enough bits for address, but still an integer type.
    Could be a problem, cross-assembling for 64-bit machines.  */
 typedef addressT relax_addressT;
+
+struct relax_type
+{
+  /* Forward reach. Signed number. > 0.  */
+  offsetT rlx_forward;
+  /* Backward reach. Signed number. < 0.  */
+  offsetT rlx_backward;
+
+  /* Bytes length of this address.  */
+  unsigned char rlx_length;
+
+  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
+  relax_substateT rlx_more;
+};
+
+typedef struct relax_type relax_typeS;
 
 /* main program "as.c" (command arguments etc) */
 
Index: gnu/dist/binutils/gas/itbl-lex.l
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/itbl-lex.l,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 itbl-lex.l
--- gnu/dist/binutils/gas/itbl-lex.l	26 Nov 2003 11:34:18 -0000	1.1.1.1
+++ gnu/dist/binutils/gas/itbl-lex.l	22 Sep 2006 22:06:42 -0000
@@ -1,5 +1,5 @@
 /* itbl-lex.l
-   Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "itbl-lex.h"
 #include <itbl-parse.h>
 
 #ifdef DEBUG
Index: gnu/dist/binutils/gas/itbl-parse.y
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/itbl-parse.y,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 itbl-parse.y
--- gnu/dist/binutils/gas/itbl-parse.y	8 Dec 2004 09:18:22 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/itbl-parse.y	22 Sep 2006 22:06:43 -0000
@@ -1,5 +1,5 @@
 /* itbl-parse.y
-   Copyright 1997 Free Software Foundation, Inc.
+   Copyright 1997, 2002, 2003, 2005 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -247,6 +247,7 @@ FIXME! hex is ambiguous with any digit
 */
 
 #include <stdio.h>
+#include "itbl-lex.h"
 #include "itbl-ops.h"
 
 /* #define DEBUG */
@@ -273,9 +274,6 @@ FIXME! hex is ambiguous with any digit
 
 static int sbit, ebit;
 static struct itbl_entry *insn=0;
-extern int insntbl_line;
-int yyparse PARAMS ((void));
-int yylex PARAMS ((void));
 static int yyerror PARAMS ((const char *));
 
 %}
Index: gnu/dist/binutils/gas/subsegs.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/subsegs.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 subsegs.h
--- gnu/dist/binutils/gas/subsegs.h	8 Dec 2004 09:19:18 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/subsegs.h	22 Sep 2006 22:06:50 -0000
@@ -1,5 +1,5 @@
 /* subsegs.h -> subsegs.c
-   Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000
+   Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -139,14 +139,7 @@ extern segment_info_type segment_info[];
 extern frchainS *data0_frchainP;
 extern frchainS *bss0_frchainP;
 
-/* Dummy so stuff can compile.  Should never be used.  */
-struct seg_info_trash {
-  struct {
-    unsigned stab_string_size : 1;
-  } stabu;
-  unsigned hadone : 1;
-};
-#define seg_info(S)	(abort (), (struct seg_info_trash *) 0)
+#define seg_info(S)	(abort (), (segment_info_type *) 0)
 
 #endif
 
Index: gnu/dist/binutils/gas/tc.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/tc.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc.h
--- gnu/dist/binutils/gas/tc.h	8 Dec 2004 09:19:24 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/tc.h	22 Sep 2006 22:06:50 -0000
@@ -24,25 +24,6 @@
 
 extern const pseudo_typeS md_pseudo_table[];
 
-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
-   and write.c care about it anyway.  */
-
-struct relax_type
-{
-  /* Forward reach. Signed number. > 0.  */
-  long rlx_forward;
-  /* Backward reach. Signed number. < 0.  */
-  long rlx_backward;
-
-  /* Bytes length of this address.  */
-  unsigned char rlx_length;
-
-  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
-  relax_substateT rlx_more;
-};
-
-typedef struct relax_type relax_typeS;
-
 extern const int md_reloc_size;	/* Size of a relocation record */
 
 char *md_atof (int what_statement_type, char *literalP, int *sizeP);
Index: gnu/dist/binutils/gas/config/obj-coff.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/obj-coff.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 obj-coff.c
--- gnu/dist/binutils/gas/config/obj-coff.c	8 Dec 2004 09:20:08 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/obj-coff.c	22 Sep 2006 22:06:58 -0000
@@ -1,6 +1,6 @@
 /* coff object file format
    Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002
+   1999, 2000, 2001, 2002, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS.
@@ -1724,7 +1724,7 @@ int function_lineoff = -1;	/* Offset in 
    into the string table.  */
 struct filename_list
 {
-  char *filename;
+  const char *filename;
   struct filename_list *next;
 };
 
Index: gnu/dist/binutils/gas/config/obj-ecoff.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/obj-ecoff.h,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 obj-ecoff.h
--- gnu/dist/binutils/gas/config/obj-ecoff.h	26 Nov 2003 11:34:25 -0000	1.1.1.1
+++ gnu/dist/binutils/gas/config/obj-ecoff.h	22 Sep 2006 22:06:58 -0000
@@ -1,5 +1,5 @@
 /* ECOFF object file format header file.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002
+   Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002, 2004, 2005
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Ian Lance Taylor <ian@cygnus.com>.
Index: gnu/dist/binutils/gas/config/tc-arc.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-arc.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-arc.c
--- gnu/dist/binutils/gas/config/tc-arc.c	8 Dec 2004 09:21:22 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-arc.c	22 Sep 2006 22:07:04 -0000
@@ -1655,50 +1655,52 @@ md_operand (expressionP)
 {
   char *p = input_line_pointer;
 
-  if (*p == '%')
-    if (strncmp (p, "%st(", 4) == 0)
-      {
-	input_line_pointer += 4;
-	expression (expressionP);
-	if (*input_line_pointer != ')')
-	  {
-	    as_bad ("missing ')' in %%-op");
-	    return;
-	  }
-	++input_line_pointer;
-	arc_code_symbol (expressionP);
-      }
-    else
-      {
-	/* It could be a register.  */
-	int i, l;
-	struct arc_ext_operand_value *ext_oper = arc_ext_operands;
-	p++;
-
-	while (ext_oper)
-	  {
-	    l = strlen (ext_oper->operand.name);
-	    if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
-	      {
-		input_line_pointer += l + 1;
-		expressionP->X_op = O_register;
-		expressionP->X_add_number = (int) &ext_oper->operand;
-		return;
-	      }
-	    ext_oper = ext_oper->next;
-	  }
-	for (i = 0; i < arc_reg_names_count; i++)
-	  {
-	    l = strlen (arc_reg_names[i].name);
-	    if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
-	      {
-		input_line_pointer += l + 1;
-		expressionP->X_op = O_register;
-		expressionP->X_add_number = (int) &arc_reg_names[i];
-		break;
-	      }
-	  }
-      }
+  if (*p != '%')
+    return;
+
+  if (strncmp (p, "%st(", 4) == 0)
+    {
+      input_line_pointer += 4;
+      expression (expressionP);
+      if (*input_line_pointer != ')')
+	{
+	  as_bad ("missing ')' in %%-op");
+	  return;
+	}
+      ++input_line_pointer;
+      arc_code_symbol (expressionP);
+    }
+  else
+    {
+      /* It could be a register.  */
+      int i, l;
+      struct arc_ext_operand_value *ext_oper = arc_ext_operands;
+      p++;
+
+      while (ext_oper)
+	{
+	  l = strlen (ext_oper->operand.name);
+	  if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
+	    {
+	      input_line_pointer += l + 1;
+	      expressionP->X_op = O_register;
+	      expressionP->X_add_number = (int) &ext_oper->operand;
+	      return;
+	    }
+	  ext_oper = ext_oper->next;
+	}
+      for (i = 0; i < arc_reg_names_count; i++)
+	{
+	  l = strlen (arc_reg_names[i].name);
+	  if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
+	    {
+	      input_line_pointer += l + 1;
+	      expressionP->X_op = O_register;
+	      expressionP->X_add_number = (int) &arc_reg_names[i];
+	      break;
+	    }
+	}
+    }
 }
 
 /* We have no need to default values of symbols.
Index: gnu/dist/binutils/gas/config/tc-arm.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-arm.c,v
retrieving revision 1.4
diff -u -p -u -r1.4 tc-arm.c
--- gnu/dist/binutils/gas/config/tc-arm.c	8 Dec 2004 13:38:09 -0000	1.4
+++ gnu/dist/binutils/gas/config/tc-arm.c	22 Sep 2006 22:07:35 -0000
@@ -14104,6 +14104,7 @@ armelf_frob_symbol (symp, puntp)
   elf_frob_symbol (symp, puntp);
 }
 
+#ifdef OBJ_ELF
 static bfd_reloc_code_real_type
 arm_parse_reloc ()
 {
@@ -14141,6 +14142,7 @@ arm_parse_reloc ()
 
   return reloc_map[i].reloc;
 }
+#endif
 
 static void
 s_arm_elf_cons (nbytes)
Index: gnu/dist/binutils/gas/config/tc-cris.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-cris.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-cris.h
--- gnu/dist/binutils/gas/config/tc-cris.h	8 Dec 2004 09:22:11 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-cris.h	22 Sep 2006 22:07:35 -0000
@@ -1,5 +1,6 @@
 /* tc-cris.h -- Header file for tc-cris.c, the CRIS GAS port.
-   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
 
    Contributed by Axis Communications AB, Lund, Sweden.
    Originally written for GAS 1.38.1 by Mikael Asker.
@@ -152,7 +153,7 @@ extern void tc_cris_check_adjusted_broke
  tc_cris_check_adjusted_broken_word ((offsetT) (new_offset), brokw)
 
 /* We don't want any implicit alignment, so we do nothing.  */
-#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR)
+#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) do { } while (0)
 
 /* CRIS instructions, with operands and prefixes included, are a multiple
    of two bytes long.  */
Index: gnu/dist/binutils/gas/config/tc-frv.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-frv.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-frv.c
--- gnu/dist/binutils/gas/config/tc-frv.c	8 Dec 2004 09:22:39 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-frv.c	22 Sep 2006 22:07:38 -0000
@@ -1,5 +1,5 @@
 /* tc-frv.c -- Assembler for the Fujitsu FRV.
-   Copyright 2002, 2003 Free Software Foundation.
+   Copyright 2002, 2003, 2004, 2005 Free Software Foundation.
 
    This file is part of GAS, the GNU Assembler.
 
Index: gnu/dist/binutils/gas/config/tc-mcore.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-mcore.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-mcore.c
--- gnu/dist/binutils/gas/config/tc-mcore.c	8 Dec 2004 09:24:25 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-mcore.c	22 Sep 2006 22:07:41 -0000
@@ -1,5 +1,6 @@
 /* tc-mcore.c -- Assemble code for M*Core
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002, 2003, 2005
+   Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -42,7 +43,7 @@ static void   mcore_cons PARAMS ((int));
 static void   mcore_float_cons PARAMS ((int));
 static void   mcore_stringer PARAMS ((int));
 static void   mcore_fill   PARAMS ((int));
-static int    log2 PARAMS ((unsigned int));
+static int    mylog2 PARAMS ((unsigned int));
 static char * parse_reg    PARAMS ((char *, unsigned *));
 static char * parse_creg   PARAMS ((char *, unsigned *));
 static char * parse_exp    PARAMS ((char *, expressionS *));
@@ -412,7 +413,7 @@ md_begin ()
 
 /* Get a log2(val).  */
 static int
-log2 (val)
+mylog2 (val)
     unsigned int val;
 {
     int log = -1;
@@ -1146,7 +1147,7 @@ md_assemble (str)
 	  op_end = parse_imm (op_end + 1, & reg, 1, 1 << 31);
 	  /* Further restrict the immediate to a power of two.  */
 	  if ((reg & (reg - 1)) == 0)
-	    reg = log2 (reg);
+	    reg = mylog2 (reg);
 	  else
 	    {
 	      reg = 0;
@@ -1203,7 +1204,7 @@ md_assemble (str)
 
 	  /* Further restrict the immediate to a power of two.  */
 	  if ((reg & (reg - 1)) == 0)
-	    reg = log2 (reg);
+	    reg = mylog2 (reg);
 	  else
 	    {
 	      reg = 0;
Index: gnu/dist/binutils/gas/config/tc-mips.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-mips.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 tc-mips.c
--- gnu/dist/binutils/gas/config/tc-mips.c	8 Dec 2004 13:38:10 -0000	1.5
+++ gnu/dist/binutils/gas/config/tc-mips.c	22 Sep 2006 22:08:02 -0000
@@ -1,6 +1,6 @@
 /* tc-mips.c -- assemble code for a MIPS chip.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004 Free Software Foundation, Inc.
+   2003, 2004, 2005 Free Software Foundation, Inc.
    Contributed by the OSF and Ralph Campbell.
    Written by Keith Knowles and Ralph Campbell, working independently.
    Modified for ECOFF and R4000 support by Ian Lance Taylor of Cygnus
@@ -2085,7 +2085,7 @@ append_insn (struct mips_cl_insn *ip, ex
     {
       if (address_expr->X_op == O_constant)
 	{
-	  valueT tmp;
+	  unsigned int tmp;
 
 	  switch (*reloc_type)
 	    {
@@ -2094,20 +2094,18 @@ append_insn (struct mips_cl_insn *ip, ex
 	      break;
 
 	    case BFD_RELOC_MIPS_HIGHEST:
-	      tmp = (address_expr->X_add_number
-		     + ((valueT) 0x8000 << 32) + 0x80008000) >> 16;
-	      tmp >>= 16;
-	      ip->insn_opcode |= (tmp >> 16) & 0xffff;
+	      tmp = (address_expr->X_add_number + 0x800080008000ull) >> 48;
+	      ip->insn_opcode |= tmp & 0xffff;
 	      break;
 
 	    case BFD_RELOC_MIPS_HIGHER:
-	      tmp = (address_expr->X_add_number + 0x80008000) >> 16;
-	      ip->insn_opcode |= (tmp >> 16) & 0xffff;
+	      tmp = (address_expr->X_add_number + 0x80008000ull) >> 32;
+	      ip->insn_opcode |= tmp & 0xffff;
 	      break;
 
 	    case BFD_RELOC_HI16_S:
-	      ip->insn_opcode |= ((address_expr->X_add_number + 0x8000)
-				  >> 16) & 0xffff;
+	      tmp = (address_expr->X_add_number + 0x8000) >> 16;
+	      ip->insn_opcode |= tmp & 0xffff;
 	      break;
 
 	    case BFD_RELOC_HI16:
Index: gnu/dist/binutils/gas/config/tc-mmix.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-mmix.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-mmix.c
--- gnu/dist/binutils/gas/config/tc-mmix.c	8 Dec 2004 09:24:59 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-mmix.c	22 Sep 2006 22:08:11 -0000
@@ -301,22 +301,9 @@ struct obstack mmix_sym_obstack;
 #define PUSHJ_4B GETA_3B
 
 /* We'll very rarely have sections longer than LONG_MAX, but we'll make a
-   feeble attempt at getting 64-bit C99 or gcc-specific values (assuming
-   long long is 64 bits on the host).  */
-#ifdef LLONG_MIN
-#define PUSHJSTUB_MIN LLONG_MIN
-#elsif defined (LONG_LONG_MIN)
-#define PUSHJSTUB_MIN LONG_LONG_MIN
-#else
-#define PUSHJSTUB_MIN LONG_MIN
-#endif
-#ifdef LLONG_MAX
-#define PUSHJSTUB_MAX LLONG_MAX
-#elsif defined (LONG_LONG_MAX)
-#define PUSHJSTUB_MAX LONG_LONG_MAX
-#else
-#define PUSHJSTUB_MAX LONG_MAX
-#endif
+   feeble attempt at getting 64-bit values.  */
+#define PUSHJSTUB_MAX ((offsetT) (((addressT) -1) >> 1))
+#define PUSHJSTUB_MIN (-PUSHJSTUB_MAX - 1)
 
 #define JMP_0F (65536 * 256 * 4 - 8)
 #define JMP_0B (-65536 * 256 * 4 - 4)
Index: gnu/dist/binutils/gas/config/tc-s390.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-s390.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-s390.c
--- gnu/dist/binutils/gas/config/tc-s390.c	8 Dec 2004 09:25:46 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-s390.c	22 Sep 2006 22:08:15 -0000
@@ -1,5 +1,6 @@
 /* tc-s390.c -- Assemble for the S390
-   Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of GAS, the GNU Assembler.
@@ -1602,13 +1603,10 @@ s390_insn (ignore)
   if (exp.X_op == O_constant)
     {
       if (   (   opformat->oplen == 6
-	      && exp.X_add_number >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 48))
 	  || (   opformat->oplen == 4
-	      && exp.X_add_number >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 32))
 	  || (   opformat->oplen == 2
-	      && exp.X_add_number >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 16)))
 	md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
       else
Index: gnu/dist/binutils/gas/config/tc-sh.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-sh.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-sh.c
--- gnu/dist/binutils/gas/config/tc-sh.c	8 Dec 2004 09:25:52 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-sh.c	22 Sep 2006 22:08:19 -0000
@@ -4314,7 +4314,6 @@ sh_parse_name (char const *name, express
 
   return 1;
 }
-#endif
 
 void
 sh_cfi_frame_initial_instructions (void)
@@ -4364,4 +4363,5 @@ sh_regname_to_dw2regnum (const char *reg
     }
   return regnum;
 }
+#endif /* OBJ_ELF */
 #endif /* BFD_ASSEMBLER */
Index: gnu/dist/binutils/gas/config/tc-sparc.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-sparc.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-sparc.c
--- gnu/dist/binutils/gas/config/tc-sparc.c	8 Dec 2004 09:26:12 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-sparc.c	22 Sep 2006 22:08:23 -0000
@@ -1,6 +1,6 @@
 /* tc-sparc.c -- Assemble for the SPARC
    Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004
+   1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    This file is part of GAS, the GNU Assembler.
 
@@ -133,7 +133,7 @@ int sparc_cie_data_alignment;
 /* Handle of the OPCODE hash table.  */
 static struct hash_control *op_hash;
 
-static int log2 PARAMS ((int));
+static int mylog2 PARAMS ((int));
 static void s_data1 PARAMS ((void));
 static void s_seg PARAMS ((int));
 static void s_proc PARAMS ((int));
@@ -3603,7 +3603,7 @@ md_pcrel_from (fixP)
    of two.  */
 
 static int
-log2 (value)
+mylog2 (value)
      int value;
 {
   int shift;
@@ -3705,7 +3705,7 @@ s_reserve (ignore)
 
       if (align != 0)
 	{
-	  temp = log2 (align);
+	  temp = mylog2 (align);
 	  if (temp < 0)
 	    {
 	      as_bad (_("alignment not a power of 2"));
@@ -3843,7 +3843,7 @@ s_common (ignore)
       if (temp > max_alignment)
 	{
 	  temp = max_alignment;
-	  as_warn (_("alignment too large; assuming %d"), temp);
+	  as_warn (_("alignment too large; assuming %ld"), (long) temp);
 	}
 #endif
 
@@ -3868,7 +3868,7 @@ s_common (ignore)
 	  if (temp == 0)
 	    align = 0;
 	  else
-	    align = log2 (temp);
+	    align = mylog2 (temp);
 
 	  if (align < 0)
 	    {
@@ -4191,7 +4191,7 @@ sparc_cons_align (nbytes)
   if (sparc_no_align_cons)
     return;
 
-  nalign = log2 (nbytes);
+  nalign = mylog2 (nbytes);
   if (nalign == 0)
     return;
 
Index: gnu/dist/binutils/gas/config/tc-tic4x.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-tic4x.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-tic4x.c
--- gnu/dist/binutils/gas/config/tc-tic4x.c	8 Dec 2004 09:26:28 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-tic4x.c	22 Sep 2006 22:08:28 -0000
@@ -1,5 +1,5 @@
 /* tc-tic4x.c -- Assemble for the Texas Instruments TMS320C[34]x.
-   Copyright (C) 1997,1998, 2002, 2003 Free Software Foundation.
+   Copyright (C) 1997,1998, 2002, 2003, 2005 Free Software Foundation.
 
    Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -708,7 +708,7 @@ tic4x_insert_reg (regname, regnum)
   symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
 				   &zero_address_frag));
   for (i = 0; regname[i]; i++)
-    buf[i] = islower (regname[i]) ? TOUPPER (regname[i]) : regname[i];
+    buf[i] = ISLOWER (regname[i]) ? TOUPPER (regname[i]) : regname[i];
   buf[i] = '\0';
 
   symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
@@ -3090,7 +3090,7 @@ tic4x_do_align (alignment, fill, len, ma
      int len ATTRIBUTE_UNUSED;
      int max ATTRIBUTE_UNUSED;
 {
-  unsigned long nop = NOP_OPCODE;
+  unsigned long nop = TIC_NOP_OPCODE;
 
   /* Because we are talking lwords, not bytes, adjust alignment to do words */
   alignment += 2;
Index: gnu/dist/binutils/gas/config/tc-tic4x.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-tic4x.h,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 tc-tic4x.h
--- gnu/dist/binutils/gas/config/tc-tic4x.h	26 Nov 2003 11:34:59 -0000	1.1.1.1
+++ gnu/dist/binutils/gas/config/tc-tic4x.h	22 Sep 2006 22:08:28 -0000
@@ -1,5 +1,5 @@
 /* tc-tic4x.h -- Assemble for the Texas TMS320C[34]X.
-   Copyright (C) 1997, 2002, 2003 Free Software Foundation.
+   Copyright (C) 1997, 2002, 2003, 2005 Free Software Foundation.
    
    Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -65,7 +65,7 @@
 #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep (frag)
 #define NEED_FX_R_TYPE
 
-#define NOP_OPCODE              0x0c800000
+#define TIC_NOP_OPCODE		0x0c800000
 
 #define reloc_type 		int
 
Index: gnu/dist/binutils/gas/config/tc-vax.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-vax.c,v
retrieving revision 1.3
diff -u -p -u -r1.3 tc-vax.c
--- gnu/dist/binutils/gas/config/tc-vax.c	8 Dec 2004 13:38:10 -0000	1.3
+++ gnu/dist/binutils/gas/config/tc-vax.c	22 Sep 2006 22:08:33 -0000
@@ -1,5 +1,6 @@
 /* tc-vax.c - vax-specific -
-   Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003
+   Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002,
+   2003, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -29,6 +30,10 @@
 #include "elf/vax.h"
 #endif
 
+#if defined (OBJ_AOUT) && !defined (BFD_ASSEMBLER) && defined (TE_NetBSD)
+#include <netinet/in.h>
+#endif
+
 /* These chars start a comment anywhere in a source file (except inside
    another comment */
 const char comment_chars[] = "#";
@@ -3454,7 +3459,7 @@ tc_headers_hook(headers)
 {
 #ifdef TE_NetBSD
   N_SET_INFO(headers->header, OMAGIC, M_VAX4K_NETBSD, 0);
-  headers->header.a_info = htonl(headers->header.a_info);
+  headers->header.a_info = htonl (headers->header.a_info);
 #endif
 }
 #endif /* !BFD_ASSEMBLER */
Index: gnu/dist/binutils/gas/config/tc-xstormy16.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/config/tc-xstormy16.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 tc-xstormy16.c
--- gnu/dist/binutils/gas/config/tc-xstormy16.c	8 Dec 2004 09:26:55 -0000	1.1.1.2
+++ gnu/dist/binutils/gas/config/tc-xstormy16.c	22 Sep 2006 22:08:34 -0000
@@ -1,5 +1,5 @@
 /* tc-xstormy16.c -- Assembler for the Sanyo XSTORMY16.
-   Copyright 2000, 2001, 2002, 2003 Free Software Foundation.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -328,10 +328,10 @@ md_pcrel_from_section (fixP, sec)
      fixS * fixP;
      segT   sec;
 {
-  if (fixP->fx_addsy != (symbolS *) NULL
-      && (! S_IS_DEFINED (fixP->fx_addsy)
-	  || S_GET_SEGMENT (fixP->fx_addsy) != sec)
-          || xstormy16_force_relocation (fixP))
+  if ((fixP->fx_addsy != (symbolS *) NULL
+       && (! S_IS_DEFINED (fixP->fx_addsy)
+	   || S_GET_SEGMENT (fixP->fx_addsy) != sec))
+      || xstormy16_force_relocation (fixP))
     /* The symbol is undefined,
        or it is defined but not in this section,
        or the relocation will be relative to this symbol not the section symbol.	 
Index: gnu/dist/binutils/opcodes/fr30-desc.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/opcodes/fr30-desc.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 fr30-desc.h
--- gnu/dist/binutils/opcodes/fr30-desc.h	8 Dec 2004 08:53:01 -0000	1.1.1.2
+++ gnu/dist/binutils/opcodes/fr30-desc.h	22 Sep 2006 22:08:57 -0000
@@ -144,8 +144,6 @@ typedef enum isa_attr {
 
 /* Ifield support.  */
 
-extern const struct cgen_ifld fr30_cgen_ifld_table[];
-
 /* Ifield attribute indices.  */
 
 /* Enum declaration for cgen_ifld attrs.  */
@@ -251,6 +249,8 @@ typedef enum cgen_insn_attr {
 /* cgen.h uses things we just defined.  */
 #include "opcode/cgen.h"
 
+extern const struct cgen_ifld fr30_cgen_ifld_table[];
+
 /* Attributes.  */
 extern const CGEN_ATTR_TABLE fr30_cgen_hardware_attr_table[];
 extern const CGEN_ATTR_TABLE fr30_cgen_ifield_attr_table[];
Index: gnu/dist/binutils/opcodes/frv-desc.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/opcodes/frv-desc.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 frv-desc.h
--- gnu/dist/binutils/opcodes/frv-desc.h	8 Dec 2004 08:53:19 -0000	1.1.1.2
+++ gnu/dist/binutils/opcodes/frv-desc.h	22 Sep 2006 22:08:59 -0000
@@ -591,8 +591,6 @@ typedef enum fr550_major_attr {
 
 /* Ifield support.  */
 
-extern const struct cgen_ifld frv_cgen_ifld_table[];
-
 /* Ifield attribute indices.  */
 
 /* Enum declaration for cgen_ifld attrs.  */
@@ -728,6 +726,8 @@ typedef enum cgen_insn_attr {
 /* cgen.h uses things we just defined.  */
 #include "opcode/cgen.h"
 
+extern const struct cgen_ifld frv_cgen_ifld_table[];
+
 /* Attributes.  */
 extern const CGEN_ATTR_TABLE frv_cgen_hardware_attr_table[];
 extern const CGEN_ATTR_TABLE frv_cgen_ifield_attr_table[];
Index: gnu/dist/binutils/opcodes/ip2k-desc.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/opcodes/ip2k-desc.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 ip2k-desc.h
--- gnu/dist/binutils/opcodes/ip2k-desc.h	8 Dec 2004 08:54:12 -0000	1.1.1.2
+++ gnu/dist/binutils/opcodes/ip2k-desc.h	22 Sep 2006 22:09:00 -0000
@@ -148,8 +148,6 @@ typedef enum isa_attr {
 
 /* Ifield support.  */
 
-extern const struct cgen_ifld ip2k_cgen_ifld_table[];
-
 /* Ifield attribute indices.  */
 
 /* Enum declaration for cgen_ifld attrs.  */
@@ -236,6 +234,8 @@ typedef enum cgen_insn_attr {
 /* cgen.h uses things we just defined.  */
 #include "opcode/cgen.h"
 
+extern const struct cgen_ifld ip2k_cgen_ifld_table[];
+
 /* Attributes.  */
 extern const CGEN_ATTR_TABLE ip2k_cgen_hardware_attr_table[];
 extern const CGEN_ATTR_TABLE ip2k_cgen_ifield_attr_table[];
Index: gnu/dist/binutils/opcodes/iq2000-asm.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/opcodes/iq2000-asm.c,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 iq2000-asm.c
--- gnu/dist/binutils/opcodes/iq2000-asm.c	8 Dec 2004 08:54:15 -0000	1.1.1.2
+++ gnu/dist/binutils/opcodes/iq2000-asm.c	22 Sep 2006 22:09:01 -0000
@@ -48,6 +48,8 @@ static const char * parse_insn_normal
 /* -- assembler routines inserted here.  */
 
 /* -- asm.c */
+#include "safe-ctype.h"
+
 static const char * parse_mimm PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
 static const char * parse_imm  PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
 static const char * parse_hi16 PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
Index: gnu/dist/gcc/gcc/cp/decl.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/gcc/gcc/cp/decl.c,v
retrieving revision 1.1.1.4
diff -u -p -u -r1.1.1.4 decl.c
--- gnu/dist/gcc/gcc/cp/decl.c	10 Feb 2004 12:09:50 -0000	1.1.1.4
+++ gnu/dist/gcc/gcc/cp/decl.c	22 Sep 2006 22:09:42 -0000
@@ -673,9 +673,9 @@ struct cp_binding_level GTY(())
 /* The binding level currently in effect.  */
 
 #define current_binding_level			\
-  (cfun && cp_function_chain->bindings		\
-   ? cp_function_chain->bindings		\
-   : scope_chain->bindings)
+  (*(cfun && cp_function_chain->bindings	\
+   ? &cp_function_chain->bindings		\
+   : &scope_chain->bindings))
 
 /* The binding level of the current class, if any.  */
 
Index: gnu/dist/gcc/include/obstack.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/gcc/include/obstack.h,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 obstack.h
--- gnu/dist/gcc/include/obstack.h	23 Jul 2003 02:42:35 -0000	1.1.1.1
+++ gnu/dist/gcc/include/obstack.h	22 Sep 2006 22:10:04 -0000
@@ -343,7 +343,7 @@ extern int obstack_exit_failure;
 
 #endif
 
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
+#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
 
 #define obstack_blank_fast(h,n) ((h)->next_free += (n))
 
@@ -411,7 +411,7 @@ __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + 1 > __o->chunk_limit)				\
      _obstack_newchunk (__o, 1);					\
-   *(__o->next_free)++ = (datum);					\
+   obstack_1grow_fast (__o, datum);					\
    (void) 0; })
 
 /* These assume that the obstack alignment is good enough for pointers or ints,
@@ -423,19 +423,28 @@ __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + sizeof (void *) > __o->chunk_limit)		\
      _obstack_newchunk (__o, sizeof (void *));				\
-   *((void **)__o->next_free)++ = ((void *)datum);			\
-   (void) 0; })
+   obstack_ptr_grow_fast (__o, datum); })
 
 # define obstack_int_grow(OBSTACK,datum)				\
 __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + sizeof (int) > __o->chunk_limit)		\
      _obstack_newchunk (__o, sizeof (int));				\
-   *((int *)__o->next_free)++ = ((int)datum);				\
+   obstack_int_grow_fast (__o, datum); })
+
+# define obstack_ptr_grow_fast(OBSTACK,aptr)				\
+__extension__								\
+({ struct obstack *__o1 = (OBSTACK);					\
+   *(const void **) __o1->next_free = (aptr);				\
+   __o1->next_free += sizeof (const void *);				\
    (void) 0; })
 
-# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_int_grow_fast(OBSTACK,aint)				\
+__extension__								\
+({ struct obstack *__o1 = (OBSTACK);					\
+   *(int *) __o1->next_free = (aint);					\
+   __o1->next_free += sizeof (int);					\
+   (void) 0; })
 
 # define obstack_blank(OBSTACK,length)					\
 __extension__								\
@@ -443,7 +452,7 @@ __extension__								\
    int __len = (length);						\
    if (__o->chunk_limit - __o->next_free < __len)			\
      _obstack_newchunk (__o, __len);					\
-   __o->next_free += __len;						\
+   obstack_blank_fast (__o, __len);					\
    (void) 0; })
 
 # define obstack_alloc(OBSTACK,length)					\
@@ -530,26 +539,29 @@ __extension__								\
 # define obstack_1grow(h,datum)						\
 ( (((h)->next_free + 1 > (h)->chunk_limit)				\
    ? (_obstack_newchunk ((h), 1), 0) : 0),				\
-  (*((h)->next_free)++ = (datum)))
+  obstack_1grow_fast (h, datum))
 
 # define obstack_ptr_grow(h,datum)					\
 ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit)		\
    ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0),		\
-  (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
+  obstack_ptr_grow_fast (h, datum))
 
 # define obstack_int_grow(h,datum)					\
 ( (((h)->next_free + sizeof (int) > (h)->chunk_limit)			\
    ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0),			\
-  (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
+  obstack_int_grow_fast (h, datum))
+
+# define obstack_ptr_grow_fast(h,aptr)					\
+  (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
 
-# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_int_grow_fast(h,aint)					\
+  (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
 
 # define obstack_blank(h,length)					\
 ( (h)->temp = (length),							\
   (((h)->chunk_limit - (h)->next_free < (h)->temp)			\
    ? (_obstack_newchunk ((h), (h)->temp), 0) : 0),			\
-  ((h)->next_free += (h)->temp))
+  obstack_blank_fast (h, (h)->temp))
 
 # define obstack_alloc(h,length)					\
  (obstack_blank ((h), (length)), obstack_finish ((h)))
Index: gnu/dist/gdb/include/obstack.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/gdb/include/obstack.h,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 obstack.h
--- gnu/dist/gdb/include/obstack.h	11 Aug 2003 20:29:22 -0000	1.1.1.1
+++ gnu/dist/gdb/include/obstack.h	22 Sep 2006 22:10:15 -0000
@@ -343,7 +343,7 @@ extern int obstack_exit_failure;
 
 #endif
 
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
+#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
 
 #define obstack_blank_fast(h,n) ((h)->next_free += (n))
 
@@ -411,7 +411,7 @@ __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + 1 > __o->chunk_limit)				\
      _obstack_newchunk (__o, 1);					\
-   *(__o->next_free)++ = (datum);					\
+   obstack_1grow_fast (__o, datum);					\
    (void) 0; })
 
 /* These assume that the obstack alignment is good enough for pointers or ints,
@@ -423,19 +423,28 @@ __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + sizeof (void *) > __o->chunk_limit)		\
      _obstack_newchunk (__o, sizeof (void *));				\
-   *((void **)__o->next_free)++ = ((void *)datum);			\
-   (void) 0; })
+   obstack_ptr_grow_fast (__o, datum); })
 
 # define obstack_int_grow(OBSTACK,datum)				\
 __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + sizeof (int) > __o->chunk_limit)		\
      _obstack_newchunk (__o, sizeof (int));				\
-   *((int *)__o->next_free)++ = ((int)datum);				\
+   obstack_int_grow_fast (__o, datum); })
+
+# define obstack_ptr_grow_fast(OBSTACK,aptr)				\
+__extension__								\
+({ struct obstack *__o1 = (OBSTACK);					\
+   *(const void **) __o1->next_free = (aptr);				\
+   __o1->next_free += sizeof (const void *);				\
    (void) 0; })
 
-# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_int_grow_fast(OBSTACK,aint)				\
+__extension__								\
+({ struct obstack *__o1 = (OBSTACK);					\
+   *(int *) __o1->next_free = (aint);					\
+   __o1->next_free += sizeof (int);					\
+   (void) 0; })
 
 # define obstack_blank(OBSTACK,length)					\
 __extension__								\
@@ -443,7 +452,7 @@ __extension__								\
    int __len = (length);						\
    if (__o->chunk_limit - __o->next_free < __len)			\
      _obstack_newchunk (__o, __len);					\
-   __o->next_free += __len;						\
+   obstack_blank_fast (__o, __len);					\
    (void) 0; })
 
 # define obstack_alloc(OBSTACK,length)					\
@@ -530,26 +539,29 @@ __extension__								\
 # define obstack_1grow(h,datum)						\
 ( (((h)->next_free + 1 > (h)->chunk_limit)				\
    ? (_obstack_newchunk ((h), 1), 0) : 0),				\
-  (*((h)->next_free)++ = (datum)))
+  obstack_1grow_fast (h, datum))
 
 # define obstack_ptr_grow(h,datum)					\
 ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit)		\
    ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0),		\
-  (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
+  obstack_ptr_grow_fast (h, datum))
 
 # define obstack_int_grow(h,datum)					\
 ( (((h)->next_free + sizeof (int) > (h)->chunk_limit)			\
    ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0),			\
-  (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
+  obstack_int_grow_fast (h, datum))
+
+# define obstack_ptr_grow_fast(h,aptr)					\
+  (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
 
-# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_int_grow_fast(h,aint)					\
+  (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
 
 # define obstack_blank(h,length)					\
 ( (h)->temp = (length),							\
   (((h)->chunk_limit - (h)->next_free < (h)->temp)			\
    ? (_obstack_newchunk ((h), (h)->temp), 0) : 0),			\
-  ((h)->next_free += (h)->temp))
+  obstack_blank_fast (h, (h)->temp))
 
 # define obstack_alloc(h,length)					\
  (obstack_blank ((h), (length)), obstack_finish ((h)))
Index: gnu/dist/groff/src/preproc/eqn/box.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/groff/src/preproc/eqn/box.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 box.h
--- gnu/dist/groff/src/preproc/eqn/box.h	30 Jul 2004 14:45:00 -0000	1.1.1.2
+++ gnu/dist/groff/src/preproc/eqn/box.h	22 Sep 2006 22:10:22 -0000
@@ -64,6 +64,11 @@ public:
   friend class list_box;
 };
 
+// declarations to avoid friend name injection problems
+box *make_script_box(box *, box *, box *);
+box *make_mark_box(box *);
+box *make_lineup_box(box *);
+
 class list_box : public box {
   int is_script;
   box_list list;
Index: gnu/dist/groff/src/roff/troff/div.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/groff/src/roff/troff/div.h,v
retrieving revision 1.1.1.3
diff -u -p -u -r1.1.1.3 div.h
--- gnu/dist/groff/src/roff/troff/div.h	30 Jul 2004 14:44:54 -0000	1.1.1.3
+++ gnu/dist/groff/src/roff/troff/div.h	22 Sep 2006 22:10:22 -0000
@@ -21,6 +21,8 @@ You should have received a copy of the G
 with groff; see the file COPYING.  If not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
+void end_diversions();
+
 class diversion {
   friend void do_divert(int append, int boxing);
   friend void end_diversions();
Index: gnu/dist/groff/src/roff/troff/env.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/groff/src/roff/troff/env.h,v
retrieving revision 1.1.1.3
diff -u -p -u -r1.1.1.3 env.h
--- gnu/dist/groff/src/roff/troff/env.h	30 Jul 2004 14:44:54 -0000	1.1.1.3
+++ gnu/dist/groff/src/roff/troff/env.h	22 Sep 2006 22:10:23 -0000
@@ -21,6 +21,8 @@ You should have received a copy of the G
 with groff; see the file COPYING.  If not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
+void title();
+
 struct size_range {
   int min;
   int max;
Index: gnu/dist/groff/src/roff/troff/input.cpp
===================================================================
RCS file: /cvsroot/src/gnu/dist/groff/src/roff/troff/input.cpp,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 input.cpp
--- gnu/dist/groff/src/roff/troff/input.cpp	30 Jul 2004 14:44:56 -0000	1.1.1.2
+++ gnu/dist/groff/src/roff/troff/input.cpp	22 Sep 2006 22:10:28 -0000
@@ -156,6 +156,9 @@ class input_iterator;
 input_iterator *make_temp_iterator(const char *);
 const char *input_char_description(int);
 
+void process_input_stack();
+void chop_macro();		// declare to avoid friend name injection
+
 
 void set_escape_char()
 {
Index: usr.bin/mkesdb/ldef.h
===================================================================
RCS file: /cvsroot/src/usr.bin/mkesdb/ldef.h,v
retrieving revision 1.1
diff -u -p -u -r1.1 ldef.h
--- usr.bin/mkesdb/ldef.h	26 Jun 2003 06:30:17 -0000	1.1
+++ usr.bin/mkesdb/ldef.h	22 Sep 2006 22:15:20 -0000
@@ -27,7 +27,6 @@
  */
 
 extern int	line_number;
-extern int	debug;
 extern FILE	*yyin;
 extern int	yyparse(void);
 extern int	yylex(void);
Index: usr.sbin/makefs/ffs/ffs_alloc.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/makefs/ffs/ffs_alloc.c,v
retrieving revision 1.14
diff -u -p -u -r1.14 ffs_alloc.c
--- usr.sbin/makefs/ffs/ffs_alloc.c	20 Jun 2004 22:20:18 -0000	1.14
+++ usr.sbin/makefs/ffs/ffs_alloc.c	22 Sep 2006 22:15:58 -0000
@@ -120,7 +120,7 @@ ffs_alloc(struct inode *ip, daddr_t lbn,
 		cg = dtog(fs, bpref);
 	bno = ffs_hashalloc(ip, cg, bpref, size, ffs_alloccg);
 	if (bno > 0) {
-		DIP(ip, blocks) += size / DEV_BSIZE;
+		DIP_ADD(ip, blocks, size / DEV_BSIZE);
 		*bnp = bno;
 		return (0);
 	}
Index: usr.sbin/makefs/ffs/ufs_inode.h
===================================================================
RCS file: /cvsroot/src/usr.sbin/makefs/ffs/ufs_inode.h,v
retrieving revision 1.3
diff -u -p -u -r1.3 ufs_inode.h
--- usr.sbin/makefs/ffs/ufs_inode.h	7 Aug 2003 11:25:34 -0000	1.3
+++ usr.sbin/makefs/ffs/ufs_inode.h	22 Sep 2006 22:16:01 -0000
@@ -94,3 +94,19 @@ struct inode {
 #define DIP(ip, field) \
         (((ip)->i_fs->fs_magic == FS_UFS1_MAGIC) ? \
         (ip)->i_ffs1_##field : (ip)->i_ffs2_##field)
+
+#define DIP_ASSIGN(ip, field, value)					\
+	do {								\
+		if ((ip)->i_fs->fs_magic == FS_UFS1_MAGIC)		\
+			(ip)->i_ffs1_##field = (value);			\
+		else							\
+			(ip)->i_ffs2_##field = (value);			\
+	} while(0)
+
+#define DIP_ADD(ip, field, value)					\
+	do {								\
+		if ((ip)->i_fs->fs_magic == FS_UFS1_MAGIC)		\
+			(ip)->i_ffs1_##field += (value);		\
+		else							\
+			(ip)->i_ffs2_##field += (value);		\
+	} while(0)

--Boundary-00=_nNGFFNea/xC13G2--