diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 8fe31ccb1..ad1bef1d8 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -679,16 +679,18 @@ def __init__(self, filename, mute=False): if 'UWSGI_INCLUDES' in os.environ: self.include_path += os.environ['UWSGI_INCLUDES'].split(',') - self.cflags = [ + cflags = [ '-O2', '-I.', '-Wall', '-Werror', - '-Wformat-signedness', '-Wno-error=deprecated-declarations', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64' - ] + os.environ.get("CFLAGS", "").split() + self.get('cflags', '').split() + ] + if "gcc" in GCC: + cflags.append('-Wformat-signedness') + self.cflags = cflags + os.environ.get("CFLAGS", "").split() + self.get('cflags', '').split() python_venv_include = os.path.join(sys.prefix, 'include', 'site', 'python{0}.{1}'.format(*sys.version_info))