summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
diff options
context:
space:
mode:
authorElvis Dowson <elvis.dowson@gmail.com>2013-03-29 12:23:09 +0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 14:45:04 +0100
commitfd566d20b76c0c9febcd7a13cfd4b062d2d14424 (patch)
tree9f95a07483a7172587742ff69ba50b70a67df926 /meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
parentc3cc4bfc83e53acdb2e7ef6ac139598a5ebd8a7f (diff)
downloadpoky-fd566d20b76c0c9febcd7a13cfd4b062d2d14424.tar.gz
gcc-4.8: Refactor gcc-4.8.0 patch files.
(From OE-Core rev: 16ab55220c4b602a8406c7a4405c737caae5907b) Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch b/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
new file mode 100644
index 0000000000..b47d841a7f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
@@ -0,0 +1,67 @@
1From e0d15f4f8bf28c351b9215ca37f1caa24df0e1fd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:18:54 +0400
4Subject: [PATCH 24/35] PR target/32219
5
6* varasm.c (default_binds_local_p_1): Weak data is not local.
7
8Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Upstream-Status: Backport
12---
13 gcc/testsuite/gcc.dg/visibility-21.c | 14 ++++++++++++++
14 gcc/varasm.c | 9 ++++-----
15 2 files changed, 18 insertions(+), 5 deletions(-)
16 create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
17
18diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c
19new file mode 100644
20index 0000000..be7deda
21--- /dev/null
22+++ b/gcc/testsuite/gcc.dg/visibility-21.c
23@@ -0,0 +1,14 @@
24+/* PR target/32219 */
25+/* { dg-do run } */
26+/* { dg-require-visibility "" } */
27+/* { dg-options "-fPIC" { target fpic } } */
28+
29+extern void f() __attribute__((weak,visibility("hidden")));
30+extern int puts( char const* );
31+int main()
32+{
33+ if (f)
34+ f();
35+ return 0;
36+}
37+
38diff --git a/gcc/varasm.c b/gcc/varasm.c
39index 6648103..fadba78 100644
40--- a/gcc/varasm.c
41+++ b/gcc/varasm.c
42@@ -6675,6 +6675,10 @@ default_binds_local_p_1 (const_tree exp, int shlib)
43 /* Static variables are always local. */
44 else if (! TREE_PUBLIC (exp))
45 local_p = true;
46+ /* hidden weak can't be overridden by something non-local, all
47+ that is possible is that it is not defined at all. */
48+ else if (DECL_WEAK (exp))
49+ local_p = false;
50 /* A variable is local if the user has said explicitly that it will
51 be. */
52 else if ((DECL_VISIBILITY_SPECIFIED (exp)
53@@ -6688,11 +6692,6 @@ default_binds_local_p_1 (const_tree exp, int shlib)
54 local. */
55 else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
56 local_p = true;
57- /* Default visibility weak data can be overridden by a strong symbol
58- in another module and so are not local. */
59- else if (DECL_WEAK (exp)
60- && !resolved_locally)
61- local_p = false;
62 /* If PIC, then assume that any global name can be overridden by
63 symbols resolved from other modules. */
64 else if (shlib)
65--
661.7.10.4
67