diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2018-10-09 01:24:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-09 01:24:04 +0300 |
commit | a8d007e51da7a056b667457ff862fae4d89bc08d (patch) | |
tree | 461ae856ec677d327907afc17d6506bf0a83a8fa | |
parent | 6b3cb0d93b5d085229ff5714c457094b907d4a17 (diff) |
AOT: use 32 bit flags for as/ld when targetting x86 on linux (#11032)
So it works when running the 64bit as/ld on the host with a 32bit mono binary.
-rw-r--r-- | mono/mini/aot-compiler.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index 2425a9b118d..46380a64cf2 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -11269,6 +11269,8 @@ compile_asm (MonoAotCompile *acfg) #define AS_OPTIONS "-xarch=v9" #elif defined(TARGET_X86) && defined(TARGET_MACH) #define AS_OPTIONS "-arch i386" +#elif defined(TARGET_X86) && !defined(TARGET_MACH) +#define AS_OPTIONS "--32" #else #define AS_OPTIONS "" #endif @@ -11306,6 +11308,8 @@ compile_asm (MonoAotCompile *acfg) #elif defined(TARGET_X86) && defined(TARGET_MACH) #define LD_NAME "clang" #define LD_OPTIONS "-m32 -dynamiclib" +#elif defined(TARGET_X86) && !defined(TARGET_MACH) +#define LD_OPTIONS "-m elf_i386" #elif defined(TARGET_ARM) && !defined(TARGET_ANDROID) #define LD_NAME "gcc" #define LD_OPTIONS "--shared" |