Mon Feb 15 07:49:48 2010 UTC ()
Pullup ticket 3007 - requested by dholland
build fix

Revisions pulled up:
- pkgsrc/cross/h8300-hms-gcc/Makefile	1.24
- pkgsrc/cross/h8300-hms-gcc/distinfo	1.4

Files added:
pkgsrc/cross/h8300-hms-gcc/patches/patch-aa
pkgsrc/cross/h8300-hms-gcc/patches/patch-ab

   -------------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   dholland
   Date:           Sun Feb 14 06:28:07 UTC 2010

   Modified Files:
           pkgsrc/cross/h8300-hms-gcc: Makefile distinfo
   Added Files:
           pkgsrc/cross/h8300-hms-gcc/patches: patch-aa patch-ab

   Log Message:
   Patch out the illegal C found in old gcc versions. Fixes broken build.

   To generate a diff of this commit:
   cvs rdiff -u -r1.23 -r1.24 pkgsrc/cross/h8300-hms-gcc/Makefile
   cvs rdiff -u -r1.3 -r1.4 pkgsrc/cross/h8300-hms-gcc/distinfo
   cvs rdiff -u -r0 -r1.1 pkgsrc/cross/h8300-hms-gcc/patches/patch-aa \
       pkgsrc/cross/h8300-hms-gcc/patches/patch-ab


(spz)
diff -r1.23 -r1.23.8.1 pkgsrc/cross/h8300-hms-gcc/Makefile
diff -r1.3 -r1.3.34.1 pkgsrc/cross/h8300-hms-gcc/distinfo
diff -r0 -r1.2.2.2 pkgsrc/cross/h8300-hms-gcc/patches/patch-aa
diff -r0 -r1.2.2.2 pkgsrc/cross/h8300-hms-gcc/patches/patch-ab

cvs diff -r1.23 -r1.23.8.1 pkgsrc/cross/h8300-hms-gcc/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/cross/h8300-hms-gcc/Attic/Makefile 2009/02/17 13:02:20 1.23
+++ pkgsrc/cross/h8300-hms-gcc/Attic/Makefile 2010/02/15 07:49:48 1.23.8.1
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.23 2009/02/17 13:02:20 joerg Exp $ 1# $NetBSD: Makefile,v 1.23.8.1 2010/02/15 07:49:48 spz Exp $
2 2
3DISTNAME= gcc-core-3.1 3DISTNAME= gcc-core-3.1
4PKGNAME= cross-h8300-hms-gcc-3.1 4PKGNAME= cross-h8300-hms-gcc-3.1
5PKGREVISION= 3 5PKGREVISION= 4
6CATEGORIES= cross 6CATEGORIES= cross
7MASTER_SITES= ftp://ftp.gnu.org/gnu/gcc/gcc-3.1/ \ 7MASTER_SITES= ftp://ftp.gnu.org/gnu/gcc/gcc-3.1/ \
8 ftp://sources.redhat.com/pub/newlib/ 8 ftp://sources.redhat.com/pub/newlib/
9DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ 9DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
10 ${DISTNAME:S/-core-/-g++-/}${EXTRACT_SUFX} \ 10 ${DISTNAME:S/-core-/-g++-/}${EXTRACT_SUFX} \
11 newlib-1.10.0.tar.gz 11 newlib-1.10.0.tar.gz
12 12
13PATCH_SITES= ${MASTER_SITE_SOURCEFORGE:=h8300-hms/} 13PATCH_SITES= ${MASTER_SITE_SOURCEFORGE:=h8300-hms/}
14PATCHFILES= h8300-hms-gcc-3.1-1.patch 14PATCHFILES= h8300-hms-gcc-3.1-1.patch
15PATCH_DIST_ARGS= -d ${SRCDIR} -E -p1 15PATCH_DIST_ARGS= -d ${SRCDIR} -E -p1
16 16
17MAINTAINER= pkgsrc-users@NetBSD.org 17MAINTAINER= pkgsrc-users@NetBSD.org
18HOMEPAGE= #empty 18HOMEPAGE= #empty
@@ -22,26 +22,27 @@ DEPENDS+= cross-h8300-hms-binutils-[0-9] @@ -22,26 +22,27 @@ DEPENDS+= cross-h8300-hms-binutils-[0-9]
22 22
23H8300_PREFIX= ${LOCALBASE}/libexec/cross-h8300-hms 23H8300_PREFIX= ${LOCALBASE}/libexec/cross-h8300-hms
24 24
25WRKSRC= ${WRKDIR}/objdir 25WRKSRC= ${WRKDIR}/objdir
26USE_TOOLS+= gmake 26USE_TOOLS+= gmake
27HAS_CONFIGURE= yes 27HAS_CONFIGURE= yes
28CONFIGURE_ARGS+= --prefix=${H8300_PREFIX:Q} 28CONFIGURE_ARGS+= --prefix=${H8300_PREFIX:Q}
29CONFIGURE_ARGS+= --infodir=${H8300_PREFIX}/gcc 29CONFIGURE_ARGS+= --infodir=${H8300_PREFIX}/gcc
30CONFIGURE_ARGS+= --target=h8300-hms 30CONFIGURE_ARGS+= --target=h8300-hms
31CONFIGURE_ARGS+= --enable-languages=c,c++ 31CONFIGURE_ARGS+= --enable-languages=c,c++
32CONFIGURE_ARGS+= --with-newlib 32CONFIGURE_ARGS+= --with-newlib
33CONFIGURE_SCRIPT= ${SRCDIR}/configure 33CONFIGURE_SCRIPT= ${SRCDIR}/configure
34SRCDIR= ${WRKDIR}/gcc-3.1 34SRCDIR= ${WRKDIR}/gcc-3.1
 35MAKE_ENV+= SHELL=${CONFIG_SHELL}
