mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-22 19:15:34 +00:00
Fix linux stubs linking
This commit is contained in:
parent
cfc794c3bd
commit
ac7ea69ce8
|
@ -83,22 +83,28 @@ public class GAssembly
|
|||
|
||||
public void GenerateLinuxStubs()
|
||||
{
|
||||
var basedir = P.Combine("..", "..", Dir);
|
||||
|
||||
Cake.DeleteDirectory(P.Combine(basedir, "linux-x86"), new DeleteDirectorySettings { Recursive = true, Force = true });
|
||||
Cake.DeleteDirectory(P.Combine(basedir, "linux-x64"), new DeleteDirectorySettings { Recursive = true, Force = true });
|
||||
Cake.DeleteDirectory(P.Combine(basedir, "linux-arm"), new DeleteDirectorySettings { Recursive = true, Force = true });
|
||||
|
||||
for (int i = 0; i < NativeDeps.Length; i += 2)
|
||||
{
|
||||
// Generate x64 stubs
|
||||
Cake.CreateDirectory(P.Combine(Dir, "linux-x64"));
|
||||
Cake.StartProcess("gcc", "-shared -o BuildOutput/LinuxStubs/" + NativeDeps[i] + " BuildOutput/LinuxStubs/empty.c");
|
||||
Cake.StartProcess("gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(Dir, "linux-x64", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:BuildOutput/LinuxStubs/" + NativeDeps[i] + "");
|
||||
|
||||
// Generate x86 stubs
|
||||
Cake.CreateDirectory(P.Combine(Dir, "linux-x86"));
|
||||
Cake.StartProcess("gcc", "-m32 -shared -o BuildOutput/LinuxStubs/" + NativeDeps[i] + " BuildOutput/LinuxStubs/empty.c");
|
||||
Cake.StartProcess("gcc", "-m32 -Wl,--no-as-needed -shared -o " + P.Combine(Dir, "linux-x86", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:BuildOutput/LinuxStubs/" + NativeDeps[i] + "");
|
||||
Cake.CreateDirectory(P.Combine(basedir, "linux-x86"));
|
||||
Cake.StartProcess("gcc", "-m32 -shared -o " + NativeDeps[i] + " empty.c");
|
||||
Cake.StartProcess("gcc", "-m32 -Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-x86", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + "");
|
||||
|
||||
// Generate x64 stubs
|
||||
Cake.CreateDirectory(P.Combine(basedir, "linux-x64"));
|
||||
Cake.StartProcess("gcc", "-shared -o " + NativeDeps[i] + " empty.c");
|
||||
Cake.StartProcess("gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-x64", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + "");
|
||||
|
||||
// Generate arm stubs
|
||||
Cake.CreateDirectory(P.Combine(Dir, "linux-arm"));
|
||||
Cake.StartProcess("arm-none-eabi-gcc", "-shared -o BuildOutput/LinuxStubs/" + NativeDeps[i] + " BuildOutput/LinuxStubs/empty.c");
|
||||
Cake.StartProcess("arm-none-eabi-gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(Dir, "linux-arm", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:BuildOutput/LinuxStubs/" + NativeDeps[i] + "");
|
||||
Cake.CreateDirectory(P.Combine(basedir, "linux-arm"));
|
||||
Cake.StartProcess("arm-none-eabi-gcc", "-shared -o " + NativeDeps[i] + " empty.c");
|
||||
Cake.StartProcess("arm-none-eabi-gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-arm", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -18,7 +18,7 @@ Task("Init")
|
|||
.Does(() =>
|
||||
{
|
||||
// Assign some common properties
|
||||
msbuildsettings = msbuildsettings.WithProperty("Version", "3.22.24.0");
|
||||
msbuildsettings = msbuildsettings.WithProperty("Version", "3.22.24.7");
|
||||
msbuildsettings = msbuildsettings.WithProperty("Authors", "'GtkSharp Contributors'");
|
||||
msbuildsettings = msbuildsettings.WithProperty("PackageLicenseUrl", "'https://github.com/cra0zy/GtkSharp/blob/cakecore/LICENSE'");
|
||||
|
||||
|
@ -51,9 +51,11 @@ Task("GenerateLinuxStubs")
|
|||
.Does(() =>
|
||||
{
|
||||
CreateDirectory("BuildOutput/LinuxStubs");
|
||||
FileWriteText("BuildOutput/LinuxStubs/empty.c", "");
|
||||
System.IO.Directory.SetCurrentDirectory("BuildOutput/LinuxStubs");
|
||||
FileWriteText("empty.c", "");
|
||||
foreach(var gassembly in list)
|
||||
gassembly.GenerateLinuxStubs();
|
||||
System.IO.Directory.SetCurrentDirectory("../..");
|
||||
DeleteDirectory("BuildOutput/LinuxStubs", new DeleteDirectorySettings { Recursive = true, Force = true });
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue