[OE-core] [PATCH poky (OE-core)] Fix: hidden weak symbols by removing buggy openembedded gcc 4.8 patch

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Wed Jan 27 15:00:05 UTC 2016


Patch 0024-PR-target-32219.patch, which has been proposed to be removed
from the gcc 4.9 patches, should also be removed from gcc 4.8 patches.

Should be applied to fido and dizzy stable branches.

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

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
CC: openembedded-core at lists.openembedded.org
CC: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
CC: Khem Raj <raj.khem at gmail.com>
CC: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-devtools/gcc/gcc-4.8.inc              |  1 -
 .../gcc/gcc-4.8/0024-PR-target-32219.patch         | 67 ----------------------
 2 files changed, 68 deletions(-)
 delete mode 100644 meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index 06e6982..0d0e57d 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -47,7 +47,6 @@ SRC_URI = "\
     file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
     file://0022-COLLECT_GCC_OPTIONS.patch \
     file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
-    file://0024-PR-target-32219.patch \
     file://0025-fortran-cross-compile-hack.patch \
     file://0026-libgcc-sjlj-check.patch \
     file://0027-cpp-honor-sysroot.patch \
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
deleted file mode 100644
index b47d841..0000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From e0d15f4f8bf28c351b9215ca37f1caa24df0e1fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem at gmail.com>
-Date: Fri, 29 Mar 2013 09:18:54 +0400
-Subject: [PATCH 24/35] PR target/32219
-
-* varasm.c (default_binds_local_p_1): Weak data is not local.
-
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
-Signed-off-by: Khem Raj <raj.khem at gmail.com>
-
-Upstream-Status: Backport
----
- gcc/testsuite/gcc.dg/visibility-21.c |   14 ++++++++++++++
- gcc/varasm.c                         |    9 ++++-----
- 2 files changed, 18 insertions(+), 5 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
-
-diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c
-new file mode 100644
-index 0000000..be7deda
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/visibility-21.c
-@@ -0,0 +1,14 @@
-+/* PR target/32219 */
-+/* { dg-do run } */
-+/* { dg-require-visibility "" } */
-+/* { dg-options "-fPIC" { target fpic } } */
-+
-+extern void f() __attribute__((weak,visibility("hidden")));
-+extern int puts( char const* );
-+int main()
-+{
-+	if (f)
-+		f();
-+	return 0;
-+}
-+
-diff --git a/gcc/varasm.c b/gcc/varasm.c
-index 6648103..fadba78 100644
---- a/gcc/varasm.c
-+++ b/gcc/varasm.c
-@@ -6675,6 +6675,10 @@ default_binds_local_p_1 (const_tree exp, int shlib)
-   /* Static variables are always local.  */
-   else if (! TREE_PUBLIC (exp))
-     local_p = true;
-+  /* hidden weak can't be overridden by something non-local, all
-+     that is possible is that it is not defined at all. */
-+  else if (DECL_WEAK (exp))
-+    local_p = false;
-   /* A variable is local if the user has said explicitly that it will
-      be.  */
-   else if ((DECL_VISIBILITY_SPECIFIED (exp)
-@@ -6688,11 +6692,6 @@ default_binds_local_p_1 (const_tree exp, int shlib)
-      local.  */
-   else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
-     local_p = true;
--  /* Default visibility weak data can be overridden by a strong symbol
--     in another module and so are not local.  */
--  else if (DECL_WEAK (exp)
--	   && !resolved_locally)
--    local_p = false;
-   /* If PIC, then assume that any global name can be overridden by
-      symbols resolved from other modules.  */
-   else if (shlib)
--- 
-1.7.10.4
-
-- 
2.1.4




More information about the Openembedded-core mailing list