35BUILD_TARGET= CFLAGS="-O2 -fomit-frame-pointer" all 36BUILD_TARGET= CFLAGS="-O2 -fomit-frame-pointer" all
36INFO_FILES= # PLIST 37INFO_FILES= # PLIST
37 38
38GCC_REQD+= 2.8.0 39GCC_REQD+= 2.8.0
39 40
40post-extract: 41post-extract:
41 ${LN} -s ${WRKDIR}/newlib-1.10.0/newlib ${SRCDIR}/newlib 42 ${LN} -s ${WRKDIR}/newlib-1.10.0/newlib ${SRCDIR}/newlib
42 ${MKDIR} ${WRKSRC} 43 ${MKDIR} ${WRKSRC}
43 44
44post-install: 45post-install:
45 for f in h8300-hms-cpp h8300-hms-gcc \ 46 for f in h8300-hms-cpp h8300-hms-gcc \
46 h8300-hms-c++ h8300-hms-g++ \ 47 h8300-hms-c++ h8300-hms-g++ \
47 h8300-hms-gccbug h8300-hms-gcov ; do \ 48 h8300-hms-gccbug h8300-hms-gcov ; do \

cvs diff -r1.3 -r1.3.34.1 pkgsrc/cross/h8300-hms-gcc/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/cross/h8300-hms-gcc/Attic/distinfo 2006/04/07 15:09:06 1.3
+++ pkgsrc/cross/h8300-hms-gcc/Attic/distinfo 2010/02/15 07:49:48 1.3.34.1
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1$NetBSD: distinfo,v 1.3 2006/04/07 15:09:06 hubertf Exp $ 1$NetBSD: distinfo,v 1.3.34.1 2010/02/15 07:49:48 spz Exp $
2 2
3SHA1 (gcc-core-3.1.tar.gz) = e93048803611b5c1e0dd745d81b43d6e34bca026 3SHA1 (gcc-core-3.1.tar.gz) = e93048803611b5c1e0dd745d81b43d6e34bca026
4RMD160 (gcc-core-3.1.tar.gz) = d6fe75142280778c952af0717acfa4a2cc500623 4RMD160 (gcc-core-3.1.tar.gz) = d6fe75142280778c952af0717acfa4a2cc500623
5Size (gcc-core-3.1.tar.gz) = 13381094 bytes 5Size (gcc-core-3.1.tar.gz) = 13381094 bytes
6SHA1 (gcc-g++-3.1.tar.gz) = 294cae404a8f66640c04668502778c3e321c9e82 6SHA1 (gcc-g++-3.1.tar.gz) = 294cae404a8f66640c04668502778c3e321c9e82
7RMD160 (gcc-g++-3.1.tar.gz) = b4b45f76797bfa41544866c24dcd39dc84074193 7RMD160 (gcc-g++-3.1.tar.gz) = b4b45f76797bfa41544866c24dcd39dc84074193
8Size (gcc-g++-3.1.tar.gz) = 2461395 bytes 8Size (gcc-g++-3.1.tar.gz) = 2461395 bytes
9SHA1 (newlib-1.10.0.tar.gz) = ca0747e49623cce37967243928d883247a389207 9SHA1 (newlib-1.10.0.tar.gz) = ca0747e49623cce37967243928d883247a389207
10RMD160 (newlib-1.10.0.tar.gz) = c5cd6ae5d8912848a6c3985fd74a78f4826c92a6 10RMD160 (newlib-1.10.0.tar.gz) = c5cd6ae5d8912848a6c3985fd74a78f4826c92a6
11Size (newlib-1.10.0.tar.gz) = 3647395 bytes 11Size (newlib-1.10.0.tar.gz) = 3647395 bytes
12SHA1 (h8300-hms-gcc-3.1-1.patch) = 6a5ad1f579ca71cfee114a02df26a58103cf4f04 12SHA1 (h8300-hms-gcc-3.1-1.patch) = 6a5ad1f579ca71cfee114a02df26a58103cf4f04
13RMD160 (h8300-hms-gcc-3.1-1.patch) = ab3114544c8a6bcd531e4b5b7a4fed8aaf8e9150 13RMD160 (h8300-hms-gcc-3.1-1.patch) = ab3114544c8a6bcd531e4b5b7a4fed8aaf8e9150
14Size (h8300-hms-gcc-3.1-1.patch) = 61226 bytes 14Size (h8300-hms-gcc-3.1-1.patch) = 61226 bytes
 15SHA1 (patch-aa) = 0c853a604a5538a84c35fcd8abcf03fb05c5d4a1
 16SHA1 (patch-ab) = f9e3c972ed2a31591d8fe3d411cffc0bcf53c28e

