Skip to content

Commit

Permalink
uwsgiconfig: make -Wformat-signedness conditional on gcc
Browse files Browse the repository at this point in the history
Since it's not available on clang.

Fix #2602
  • Loading branch information
xrmx committed Feb 8, 2024
1 parent db31b77 commit 5c47c30
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions uwsgiconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5c47c30

Please sign in to comment.