diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-26 13:23:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-26 14:23:34 +0100 |
commit | c7dc5142b56b3f52ba9c2746eb4855fae68ed26e (patch) | |
tree | 953a27d25d45bed1f37e674914198b2c97dc3cfe /platform/x11/detect.py | |
parent | 1e57b558f215dd4920768e9567b6f55825877c89 (diff) | |
download | redot-engine-c7dc5142b56b3f52ba9c2746eb4855fae68ed26e.tar.gz |
SCons: Fix get_compiler_version() to return ints
Otherwise comparisons would fail for compiler versions above 10.
Also simplified code somewhat to avoid using subprocess too much
needlessly.
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r-- | platform/x11/detect.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 9d5affcb3c..b5b7895da9 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -179,18 +179,10 @@ def configure(env): env.Append(CCFLAGS=['-pipe']) env.Append(LINKFLAGS=['-pipe']) - # Check for gcc version >= 6 before adding -no-pie - if using_gcc(env): - version = get_compiler_version(env) - if version != None and version[0] >= '6': - env.Append(CCFLAGS=['-fpie']) - env.Append(LINKFLAGS=['-no-pie']) - # Do the same for clang should be fine with Clang 4 and higher - if using_clang(env): - version = get_compiler_version(env) - if version != None and version[0] >= '4': - env.Append(CCFLAGS=['-fpie']) - env.Append(LINKFLAGS=['-no-pie']) + # -fpie and -no-pie is supported on GCC 6+ and Clang 4+, both below our + # minimal requirements. + env.Append(CCFLAGS=['-fpie']) + env.Append(LINKFLAGS=['-no-pie']) ## Dependencies |