File Added: pkgsrc/cross/h8300-hms-gcc/patches/Attic/patch-aa
$NetBSD: patch-aa,v 1.2.2.2 2010/02/15 07:49:48 spz Exp $

--- ../gcc-3.1/include/obstack.h.orig	2001-03-14 19:44:38.000000000 +0000
+++ ../gcc-3.1/include/obstack.h
@@ -423,7 +423,7 @@ __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 **)(__o->next_free+=sizeof(void *)))[-1] = ((void *)datum);	\
    (void) 0; })
 
 # define obstack_int_grow(OBSTACK,datum)				\

File Added: pkgsrc/cross/h8300-hms-gcc/patches/Attic/patch-ab
$NetBSD: patch-ab,v 1.2.2.2 2010/02/15 07:49:48 spz Exp $

--- ../gcc-3.1/gcc/cp/decl.c~	2002-05-03 18:55:23.000000000 +0000
+++ ../gcc-3.1/gcc/cp/decl.c
@@ -458,6 +458,11 @@ struct binding_level
    ? cp_function_chain->bindings		\
    : scope_chain->bindings)
 
+#define current_binding_level__LVALUE		\
+  (*(cfun && cp_function_chain->bindings	\
+   ? &cp_function_chain->bindings		\
+   : &scope_chain->bindings))
+
 /* The binding level of the current class, if any.  */
 
 #define class_binding_level scope_chain->class_bindings
