summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-03-30 18:25:39 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-03-30 18:26:42 +0100
commit5127c755e4cb6a810f81eb38777e1d7917695f9c (patch)
tree85d62306bea114f2065ce91d41eed1f257101473 /dev-lang/mono
parentsci-libs/scipy: stable 0.19.1 for ppc64, bug #645152 (diff)
downloadgentoo-5127c755e4cb6a810f81eb38777e1d7917695f9c.tar.gz
gentoo-5127c755e4cb6a810f81eb38777e1d7917695f9c.tar.bz2
gentoo-5127c755e4cb6a810f81eb38777e1d7917695f9c.zip
dev-lang/mono: fix 32-bit build on amd64, bug #600664
It's a backport of https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a0e31adf6af28adf3c8709e542ecf7039cb5942 Reported-by: Toralf Förster Fixed-by: Eric Hermes Closes: https://bugs.gentoo.org/600664 Package-Manager: Portage-2.3.26, Repoman-2.3.7
Diffstat (limited to 'dev-lang/mono')
-rw-r--r--dev-lang/mono/files/mono-4.4.1.0-x86_32.patch20
-rw-r--r--dev-lang/mono/mono-4.4.1.0.ebuild4
2 files changed, 23 insertions, 1 deletions
diff --git a/dev-lang/mono/files/mono-4.4.1.0-x86_32.patch b/dev-lang/mono/files/mono-4.4.1.0-x86_32.patch
new file mode 100644
index 000000000000..751c057e6ce4
--- /dev/null
+++ b/dev-lang/mono/files/mono-4.4.1.0-x86_32.patch
@@ -0,0 +1,20 @@
+Native toolchain can default to different ABI (amd64 in bug case).
+Set target to i386.
+https://bugs.gentoo.org/600664
+diff -Naur a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
+--- a/mono/mini/aot-compiler.c 2016-06-22 04:31:58.000000000 -0500
++++ b/mono/mini/aot-compiler.c 2017-12-08 14:25:35.338251941 -0600
+@@ -9438,7 +9438,12 @@
+ const char *tool_prefix = acfg->aot_opts.tool_prefix ? acfg->aot_opts.tool_prefix : "";
+ char *ld_flags = acfg->aot_opts.ld_flags ? acfg->aot_opts.ld_flags : g_strdup("");
+
+-#if defined(TARGET_AMD64) && !defined(TARGET_MACH)
++#if defined(TARGET_X86)
++#define LD_OPTIONS "-m elf_i386"
++#if !defined(TARGET_MACH)
++#define AS_OPTIONS "--32"
++#endif
++#elif defined(TARGET_AMD64) && !defined(TARGET_MACH)
+ #define AS_OPTIONS "--64"
+ #elif defined(TARGET_POWERPC64)
+ #define AS_OPTIONS "-a64 -mppc64"
diff --git a/dev-lang/mono/mono-4.4.1.0.ebuild b/dev-lang/mono/mono-4.4.1.0.ebuild
index 328ec0684726..397235e7db59 100644
--- a/dev-lang/mono/mono-4.4.1.0.ebuild
+++ b/dev-lang/mono/mono-4.4.1.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -79,6 +79,8 @@ src_prepare() {
#epatch "${FILESDIR}/fix-for-GitExtensions-issue-2710-another-resolution.patch"
#epatch "${FILESDIR}/fix-for-bug36724.patch"
+ epatch "${FILESDIR}/${P}-x86_32.patch"
+
default
#eapply_user
multilib_copy_sources