Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnobori <da.git@softether.co.jp>2018-05-29 18:50:54 +0300
committerdnobori <da.git@softether.co.jp>2018-05-29 18:50:54 +0300
commitc5d56e666e97719398dc9dc2d81398b744ce9417 (patch)
tree8ac46749f92acbdb0702f71f3cb5066ca3ca0d6e /src/BuildUtil/UnixBuildSoftwares.cs
parentc6d5ebdda197c7b9a06342d078e4872faad6552e (diff)
v4.27-9668-betav4.27-9668-beta
Diffstat (limited to 'src/BuildUtil/UnixBuildSoftwares.cs')
-rw-r--r--src/BuildUtil/UnixBuildSoftwares.cs34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/BuildUtil/UnixBuildSoftwares.cs b/src/BuildUtil/UnixBuildSoftwares.cs
index 220740c0..515aba2b 100644
--- a/src/BuildUtil/UnixBuildSoftwares.cs
+++ b/src/BuildUtil/UnixBuildSoftwares.cs
@@ -648,11 +648,33 @@ namespace BuildUtil
sr.WriteLine("\t-ranlib lib/{0}", Path.GetFileName(filename));
}
+ bool try_no_pie = false;
+
+ if (this.Os == OSList.Linux && (this.Cpu == CpuList.x86 || this.Cpu == CpuList.x64 || this.Cpu == CpuList.intel))
+ {
+ try_no_pie = true;
+ }
+
sr.WriteLine("\t-ranlib code/{0}.a", this.Software.ToString());
- sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0}", this.Software.ToString());
+
+ if (try_no_pie == false)
+ {
+ sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0}", this.Software.ToString());
+ }
+ else
+ {
+ sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0} || $(CC) -no-pie code/{0}.a $(OPTIONS) -o {0}", this.Software.ToString());
+ }
sr.WriteLine("\t-ranlib code/{0}.a", "vpncmd");
- sr.WriteLine("\t$(CC) code/{0}.a $(OPTIONS) -o {0}", "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 (this.Software == Software.vpnserver_vpnbridge || this.Software == Software.vpnbridge || this.Software == Software.vpnserver)
{
@@ -958,14 +980,6 @@ namespace BuildUtil
options.Add("-O2");
}
- if (this.Os == OSList.Linux)
- {
- if (this.Cpu == CpuList.x64 || this.Cpu == CpuList.x86 || this.Cpu == CpuList.intel)
- {
- options.Add("-no-pie");
- }
- }
-
options.Add("-fsigned-char");
if (this.NoPThreadOption == false)
{