Come up with use_gcc.

Add new method. Fix wrong version condition for -fpie.
This commit is contained in:
marxin 2019-02-22 15:41:31 +01:00
parent 4f697f73a5
commit 0d2a105e6b
3 changed files with 10 additions and 6 deletions

View file

@ -338,7 +338,7 @@ if selected_platform in platform_list:
disable_nonessential_warnings = ['-Wno-sign-compare']
shadow_local_warning = []
if 'gcc' in os.path.basename(env["CC"]):
if methods.use_gcc(env):
version = methods.get_compiler_version(env)
if version != None and version[0] >= '7':
shadow_local_warning = ['-Wshadow-local']