You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user