summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-06-30 13:45:27 +0000
committerAnthony G. Basile <blueness@gentoo.org>2014-06-30 13:45:27 +0000
commit6776113313f6cbd38c017da3f7f3084151dff6ca (patch)
treef65a3089b04a0c2bf2e2f2ed866da3073a228692 /sys-libs
parentAdd live ebuild (bug #515856 by Ari Malinen). (diff)
downloadgentoo-2-6776113313f6cbd38c017da3f7f3084151dff6ca.tar.gz
gentoo-2-6776113313f6cbd38c017da3f7f3084151dff6ca.tar.bz2
gentoo-2-6776113313f6cbd38c017da3f7f3084151dff6ca.zip
Add fix for mips dynlink, upstream commit 2d8cc92a
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/musl/ChangeLog6
-rw-r--r--sys-libs/musl/files/musl-fix-mips-dynlink.patch34
-rw-r--r--sys-libs/musl/musl-1.1.3.ebuild6
3 files changed, 44 insertions, 2 deletions
diff --git a/sys-libs/musl/ChangeLog b/sys-libs/musl/ChangeLog
index 16e16cb289e3..acbd567e8d19 100644
--- a/sys-libs/musl/ChangeLog
+++ b/sys-libs/musl/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-libs/musl
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/musl/ChangeLog,v 1.25 2014/06/29 16:15:15 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/musl/ChangeLog,v 1.26 2014/06/30 13:45:27 blueness Exp $
+
+ 30 Jun 2014; Anthony G. Basile <blueness@gentoo.org>
+ +files/musl-fix-mips-dynlink.patch, musl-1.1.3.ebuild:
+ Add fix for mips dynlink, upstream commit 2d8cc92a
29 Jun 2014; Anthony G. Basile <blueness@gentoo.org> -musl-1.0.2.ebuild,
-musl-1.1.2.ebuild:
diff --git a/sys-libs/musl/files/musl-fix-mips-dynlink.patch b/sys-libs/musl/files/musl-fix-mips-dynlink.patch
new file mode 100644
index 000000000000..2ed72f30cc85
--- /dev/null
+++ b/sys-libs/musl/files/musl-fix-mips-dynlink.patch
@@ -0,0 +1,34 @@
+diff --git a/arch/mips/reloc.h b/arch/mips/reloc.h
+index 91fa097..4b81d32 100644
+--- a/arch/mips/reloc.h
++++ b/arch/mips/reloc.h
+@@ -86,3 +86,4 @@ static void do_arch_relocs(struct dso *this, struct dso *head)
+
+ #define NEED_ARCH_RELOCS 1
+ #define DYNAMIC_IS_RO 1
++#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
+diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
+index a08300d..55124ff 100644
+--- a/src/ldso/dynlink.c
++++ b/src/ldso/dynlink.c
+@@ -233,6 +233,10 @@ static Sym *gnu_lookup(const char *s, uint32_t h1, struct dso *dso)
+ #define OK_TYPES (1<<STT_NOTYPE | 1<<STT_OBJECT | 1<<STT_FUNC | 1<<STT_COMMON | 1<<STT_TLS)
+ #define OK_BINDS (1<<STB_GLOBAL | 1<<STB_WEAK | 1<<STB_GNU_UNIQUE)
+
++#ifndef ARCH_SYM_REJECT_UND
++#define ARCH_SYM_REJECT_UND(s) 0
++#endif
++
+ static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
+ {
+ uint32_t h = 0, gh = 0;
+@@ -249,7 +253,8 @@ static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
+ }
+ if (!sym) continue;
+ if (!sym->st_shndx)
+- if (need_def || (sym->st_info&0xf) == STT_TLS)
++ if (need_def || (sym->st_info&0xf) == STT_TLS
++ || ARCH_SYM_REJECT_UND(sym))
+ continue;
+ if (!sym->st_value)
+ if ((sym->st_info&0xf) != STT_TLS)
diff --git a/sys-libs/musl/musl-1.1.3.ebuild b/sys-libs/musl/musl-1.1.3.ebuild
index 9135227b6889..cdacca56aaba 100644
--- a/sys-libs/musl/musl-1.1.3.ebuild
+++ b/sys-libs/musl/musl-1.1.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/musl/musl-1.1.3.ebuild,v 1.1 2014/06/26 12:03:25 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/musl/musl-1.1.3.ebuild,v 1.2 2014/06/30 13:45:27 blueness Exp $
EAPI=5
@@ -52,6 +52,10 @@ pkg_setup() {
fi
}
+src_prepare() {
+ use mips && epatch "${FILESDIR}"/${PN}-fix-mips-dynlink.patch
+}
+
src_configure() {
tc-export CC