summaryrefslogtreecommitdiff
path: root/dev-lang/mono/files/mono-4.8.0.371-x86_32.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-lang/mono/files/mono-4.8.0.371-x86_32.patch
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-lang/mono/files/mono-4.8.0.371-x86_32.patch')
-rw-r--r--dev-lang/mono/files/mono-4.8.0.371-x86_32.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/dev-lang/mono/files/mono-4.8.0.371-x86_32.patch b/dev-lang/mono/files/mono-4.8.0.371-x86_32.patch
new file mode 100644
index 000000000000..063ea634fa4c
--- /dev/null
+++ b/dev-lang/mono/files/mono-4.8.0.371-x86_32.patch
@@ -0,0 +1,27 @@
+Native toolchain can default to different ABI (amd64 in bug case).
+Set target to i386.
+https://bugs.gentoo.org/600664
+diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
+index a1c359f..beaaf76 100644
+--- a/mono/mini/aot-compiler.c
++++ b/mono/mini/aot-compiler.c
+@@ -9842,7 +9842,9 @@ compile_asm (MonoAotCompile *acfg)
+ 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) && !defined(TARGET_MACH)
++#define AS_OPTIONS "--32"
++#elif defined(TARGET_AMD64) && !defined(TARGET_MACH)
+ #define AS_OPTIONS "--64"
+ #elif defined(TARGET_POWERPC64)
+ #define AS_OPTIONS "-a64 -mppc64"
+@@ -9886,6 +9888,8 @@ compile_asm (MonoAotCompile *acfg)
+ #define LD_OPTIONS "--shared"
+ #elif defined(TARGET_POWERPC64)
+ #define LD_OPTIONS "-m elf64ppc"
++#elif defined(TARGET_X86)
++#define LD_OPTIONS "-m elf_i386"
+ #endif
+
+ #ifndef LD_OPTIONS