Re: build failure of -current for pc532

Eyal Lebedinsky <[email protected]> Mon, 01 Mar 2004 10:31:03 +1100
Newsgroups gmane.os.netbsd.ports.pc532
Organization Eyal at Home
Message-ID <[email protected]>
Eyal Lebedinsky wrote:
> Same failure crossing from Linux (gcc 2.95.4) and native (NetBSD-1.5.3 > egcs-1.1.2)
> when building 'tools':
[trimmed]
> gnu/dist/binutils/gas/config/tc-ns32k.c: In function `md_begin':
> gnu/dist/binutils/gas/config/tc-ns32k.c:1644: parse error before `const'
> gnu/dist/binutils/gas/config/tc-ns32k.c:1646: `endop' undeclared (first use in this function)
> gnu/dist/binutils/gas/config/tc-ns32k.c:1646: (Each undeclared identifier is reported only once
> gnu/dist/binutils/gas/config/tc-ns32k.c:1646: for each function it appears in.)
> 
> *** Failed target:  tc-ns32k.o

I do need this patch to complete the build, so here it is. If someone can please submit it...
It is against -current.

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>
tc-ns32k.c.diff (text/plain, 920 B)
--- src/gnu/dist/binutils/gas/config/tc-ns32k.c.orig	Mon Mar  1 10:19:31 2004
+++ src/gnu/dist/binutils/gas/config/tc-ns32k.c	Mon Mar  1 10:16:43 2004
@@ -1640,9 +1640,9 @@
   /* Build a hashtable of the instructions.  */
   const struct ns32k_opcode *ptr;
   const char *stat;
-  inst_hash_handle = hash_new ();
   const struct ns32k_opcode *endop;
 
+  inst_hash_handle = hash_new ();
   endop = ns32k_opcodes + sizeof (ns32k_opcodes) / sizeof (ns32k_opcodes[0]);
   for (ptr = ns32k_opcodes; ptr < endop; ptr++)
     {
--- src/gnu/dist/binutils/gas/ChangeLog.orig	Mon Mar  1 10:18:28 2004
+++ src/gnu/dist/binutils/gas/ChangeLog	Mon Mar  1 10:23:12 2004
@@ -1,3 +1,7 @@
+2004-03-01  Eyal Lebedinsky <[email protected]>
+
+	* config/tc-ns32k.c (md_begin): Move setting of inst_hash_handle into function body
+
 2003-06-03  Nick Clifton  <[email protected]>
 
 	* tc-v850.c (tc-gen_reloc): Translate BFD_RELOC_32 into