diff options
Diffstat (limited to 'packages')
102 files changed, 14187 insertions, 1 deletions
diff --git a/packages/gcc/gcc-3.4.6/.mtn2git_empty b/packages/gcc/gcc-3.4.6/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/gcc/gcc-3.4.6/.mtn2git_empty diff --git a/packages/gcc/gcc-3.4.6/GCC3.4.0VisibilityPatch.diff b/packages/gcc/gcc-3.4.6/GCC3.4.0VisibilityPatch.diff new file mode 100644 index 0000000000..d51da7157d --- /dev/null +++ b/packages/gcc/gcc-3.4.6/GCC3.4.0VisibilityPatch.diff @@ -0,0 +1,1100 @@ + +diff -aur gcc-3.4.0orig/gcc/c-common.c gcc-3.4.0/gcc/c-common.c +--- gcc-3.4.0orig/gcc/c-common.c 2004-03-19 01:32:59.000000000 +0000 ++++ gcc-3.4.0/gcc/c-common.c 2004-05-10 21:05:33.000000000 +0100 +@@ -833,7 +833,7 @@ + handle_deprecated_attribute }, + { "vector_size", 1, 1, false, true, false, + handle_vector_size_attribute }, +- { "visibility", 1, 1, true, false, false, ++ { "visibility", 1, 1, false, false, false, + handle_visibility_attribute }, + { "tls_model", 1, 1, true, false, false, + handle_tls_model_attribute }, +@@ -4886,7 +4886,16 @@ + + *no_add_attrs = true; + +- if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl)) ++ if (TYPE_P (*node)) ++ { ++ if (TREE_CODE (*node) != RECORD_TYPE && TREE_CODE (*node) != UNION_TYPE) ++ { ++ warning ("`%s' attribute ignored on non-class types", ++ IDENTIFIER_POINTER (name)); ++ return NULL_TREE; ++ } ++ } ++ else if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl)) + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + return NULL_TREE; +@@ -4897,6 +4906,14 @@ + error ("visibility arg not a string"); + return NULL_TREE; + } ++ ++ /* If this is a type, set the visibility on the type decl. */ ++ if (TYPE_P (decl)) ++ { ++ decl = TYPE_NAME (decl); ++ if (! decl) ++ return NULL_TREE; ++ } + + if (strcmp (TREE_STRING_POINTER (id), "default") == 0) + DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT; +@@ -4908,6 +4925,14 @@ + DECL_VISIBILITY (decl) = VISIBILITY_PROTECTED; + else + error ("visibility arg must be one of \"default\", \"hidden\", \"protected\" or \"internal\""); ++ DECL_VISIBILITYSPECIFIED (decl) = 1; ++ ++ /* For decls only, go ahead and attach the attribute to the node as well. ++ This is needed so we can determine whether we have VISIBILITY_DEFAULT ++ because the visibility was not specified, or because it was explicitly ++ overridden from the class visibility. */ ++ if (DECL_P (*node)) ++ *no_add_attrs = false; + + return NULL_TREE; + } + +diff -aur gcc-3.4.0orig/gcc/c-decl.c gcc-3.4.0/gcc/c-decl.c +--- gcc-3.4.0orig/gcc/c-decl.c 2004-03-22 17:58:18.000000000 +0000 ++++ gcc-3.4.0/gcc/c-decl.c 2004-05-10 15:16:27.000000000 +0100 +@@ -1164,9 +1164,8 @@ + } + + /* warnings */ +- /* All decls must agree on a non-default visibility. */ +- if (DECL_VISIBILITY (newdecl) != VISIBILITY_DEFAULT +- && DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT ++ /* All decls must agree on a visibility. */ ++ if (DECL_VISIBILITYSPECIFIED (newdecl) && DECL_VISIBILITYSPECIFIED (olddecl) + && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl)) + { + warning ("%Jredeclaration of '%D' with different visibility " +@@ -1361,9 +1360,12 @@ + Currently, it can only be defined in the prototype. */ + COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl); + +- /* If either declaration has a nondefault visibility, use it. */ +- if (DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT) +- DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl); ++ /* Use visibility of whichever declaration had it specified */ ++ if (DECL_VISIBILITYSPECIFIED (olddecl)) ++ { ++ DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl); ++ DECL_VISIBILITYSPECIFIED (newdecl) = 1; ++ } + + if (TREE_CODE (newdecl) == FUNCTION_DECL) + { + +diff -aur gcc-3.4.0orig/gcc/common.opt gcc-3.4.0/gcc/common.opt +--- gcc-3.4.0orig/gcc/common.opt 2004-02-18 00:09:04.000000000 +0000 ++++ gcc-3.4.0/gcc/common.opt 2004-05-09 08:10:50.000000000 +0100 +@@ -718,6 +718,11 @@ + Common + Add extra commentary to assembler output + ++fvisibility= ++Common Joined RejectNegative ++-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility ++ ++ + fvpt + Common + Use expression value profiles in optimizations + +diff -aur gcc-3.4.0orig/gcc/c.opt gcc-3.4.0/gcc/c.opt +--- gcc-3.4.0orig/gcc/c.opt 2004-02-18 00:09:03.000000000 +0000 ++++ gcc-3.4.0/gcc/c.opt 2004-05-09 08:10:50.000000000 +0100 +@@ -656,6 +656,10 @@ + C++ ObjC++ + Use __cxa_atexit to register destructors + ++fvisibility-inlines-hidden ++C++ ++Marks all inlined methods as having hidden visibility ++ + fvtable-gc + C++ ObjC++ + Discard unused virtual functions +diff -aur gcc-3.4.0orig/gcc/c-opts.c gcc-3.4.0/gcc/c-opts.c +--- gcc-3.4.0orig/gcc/c-opts.c 2004-02-18 00:09:03.000000000 +0000 ++++ gcc-3.4.0/gcc/c-opts.c 2004-05-09 08:10:50.000000000 +0100 +@@ -912,6 +912,10 @@ + case OPT_fuse_cxa_atexit: + flag_use_cxa_atexit = value; + break; ++ ++ case OPT_fvisibility_inlines_hidden: ++ visibility_options.inlineshidden = value; ++ break; + + case OPT_fweak: + flag_weak = value; + +diff -aur gcc-3.4.0orig/gcc/cp/class.c gcc-3.4.0/gcc/cp/class.c +--- gcc-3.4.0orig/gcc/cp/class.c 2004-03-09 07:27:23.000000000 +0000 ++++ gcc-3.4.0/gcc/cp/class.c 2004-05-10 21:06:50.000000000 +0100 +@@ -524,6 +524,10 @@ + DECL_ALIGN (decl) = MAX (TYPE_ALIGN (double_type_node), + DECL_ALIGN (decl)); + ++ /* The vtable's visibility is the class visibility. There is no way ++ to override the visibility for just the vtable. */ ++ DECL_VISIBILITY (decl) = CLASSTYPE_VISIBILITY (class_type); ++ DECL_VISIBILITYSPECIFIED (decl) = CLASSTYPE_VISIBILITYSPECIFIED (class_type); + import_export_vtable (decl, class_type, 0); + + return decl; +@@ -2971,7 +2975,25 @@ + continue; + + if (TREE_CODE (x) == CONST_DECL || TREE_CODE (x) == VAR_DECL) +- continue; ++ { ++ /* Apply the class's visibility attribute to static members ++ which do not have a visibility attribute. */ ++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x))) ++ { ++ if (visibility_options.inlineshidden && DECL_INLINE (x)) ++ { ++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN; ++ DECL_VISIBILITYSPECIFIED (x) = 1; ++ } ++ else ++ { ++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type); ++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type); ++ } ++ } ++ ++ continue; ++ } + + /* Now it can only be a FIELD_DECL. */ + +@@ -3708,6 +3730,22 @@ + check_for_override (x, t); + if (DECL_PURE_VIRTUAL_P (x) && ! DECL_VINDEX (x)) + cp_error_at ("initializer specified for non-virtual method `%D'", x); ++ ++ /* Apply the class's visibility attribute to methods which do ++ not have a visibility attribute. */ ++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x))) ++ { ++ if (visibility_options.inlineshidden && DECL_INLINE (x)) ++ { ++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN; ++ DECL_VISIBILITYSPECIFIED (x) = 1; ++ } ++ else ++ { ++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type); ++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type); ++ } ++ } + + /* The name of the field is the original field name + Save this in auxiliary field for later overloading. */ +@@ -783 |
