Dont use -Wfloat-conversion on old compilers
This commit is contained in:
parent
9347be639b
commit
e106dcc83b
5
setup.py
5
setup.py
@ -200,8 +200,10 @@ def init_env(
|
|||||||
if ccver < (5, 2) and cc == 'gcc':
|
if ccver < (5, 2) and cc == 'gcc':
|
||||||
missing_braces = '-Wno-missing-braces'
|
missing_braces = '-Wno-missing-braces'
|
||||||
df = '-g3'
|
df = '-g3'
|
||||||
|
float_conversion = ''
|
||||||
if ccver >= (5, 0):
|
if ccver >= (5, 0):
|
||||||
df += ' -Og'
|
df += ' -Og'
|
||||||
|
float_conversion = '-Wfloat-conversion'
|
||||||
optimize = df if debug or sanitize else '-O3'
|
optimize = df if debug or sanitize else '-O3'
|
||||||
sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set()
|
sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set()
|
||||||
cppflags = os.environ.get(
|
cppflags = os.environ.get(
|
||||||
@ -212,9 +214,10 @@ def init_env(
|
|||||||
cppflags.append('-DDEBUG_{}'.format(el.upper().replace('-', '_')))
|
cppflags.append('-DDEBUG_{}'.format(el.upper().replace('-', '_')))
|
||||||
cflags = os.environ.get(
|
cflags = os.environ.get(
|
||||||
'OVERRIDE_CFLAGS', (
|
'OVERRIDE_CFLAGS', (
|
||||||
'-Wextra -Wfloat-conversion -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11'
|
'-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11'
|
||||||
' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
|
' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
|
||||||
).format(
|
).format(
|
||||||
|
float_conversion,
|
||||||
optimize,
|
optimize,
|
||||||
' '.join(sanitize_args),
|
' '.join(sanitize_args),
|
||||||
stack_protector,
|
stack_protector,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user