pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/cross/h8300-hms-gcc Patch out the illegal C found in o...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/92ae52a4e27a
branches:  trunk
changeset: 571507:92ae52a4e27a
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Feb 14 06:28:07 2010 +0000

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

diffstat:

 cross/h8300-hms-gcc/Makefile         |    5 +-
 cross/h8300-hms-gcc/distinfo         |    4 +-
 cross/h8300-hms-gcc/patches/patch-aa |   13 ++++
 cross/h8300-hms-gcc/patches/patch-ab |  104 +++++++++++++++++++++++++++++++++++
 4 files changed, 123 insertions(+), 3 deletions(-)

diffs (162 lines):

diff -r 72e746c1e8c5 -r 92ae52a4e27a cross/h8300-hms-gcc/Makefile
--- a/cross/h8300-hms-gcc/Makefile      Sun Feb 14 02:28:31 2010 +0000
+++ b/cross/h8300-hms-gcc/Makefile      Sun Feb 14 06:28:07 2010 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2009/02/17 13:02:20 joerg Exp $
+# $NetBSD: Makefile,v 1.24 2010/02/14 06:28:07 dholland Exp $
 
 DISTNAME=              gcc-core-3.1
 PKGNAME=               cross-h8300-hms-gcc-3.1
-PKGREVISION=           3
+PKGREVISION=           4
 CATEGORIES=            cross
 MASTER_SITES=          ftp://ftp.gnu.org/gnu/gcc/gcc-3.1/ \
                        ftp://sources.redhat.com/pub/newlib/
@@ -32,6 +32,7 @@
 CONFIGURE_ARGS+=       --with-newlib
 CONFIGURE_SCRIPT=      ${SRCDIR}/configure
 SRCDIR=                        ${WRKDIR}/gcc-3.1
+MAKE_ENV+=             SHELL=${CONFIG_SHELL}
 BUILD_TARGET=          CFLAGS="-O2 -fomit-frame-pointer" all
 INFO_FILES=            # PLIST
 
diff -r 72e746c1e8c5 -r 92ae52a4e27a cross/h8300-hms-gcc/distinfo
--- a/cross/h8300-hms-gcc/distinfo      Sun Feb 14 02:28:31 2010 +0000
+++ b/cross/h8300-hms-gcc/distinfo      Sun Feb 14 06:28:07 2010 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2006/04/07 15:09:06 hubertf Exp $
+$NetBSD: distinfo,v 1.4 2010/02/14 06:28:07 dholland Exp $
 
 SHA1 (gcc-core-3.1.tar.gz) = e93048803611b5c1e0dd745d81b43d6e34bca026
 RMD160 (gcc-core-3.1.tar.gz) = d6fe75142280778c952af0717acfa4a2cc500623
@@ -12,3 +12,5 @@
 SHA1 (h8300-hms-gcc-3.1-1.patch) = 6a5ad1f579ca71cfee114a02df26a58103cf4f04
 RMD160 (h8300-hms-gcc-3.1-1.patch) = ab3114544c8a6bcd531e4b5b7a4fed8aaf8e9150
 Size (h8300-hms-gcc-3.1-1.patch) = 61226 bytes
+SHA1 (patch-aa) = 0c853a604a5538a84c35fcd8abcf03fb05c5d4a1
+SHA1 (patch-ab) = f9e3c972ed2a31591d8fe3d411cffc0bcf53c28e
diff -r 72e746c1e8c5 -r 92ae52a4e27a cross/h8300-hms-gcc/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/cross/h8300-hms-gcc/patches/patch-aa      Sun Feb 14 06:28:07 2010 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1 2010/02/14 06:28:07 dholland 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)                              \
diff -r 72e746c1e8c5 -r 92ae52a4e27a cross/h8300-hms-gcc/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/cross/h8300-hms-gcc/patches/patch-ab      Sun Feb 14 06:28:07 2010 +0000
@@ -0,0 +1,104 @@
+$NetBSD: patch-ab,v 1.1 2010/02/14 06:28:07 dholland 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.



Home | Main Index | Thread Index | Old Index