summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.inc3
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6/pr32219.patch71
2 files changed, 73 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index fbc90eaea1..469457c41a 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@
1require gcc-common.inc 1require gcc-common.inc
2 2
3PR = "r15" 3PR = "r16"
4 4
5# Third digit in PV should be incremented after a minor release 5# Third digit in PV should be incremented after a minor release
6# happens from this branch on gcc e.g. currently its 4.6.0 6# happens from this branch on gcc e.g. currently its 4.6.0
@@ -70,6 +70,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
70 file://fix-for-ice-50099.patch \ 70 file://fix-for-ice-50099.patch \
71 file://gcc-with-linker-hash-style.patch \ 71 file://gcc-with-linker-hash-style.patch \
72 file://pr46934.patch \ 72 file://pr46934.patch \
73 file://pr32219.patch \
73 " 74 "
74 75
75SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " 76SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch "
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/pr32219.patch b/meta/recipes-devtools/gcc/gcc-4.6/pr32219.patch
new file mode 100644
index 0000000000..e310080a30
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6/pr32219.patch
@@ -0,0 +1,71 @@
1Hi,
2
3As suggested by richi.
4regtested on i686-linux-gnu with all default languages and no regressions.
5Ok for trunk?
6
7gcc/ChangeLog
82010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9
10 PR target/32219
11 * varasm.c (default_binds_local_p_1): Weak data is not local.
12
13gcc/testsuite/ChangeLog
142010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
15
16 PR target/32219
17 * gcc.dg/visibility-21.c: New test.
18
19Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
20---
21 gcc/testsuite/gcc.dg/visibility-21.c | 14 ++++++++++++++
22 gcc/varasm.c | 8 ++++----
23 2 files changed, 18 insertions(+), 4 deletions(-)
24 create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
25
26Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/visibility-21.c
27===================================================================
28--- /dev/null 1970-01-01 00:00:00.000000000 +0000
29+++ gcc-4_6-branch/gcc/testsuite/gcc.dg/visibility-21.c 2011-10-18 17:11:33.224827436 -0700
30@@ -0,0 +1,14 @@
31+/* PR target/32219 */
32+/* { dg-do run } */
33+/* { dg-require-visibility "" } */
34+/* { dg-options "-fPIC" { target fpic } } */
35+
36+extern void f() __attribute__((weak,visibility("hidden")));
37+extern int puts( char const* );
38+int main()
39+{
40+ if (f)
41+ f();
42+ return 0;
43+}
44+
45Index: gcc-4_6-branch/gcc/varasm.c
46===================================================================
47--- gcc-4_6-branch.orig/gcc/varasm.c 2011-09-16 19:58:21.000000000 -0700
48+++ gcc-4_6-branch/gcc/varasm.c 2011-10-18 17:19:06.431074788 -0700
49@@ -6760,6 +6760,10 @@
50 /* Static variables are always local. */
51 else if (! TREE_PUBLIC (exp))
52 local_p = true;
53+ /* hidden weak can't be overridden by something non-local, all
54+ that is possible is that it is not defined at all. */
55+ else if (DECL_WEAK (exp))
56+ local_p = false;
57 /* A variable is local if the user has said explicitly that it will
58 be. */
59 else if ((DECL_VISIBILITY_SPECIFIED (exp)
60@@ -6773,11 +6777,6 @@
61 local. */
62 else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
63 local_p = true;
64- /* Default visibility weak data can be overridden by a strong symbol
65- in another module and so are not local. */
66- else if (DECL_WEAK (exp)
67- && !resolved_locally)
68- local_p = false;
69 /* If PIC, then assume that any global name can be overridden by
70 symbols resolved from other modules. */
71 else if (shlib)