diff options
author | dnobori <da.git@softether.co.jp> | 2018-09-11 10:32:36 +0300 |
---|---|---|
committer | dnobori <da.git@softether.co.jp> | 2018-09-11 10:32:36 +0300 |
commit | abe19458ffdfd75664176d4e41e448ad3b7a4f22 (patch) | |
tree | 8a8c0fd968e1fd76b769ac843f34a0d8aeb4917c /src/BuildUtil/UnixBuildSoftwares.cs | |
parent | c5d56e666e97719398dc9dc2d81398b744ce9417 (diff) |
v4.28-9669-betav4.28-9669-beta
Diffstat (limited to 'src/BuildUtil/UnixBuildSoftwares.cs')
-rw-r--r-- | src/BuildUtil/UnixBuildSoftwares.cs | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/BuildUtil/UnixBuildSoftwares.cs b/src/BuildUtil/UnixBuildSoftwares.cs index 515aba2b..e8aa8b3d 100644 --- a/src/BuildUtil/UnixBuildSoftwares.cs +++ b/src/BuildUtil/UnixBuildSoftwares.cs @@ -648,11 +648,16 @@ namespace BuildUtil sr.WriteLine("\t-ranlib lib/{0}", Path.GetFileName(filename));
}
+ bool no_pie_first = false;
bool try_no_pie = false;
- if (this.Os == OSList.Linux && (this.Cpu == CpuList.x86 || this.Cpu == CpuList.x64 || this.Cpu == CpuList.intel))
+ if (this.Os == OSList.Linux)
{
try_no_pie = true;
+ if (this.Cpu == CpuList.x86 || this.Cpu == CpuList.x64 || this.Cpu == CpuList.intel)
+ {
+ no_pie_first = true;
+ }
}
sr.WriteLine("\t-ranlib code/{0}.a", this.Software.ToString());
@@ -663,17 +668,32 @@ namespace BuildUtil }
else
{
- sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0} || $(CC) -no-pie code/{0}.a $(OPTIONS) -o {0}", this.Software.ToString());
+ if (no_pie_first == false)
+ {
+ sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0} || $(CC) -no-pie code/{0}.a $(OPTIONS) -o {0}", this.Software.ToString());
+ }
+ else
+ {
+ sr.WriteLine("\t$(CC) -no-pie code/{0}.a $(OPTIONS) -o {0} || $(CC) code/{0}.a $(OPTIONS) -o {0}", this.Software.ToString());
+ }
}
sr.WriteLine("\t-ranlib code/{0}.a", "vpncmd");
+
if (try_no_pie == false)
{
sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0}", "vpncmd");
}
else
{
- sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0} || $(CC) -no-pie code/{0}.a $(OPTIONS) -o {0}", "vpncmd");
+ if (no_pie_first == false)
+ {
+ sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0} || $(CC) -no-pie code/{0}.a $(OPTIONS) -o {0}", "vpncmd");
+ }
+ else
+ {
+ sr.WriteLine("\t$(CC) -no-pie code/{0}.a $(OPTIONS) -o {0} || $(CC) code/{0}.a $(OPTIONS) -o {0}", "vpncmd");
+ }
}
if (this.Software == Software.vpnserver_vpnbridge || this.Software == Software.vpnbridge || this.Software == Software.vpnserver)
|