@@ -507,7 +512,7 @@ push_binding_level (newlevel, tag_transp
      are active.  */
   memset ((char*) newlevel, 0, sizeof (struct binding_level));
   newlevel->level_chain = current_binding_level;
-  current_binding_level = newlevel;
+  current_binding_level__LVALUE = newlevel;
   newlevel->tag_transparent = tag_transparent;
   newlevel->more_cleanups_ok = 1;
 
@@ -563,7 +568,7 @@ pop_binding_level ()
 #endif /* defined(DEBUG_CP_BINDING_LEVELS) */
   {
     register struct binding_level *level = current_binding_level;
-    current_binding_level = current_binding_level->level_chain;
+    current_binding_level__LVALUE = current_binding_level->level_chain;
     level->level_chain = free_binding_level;
 #if 0 /* defined(DEBUG_CP_BINDING_LEVELS) */
     if (level->binding_depth != binding_depth)
@@ -578,7 +583,7 @@ static void
 suspend_binding_level ()
 {
   if (class_binding_level)
-    current_binding_level = class_binding_level;
+    current_binding_level__LVALUE = class_binding_level;
 
   if (global_binding_level)
     {
@@ -600,7 +605,7 @@ suspend_binding_level ()
     }
   is_class_level = 0;
 #endif /* defined(DEBUG_CP_BINDING_LEVELS) */
-  current_binding_level = current_binding_level->level_chain;
+  current_binding_level__LVALUE = current_binding_level->level_chain;
   find_class_binding_level ();
 }
 
@@ -613,7 +618,7 @@ resume_binding_level (b)
   my_friendly_assert(!class_binding_level, 386);
   /* Also, resuming a non-directly nested namespace is a no-no.  */
   my_friendly_assert(b->level_chain == current_binding_level, 386);
-  current_binding_level = b;
+  current_binding_level__LVALUE = b;
 #if defined(DEBUG_CP_BINDING_LEVELS)
   b->binding_depth = binding_depth;
   indent ();
@@ -4292,9 +4297,9 @@ pushdecl_with_scope (x, level)
   else
     {
       b = current_binding_level;
-      current_binding_level = level;
+      current_binding_level__LVALUE = level;
       x = pushdecl (x);
-      current_binding_level = b;
+      current_binding_level__LVALUE = b;
     }
   current_function_decl = function_decl;
   return x;
@@ -6515,7 +6520,7 @@ cxx_init_decl_processing ()
   current_lang_name = lang_name_c;
 
   current_function_decl = NULL_TREE;
-  current_binding_level = NULL_BINDING_LEVEL;
+  current_binding_level__LVALUE = NULL_BINDING_LEVEL;
   free_binding_level = NULL_BINDING_LEVEL;
 
   build_common_tree_nodes (flag_signed_char);
@@ -10080,10 +10085,10 @@ grokdeclarator (declarator, declspecs, d
   if (decl_context == NORMAL && !toplevel_bindings_p ())
     {
       struct binding_level *b = current_binding_level;
-      current_binding_level = b->level_chain;
+      current_binding_level__LVALUE = b->level_chain;
       if (current_binding_level != 0 && toplevel_bindings_p ())
 	decl_context = PARM;
-      current_binding_level = b;
+      current_binding_level__LVALUE = b;
     }
 
   if (name == NULL)
@@ -13720,7 +13725,7 @@ start_function (declspecs, declarator, a
      FIXME factor out the non-RTL stuff.  */
   bl = current_binding_level;
   init_function_start (decl1, input_filename, lineno);
-  current_binding_level = bl;
+  current_binding_level__LVALUE = bl;
 
   /* Even though we're inside a function body, we still don't want to
      call expand_expr to calculate the size of a variable-sized array.