summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2016-01-27 08:47:10 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-30 11:37:01 +0000
commit3ed566e1006a74c8a5581a7036c1b9c9285821f7 (patch)
treecdcd9d08d233d397b184f44924430827828ce36a /meta/recipes-devtools
parent51d9ba6ea2260f9df0d55635e2b5d2c824a66e17 (diff)
downloadpoky-3ed566e1006a74c8a5581a7036c1b9c9285821f7.tar.gz
gcc: fix hidden weak symbols by removing buggy gcc patch
We are noticing the presence of the following patch in various openembedded gcc versions: 0024-PR-target-32219.patch However, contrarily to its "Backport" status, that patch is not upstream in gcc, and it breaks handling of start/stop automatic weak hidden symbols we use in lttng-ust. We are only experiencing problems on the various openembedded compilers, but on no other distro (with same compiler versions), which led us to suspect a buggy distro-specific gcc patch. We've been testing with openembedded gcc-4.9.2-r0. Rebuilding the gcc compiler with this patch removed fixes the lttng-ust issue. Link: http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116306.html Link: http://lists.lttng.org/pipermail/lttng-dev/2014-May/023112.html Link: https://gcc.gnu.org/ml/gcc-help/2014-05/msg00042.html Link: http://cgit.openembedded.org/openembedded-core/commit/?id=3cb2b003db7371b3a47d02c08352a262e1e419b4 Link: https://sourceware.org/bugzilla/show_bug.cgi?id=15435 (From OE-Core rev: 3e98ba4d6c1d1e4919ce373ec031d41c2538f10b) Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0024-PR-target-32219.patch62
2 files changed, 0 insertions, 63 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc
index e9dfc504fd..736c95689a 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.9.inc
@@ -47,7 +47,6 @@ SRC_URI = "\
47 file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ 47 file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
48 file://0022-COLLECT_GCC_OPTIONS.patch \ 48 file://0022-COLLECT_GCC_OPTIONS.patch \
49 file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ 49 file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
50 file://0024-PR-target-32219.patch \
51 file://0025-fortran-cross-compile-hack.patch \ 50 file://0025-fortran-cross-compile-hack.patch \
52 file://0026-libgcc-sjlj-check.patch \ 51 file://0026-libgcc-sjlj-check.patch \
53 file://0027-cpp-honor-sysroot.patch \ 52 file://0027-cpp-honor-sysroot.patch \
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0024-PR-target-32219.patch b/meta/recipes-devtools/gcc/gcc-4.9/0024-PR-target-32219.patch
deleted file mode 100644
index 45acf7fd23..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.9/0024-PR-target-32219.patch
+++ /dev/null
@@ -1,62 +0,0 @@
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
18Index: gcc-4.9-20140316/gcc/varasm.c
19===================================================================
20--- gcc-4.9-20140316.orig/gcc/varasm.c
21+++ gcc-4.9-20140316/gcc/varasm.c
22@@ -6771,6 +6771,10 @@ default_binds_local_p_1 (const_tree exp,
23 /* Static variables are always local. */
24 else if (! TREE_PUBLIC (exp))
25 local_p = true;
26+ /* hidden weak can't be overridden by something non-local, all
27+ that is possible is that it is not defined at all. */
28+ else if (DECL_WEAK (exp))
29+ local_p = false;
30 /* A variable is local if the user has said explicitly that it will
31 be. */
32 else if ((DECL_VISIBILITY_SPECIFIED (exp)
33@@ -6784,11 +6788,6 @@ default_binds_local_p_1 (const_tree exp,
34 local. */
35 else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
36 local_p = true;
37- /* Default visibility weak data can be overridden by a strong symbol
38- in another module and so are not local. */
39- else if (DECL_WEAK (exp)
40- && !resolved_locally)
41- local_p = false;
42 /* If PIC, then assume that any global name can be overridden by
43 symbols resolved from other modules. */
44 else if (shlib)
45Index: gcc-4.9-20140316/gcc/testsuite/gcc.dg/visibility-22.c
46===================================================================
47--- /dev/null
48+++ gcc-4.9-20140316/gcc/testsuite/gcc.dg/visibility-22.c
49@@ -0,0 +1,13 @@
50+/* PR target/32219 */
51+/* { dg-do run } */
52+/* { dg-require-visibility "" } */
53+/* { dg-options "-fPIC" { target fpic } } */
54+
55+extern void f() __attribute__((weak,visibility("hidden")));
56+extern int puts( char const* );
57+int main()
58+{
59+ if (f)
60+ f();
61+ return 0;
62+}