Skip to content

Instantly share code, notes, and snippets.

/- Secret

Created August 14, 2015 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/852297defe52835ac99e to your computer and use it in GitHub Desktop.
Save anonymous/852297defe52835ac99e to your computer and use it in GitHub Desktop.
diff --git a/mcs/tools/mkbundle/mkbundle.cs b/mcs/tools/mkbundle/mkbundle.cs
index ec5c1f1..ccfbec8 100755
--- a/mcs/tools/mkbundle/mkbundle.cs
+++ b/mcs/tools/mkbundle/mkbundle.cs
@@ -422,7 +422,7 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
string assembler = GetEnv ("AS", IsUnix ? "as" : "i686-pc-mingw32-as");
Console.WriteLine ("Compiling:");
- string cmd = String.Format ("{0} -o {1} {2} ", assembler, temp_o, temp_s);
+ string cmd = String.Format ("{0} -arch i386 -o {1} {2} ", assembler, temp_o, temp_s);
int ret = Execute (cmd);
if (ret != 0){
Error ("[Fail]");
@@ -496,13 +496,13 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
smonolib = "`pkg-config --variable=libdir mono-2`/libmono-2.0.a ";
else
smonolib = "-Wl,-Bstatic -lmono-2.0 -Wl,-Bdynamic ";
- cmd = String.Format ("{4} -o {2} -Wall `pkg-config --cflags mono-2` {0} {3} " +
+ cmd = String.Format ("{4} -framework CoreFoundation -framework Foundation -Wl,-undefined -Wl,suppress -Wl,-flat_namespace -m32 -o {2} -Wall `pkg-config --cflags mono-2` {0} {3} " +
"`pkg-config --libs-only-L mono-2` " + smonolib +
"`pkg-config --libs-only-l mono-2 | sed -e \"s/\\-lmono-2.0 //\"` {1}",
temp_c, temp_o, output, zlib, cc);
} else {
- cmd = String.Format ("{4} " + debugging + " -o {2} -Wall {0} `pkg-config --cflags --libs mono-2` {3} {1}",
+ cmd = String.Format ("{4} " + debugging + " -framework CoreFoundation -framework Foundation -m32 -o {2} -Wall {0} `pkg-config --cflags --libs mono-2` {3} {1}",
temp_c, temp_o, output, zlib, cc);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment