sys-libs/libunwind: fix build with -fuse-ld=gold, bug #659732
authorSergei Trofimovich <slyfox@gentoo.org>
Sun, 8 Jul 2018 09:59:49 +0000 (10:59 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sun, 8 Jul 2018 10:00:05 +0000 (11:00 +0100)
Backport upstream patch to drop protected atrribute.

Reported-by: jorgicio
Closes: https://bugs.gentoo.org/659732
Package-Manager: Portage-2.3.41, Repoman-2.3.9

sys-libs/libunwind/files/libunwind-1.2.1-no-PROTECTED.patch [new file with mode: 0644]
sys-libs/libunwind/libunwind-1.2.1-r1.ebuild

diff --git a/sys-libs/libunwind/files/libunwind-1.2.1-no-PROTECTED.patch b/sys-libs/libunwind/files/libunwind-1.2.1-no-PROTECTED.patch
new file mode 100644 (file)
index 0000000..6b12d97
--- /dev/null
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/659732
+https://github.com/libunwind/libunwind/issues/58
+
+From a1437a3d27924e17d00021df3cc659bd998e8580 Mon Sep 17 00:00:00 2001
+From: Dave Watson <davejwatson@fb.com>
+Date: Thu, 28 Dec 2017 08:26:42 -0800
+Subject: [PATCH] Remove PROTECTED visibility
+
+This only works on bfd ld, not lld or gold.
+--- a/include/compiler.h
++++ b/include/compiler.h
+@@ -43 +43 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+-#  define PROTECTED     __attribute__((visibility ("protected")))
++#  define PROTECTED
index a4690fc050ec60d27c1f1f17f8837a56976c410b..8ab6cd4d11206629b86d254b4dc50adf339fe476 100644 (file)
@@ -49,6 +49,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.2-ia64-missing.patch
        "${FILESDIR}"/${PN}-1.2.1-fix_version_macros.patch
        "${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch
+       "${FILESDIR}"/${PN}-1.2.1-no-PROTECTED.patch #659732
 )
 
 src_prepare() {