summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2018-03-13 16:44:01 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-03-21 22:07:43 +0000
commita6ef75dadb937aec325a57e51d046d7c2e1eec57 (patch)
tree57a21698ec8cebc9b08be928cdadcf7b48ad74c0 /dev-libs
parentsci-mathematics/octave: version bump to 4.2.2. (diff)
downloadgentoo-a6ef75dadb937aec325a57e51d046d7c2e1eec57.tar.gz
gentoo-a6ef75dadb937aec325a57e51d046d7c2e1eec57.tar.bz2
gentoo-a6ef75dadb937aec325a57e51d046d7c2e1eec57.zip
dev-libs/libbsd: fix ELF machine type for 32 bit sparc
Bug: https://bugs.gentoo.org/634550 Package-Manager: Portage-2.3.24, Repoman-2.3.6 RepoMan-Options: --include-arches="sparc" Closes: https://github.com/gentoo/gentoo/pull/7446
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libbsd/files/libbsd-0.8.6-sparc.patch32
-rw-r--r--dev-libs/libbsd/libbsd-0.8.6.ebuild4
-rw-r--r--dev-libs/libbsd/libbsd-0.8.7.ebuild4
3 files changed, 40 insertions, 0 deletions
diff --git a/dev-libs/libbsd/files/libbsd-0.8.6-sparc.patch b/dev-libs/libbsd/files/libbsd-0.8.6-sparc.patch
new file mode 100644
index 000000000000..d2c35d8dc4ed
--- /dev/null
+++ b/dev-libs/libbsd/files/libbsd-0.8.6-sparc.patch
@@ -0,0 +1,32 @@
+From 0b65d43963fc1bea195e94e3af922a7893bf6fcd Mon Sep 17 00:00:00 2001
+From: James Clarke <jrtc27@jrtc27.com>
+Date: Sun, 4 Mar 2018 23:44:52 +0100
+Subject: Add support for ELF machine EM_SPARC32PLUS
+
+32-bit SPARC on V8+ uses a different ELF machine type.
+
+Fixes: https://bugs.gentoo.org/634550
+Signed-off-by: Guillem Jover <guillem@hadrons.org>
+---
+ src/local-elf.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/local-elf.h b/src/local-elf.h
+index 1faf182..f7cbd83 100644
+--- a/src/local-elf.h
++++ b/src/local-elf.h
+@@ -186,7 +186,11 @@
+ #define ELF_TARG_MACH EM_SPARCV9
+ #define ELF_TARG_CLASS ELFCLASS64
+ #else
++#if defined(__sparc_v9__)
++#define ELF_TARG_MACH EM_SPARC32PLUS
++#else
+ #define ELF_TARG_MACH EM_SPARC
++#endif
+ #define ELF_TARG_CLASS ELFCLASS32
+ #endif
+ #define ELF_TARG_DATA ELFDATA2MSB
+--
+cgit v1.1
+
diff --git a/dev-libs/libbsd/libbsd-0.8.6.ebuild b/dev-libs/libbsd/libbsd-0.8.6.ebuild
index ab9fdb3b03f9..bfc008979c3e 100644
--- a/dev-libs/libbsd/libbsd-0.8.6.ebuild
+++ b/dev-libs/libbsd/libbsd-0.8.6.ebuild
@@ -16,6 +16,10 @@ IUSE="static-libs"
DEPEND=">=sys-kernel/linux-headers-3.17"
RDEPEND=""
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.6-sparc.patch"
+)
+
pkg_setup() {
local f="${EROOT}/usr/$(get_libdir)/${PN}.a"
local m="You need to remove ${f} by hand or re-emerge sys-libs/glibc first."
diff --git a/dev-libs/libbsd/libbsd-0.8.7.ebuild b/dev-libs/libbsd/libbsd-0.8.7.ebuild
index bde7f808bf8b..8ce1c8916cbe 100644
--- a/dev-libs/libbsd/libbsd-0.8.7.ebuild
+++ b/dev-libs/libbsd/libbsd-0.8.7.ebuild
@@ -16,6 +16,10 @@ IUSE="static-libs"
DEPEND=">=sys-kernel/linux-headers-3.17"
RDEPEND=""
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.6-sparc.patch"
+)
+
pkg_setup() {
local f="${EROOT}/usr/$(get_libdir)/${PN}.a"
local m="You need to remove ${f} by hand or re-emerge sys-libs/glibc first."